Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Issue 1291553003: Print stack traces in child processes when browser tests failed. (Closed)

Created:
5 years, 4 months ago by jam
Modified:
4 years, 8 months ago
CC:
chromium-reviews, mkwst+moarreviews-renderer_chromium.org, darin-cc_chromium.org, mlamouri+watch-content_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Print stack traces in browser tests when any process crashes, or an assert fires. The functionality to do this opens up security holes. Currently this was working only for debug Linux builds. However our trybots are release builds, and we need to be able to see stack traces from processes on all platforms and not just Linux (i.e. to be able to debug the large flakiness that occurred last week). This is disabled for official builds. Also make release (non-official) builds print the callstack on asserts, just like debug builds. This makes it easier to debug test failures on the CQ (for example, DCHECKs for non-threadsafe usage of pointers). Add a regression test that both renderer and browser process crashes print the callstack. BUG=517488, 358267, 521148 NOPRESUBMIT=true Committed: https://crrev.com/8ba532e170befc312e66d032587fa2ad04bac975 Cr-Commit-Position: refs/heads/master@{#343240} Committed: https://crrev.com/79dc59ac7602413181079ecb463873e29a1d7d0a Cr-Commit-Position: refs/heads/master@{#343626}

Patch Set 1 #

Total comments: 4

Patch Set 2 : fix on bots, still not working on x64 win release #

Patch Set 3 : more fixes, works on every configuration now #

Total comments: 2

Patch Set 4 : review comment #

Patch Set 5 : fix compile #

Patch Set 6 : reupload after revert #

Patch Set 7 : patch 1295823002 which fixes the console coming up on Win8+ and adds regression tests #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+351 lines, -238 lines) Patch
M base/debug/stack_trace.h View 1 2 3 4 5 6 2 chunks +7 lines, -10 lines 0 comments Download
M base/debug/stack_trace_posix.cc View 1 2 3 4 5 6 7 chunks +12 lines, -19 lines 0 comments Download
M base/debug/stack_trace_win.cc View 1 2 3 4 5 6 7 chunks +65 lines, -63 lines 1 comment Download
M base/logging.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M base/process/launch.h View 1 2 3 4 5 6 2 chunks +5 lines, -1 line 0 comments Download
M base/process/launch_posix.cc View 1 2 3 4 5 6 6 chunks +19 lines, -6 lines 0 comments Download
M base/process/launch_win.cc View 1 2 3 4 5 6 4 chunks +110 lines, -76 lines 0 comments Download
M base/test/test_suite.cc View 1 2 3 4 5 6 2 chunks +2 lines, -0 lines 0 comments Download
M components/nacl/loader/nacl_helper_win_64.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M components/nacl/loader/nacl_main_platform_delegate_win.cc View 1 1 chunk +0 lines, -6 lines 0 comments Download
M content/app/content_main_runner.cc View 1 2 3 4 5 6 3 chunks +12 lines, -1 line 1 comment Download
M content/common/sandbox_linux/sandbox_linux.cc View 1 2 3 4 5 6 1 chunk +0 lines, -7 lines 0 comments Download
M content/common/sandbox_win.cc View 1 2 3 4 5 6 2 chunks +8 lines, -8 lines 0 comments Download
M content/gpu/gpu_main.cc View 1 1 chunk +0 lines, -7 lines 0 comments Download
M content/ppapi_plugin/ppapi_thread.cc View 1 1 chunk +0 lines, -6 lines 0 comments Download
M content/renderer/renderer_main.cc View 2 chunks +1 line, -11 lines 0 comments Download
M content/renderer/renderer_main_platform_delegate_win.cc View 1 1 chunk +0 lines, -7 lines 0 comments Download
M content/test/content_browser_test_test.cc View 1 2 3 4 5 6 2 chunks +103 lines, -1 line 0 comments Download
M content/utility/utility_main.cc View 1 1 chunk +0 lines, -6 lines 0 comments Download
M mojo/application/public/cpp/lib/application_runner.cc View 1 2 3 4 5 6 2 chunks +5 lines, -1 line 0 comments Download

Messages

