No stack trace or error message when BrowserTests seg fault |
|||
Issue description
We've noticed WebUIBrowserTests fail silently when seg faulting:
> std::string s = nullptr;
> s->find("blah");
[1/1] FooWebUITest.Foo (1000ms)
1 test failed:
FooWebUITest.Foo (foo.cc:12)
We already listen to SIGTERM in BrowserTestBase: https://chromium.googlesource.com/chromium/src/+blame/master/content/public/test/browser_test_base.cc#319
Adding the handler for SIGSEGV as well seems to work (on Linux/CrOS). Any reason not to?
,
Aug 15 2016
Nice, that would be awesome!
,
Aug 15 2016
,
Aug 15 2016
Proof of concept: https://codereview.chromium.org/2250503002/ let's see what the bots say.
,
Aug 19 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/dd57fe1df3e5543459dbae29f2617d99958555ef commit dd57fe1df3e5543459dbae29f2617d99958555ef Author: michaelpg <michaelpg@chromium.org> Date: Fri Aug 19 18:57:59 2016 Handle SIGSEGV in BrowserTestBase On Linux, we handle SIGTERM but not SIGSEGV. BUG= 637942 Before: [ RUN ] ChromeSendPassthroughWebUITest.CanCallOriginal [1/1] ChromeSendPassthroughWebUITest.CanCallOriginal (2094 ms) 1 test failed: ChromeSendPassthroughWebUITest.CanCallOriginal (gen/chrome/test/data/webui/chrome_send_browsertest-gen.cc:23) After: [ RUN ] ChromeSendPassthroughWebUITest.CanCallOriginal BrowserTestBase received signal: Segmentation fault. Backtrace: #0 0x7eff21e645de base::debug::StackTrace::StackTrace() #1 0x000001a99249 content::(anonymous namespace)::DumpStackTraceSignalHandler() #2 0x7eff17794cb0 <unknown> #3 0x7eff17df2865 std::string::find() #4 0x0000011b691d WebUIBrowserTest::RunJavascriptTestF() #5 0x000001302f5d ChromeSendPassthroughWebUITest_CanCallOriginal_Test::RunTestOnMainThread() #6 0x000001682683 InProcessBrowserTest::RunTestOnMainThreadLoop() #7 0x000001a98fb8 content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #8 0x0000019a13f1 ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #9 0x0000019a0515 ChromeBrowserMainParts::PreMainMessageLoopRun() #10 0x7eff1ec04605 content::BrowserMainLoop::PreMainMessageLoopRun() #11 0x7eff1eebbad7 content::StartupTaskRunner::RunAllTasksNow() #12 0x7eff1ec02e98 content::BrowserMainLoop::CreateStartupTasks() #13 0x7eff1ec072cd content::BrowserMainRunnerImpl::Initialize() #14 0x7eff1ec005b8 content::BrowserMain() #15 0x7eff1f356577 content::ContentMainRunnerImpl::Run() #16 0x7eff1f3550c0 content::ContentMain() #17 0x000001a98991 content::BrowserTestBase::SetUp() #18 0x000001681054 InProcessBrowserTest::SetUp() #19 0x000001b23218 testing::Test::Run() #20 0x000001b23f83 testing::TestInfo::Run() #21 0x000001b24413 testing::TestCase::Run() #22 0x000001b2b439 testing::internal::UnitTestImpl::RunAllTests() #23 0x000001b2b07e testing::UnitTest::Run() #24 0x000001689733 base::TestSuite::Run() #25 0x000001671699 ChromeTestSuiteRunner::RunTestSuite() #26 0x000001abc55f content::LaunchTests() #27 0x00000166f8c1 main #28 0x7eff1777ff45 __libc_start_main #29 0x0000006b3b11 <unknown> [1/1] ChromeSendPassthroughWebUITest.CanCallOriginal (2095 ms) 1 test failed: ChromeSendPassthroughWebUITest.CanCallOriginal (gen/chrome/test/data/webui/chrome_send_browsertest-gen.cc:23) Review-Url: https://codereview.chromium.org/2250503002 Cr-Commit-Position: refs/heads/master@{#413199} [modify] https://crrev.com/dd57fe1df3e5543459dbae29f2617d99958555ef/content/public/test/browser_test_base.cc
,
Jan 5 2017
Looks like it's fixed. Feel free to reopen if not. |
|||
►
Sign in to add a comment |
|||
Comment 1 by michae...@chromium.org
, Aug 15 2016