Total messages: 38 (10 generated)
jam
scottmg: please review jln: wanted to make sure you see this and you're ok with ...
5 years, 4 months ago (2015-08-12 00:54:14 UTC) #2
scottmg
lgtm https://codereview.chromium.org/1291553003/diff/1/base/process/launch_win.cc File base/process/launch_win.cc (right): https://codereview.chromium.org/1291553003/diff/1/base/process/launch_win.cc#newcode72 base/process/launch_win.cc:72: // This causes NaCl tests to hang on ...
5 years, 4 months ago (2015-08-12 02:28:15 UTC) #3
jam
https://codereview.chromium.org/1291553003/diff/1/base/process/launch_win.cc File base/process/launch_win.cc (right): https://codereview.chromium.org/1291553003/diff/1/base/process/launch_win.cc#newcode72 base/process/launch_win.cc:72: // This causes NaCl tests to hang on XP ...
5 years, 4 months ago (2015-08-12 03:01:33 UTC) #4
jln (very slow on Chromium)
lgtm, but could this be temporary until the current flakiness stops?
5 years, 4 months ago (2015-08-12 16:47:31 UTC) #5
jam
On 2015/08/12 16:47:31, jln wrote: > lgtm, but could this be temporary until the current ...
5 years, 4 months ago (2015-08-12 17:14:58 UTC) #6
jam
scottmg: ptal patchset 1->2. There are minor differences which now make it pass on win ...
5 years, 4 months ago (2015-08-13 14:35:51 UTC) #7
jam
actually, for component builds, this won't work right now on swarming since for GYP we ...
5 years, 4 months ago (2015-08-13 14:41:58 UTC) #8
jam
+wfh for content/common/sandbox_win.cc
5 years, 4 months ago (2015-08-13 15:44:12 UTC) #10
scottmg
lgtm https://codereview.chromium.org/1291553003/diff/40001/base/debug/stack_trace_win.cc File base/debug/stack_trace_win.cc (right): https://codereview.chromium.org/1291553003/diff/40001/base/debug/stack_trace_win.cc#newcode147 base/debug/stack_trace_win.cc:147: // Need to initialize symbols early in the ...
5 years, 4 months ago (2015-08-13 15:48:54 UTC) #11
Will Harris
On 2015/08/13 15:44:12, jam wrote: > +wfh for content/common/sandbox_win.cc lgtm
5 years, 4 months ago (2015-08-13 15:53:18 UTC) #12
jam
https://codereview.chromium.org/1291553003/diff/40001/base/debug/stack_trace_win.cc File base/debug/stack_trace_win.cc (right): https://codereview.chromium.org/1291553003/diff/40001/base/debug/stack_trace_win.cc#newcode147 base/debug/stack_trace_win.cc:147: // Need to initialize symbols early in the process ...
5 years, 4 months ago (2015-08-13 15:59:27 UTC) #13
scottmg
ship it! lgtm
5 years, 4 months ago (2015-08-13 16:37:12 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1291553003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1291553003/80001
5 years, 4 months ago (2015-08-13 17:22:26 UTC) #17
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 4 months ago (2015-08-13 18:30:30 UTC) #18
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/8ba532e170befc312e66d032587fa2ad04bac975 Cr-Commit-Position: refs/heads/master@{#343240}
5 years, 4 months ago (2015-08-13 18:31:15 UTC) #19
Ken Rockot(use gerrit already)
A revert of this CL (patchset #5 id:80001) has been created in https://codereview.chromium.org/1299583002/ by rockot@chromium.org. ...
5 years, 4 months ago (2015-08-16 17:36:22 UTC) #20
scottmg
Confirmed ps7 is ok on win81 (tested debug component): - chrome doesn't spawn any consoles ...
5 years, 4 months ago (2015-08-16 23:12:10 UTC) #21
jam
On 2015/08/16 23:12:10, scottmg wrote: > Confirmed ps7 is ok on win81 (tested debug component): ...
5 years, 4 months ago (2015-08-16 23:52:55 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1291553003/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1291553003/120001
5 years, 4 months ago (2015-08-17 02:06:59 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1291553003/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1291553003/120001
5 years, 4 months ago (2015-08-17 03:37:57 UTC) #28
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years, 4 months ago (2015-08-17 03:38:22 UTC) #29
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/79dc59ac7602413181079ecb463873e29a1d7d0a Cr-Commit-Position: refs/heads/master@{#343626}
5 years, 4 months ago (2015-08-17 03:38:47 UTC) #30
Alexander Potapenko
John, ContentBrowserTest.RendererCrashCallStack started failing under TSan, can you please take a look? http://build.chromium.org/p/chromium.memory.fyi/builders/Linux%20TSan%20Tests/builds/8870
5 years, 4 months ago (2015-08-17 13:02:39 UTC) #31
jam
On 2015/08/17 13:02:39, Alexander Potapenko wrote: > John, > > ContentBrowserTest.RendererCrashCallStack started failing under TSan, ...
5 years, 4 months ago (2015-08-17 14:34:24 UTC) #32
scottmg
On 2015/08/17 14:34:24, jam wrote: > On 2015/08/17 13:02:39, Alexander Potapenko wrote: > > John, ...
5 years, 4 months ago (2015-08-17 23:27:40 UTC) #33
inferno
This has broken ASAN on Windows, see example trace in https://code.google.com/p/chromium/issues/detail?id=533350#c17
5 years, 2 months ago (2015-10-01 12:19:06 UTC) #34
Sébastien Marchand
https://codereview.chromium.org/1291553003/diff/120001/base/debug/stack_trace_win.cc File base/debug/stack_trace_win.cc (right): https://codereview.chromium.org/1291553003/diff/120001/base/debug/stack_trace_win.cc#newcode57 base/debug/stack_trace_win.cc:57: if (!SymInitialize(GetCurrentProcess(), NULL, TRUE)) { AFAIK the calls to ...
4 years, 11 months ago (2016-01-06 21:42:54 UTC) #36
brucedawson
4 years, 8 months ago (2016-04-18 23:07:00 UTC) #38
Message was sent while issue was closed.
In addition to the quirky LoadLibrary call I've noticed some odd behavior in
64-bit Chrome builds caused by the 32-bit version of dbghelp.dll (deleted in
crrev.com/1857413002, but still sticking around for a while in build
directories). When mini_installer is built and run then
EnableProcessStackDumping tries to load dbghelp.dll and then fails because it
finds a 32-bit dbghelpDLL. This means that no renderers can be created.

This would have been noticed earlier but for some reason when I run 64-bit
Chrome from my build directory Windows loads a 64-bit dbghelp.dll from
C:\Windows\System.

I'm not sure if we need to more aggressively remove dbghelp.dll from output
directories or if they will go away on their own quickly enough.

I've worked around this locally by deleting out\Debug_gn_64\dbghelp.dll

https://codereview.chromium.org/1291553003/diff/120001/content/app/content_ma...
File content/app/content_main_runner.cc (right):

https://codereview.chromium.org/1291553003/diff/120001/content/app/content_ma...
content/app/content_main_runner.cc:206: LoadLibraryA("dbghelp.dll");
What is the purpose of this LoadLibrary call? The EnableInProcessStackDumping
function calls SymInitialize which loads dbghelp.dll - is this unintentionally
out-of-order or is supposed to increase the reference count?

Powered by Google App Engine
This is Rietveld 408576698