|
|
DescriptionMake Crashpad start asynchronous, and move back to chrome_elf
Crashpad initialization has been reworked to support an asynchronous
mode where StartHandler() only calls CreateThread() and does not
synchronize with that thread, making it safe to use in DllMain().
So, we can now move it back into chrome_elf to catch earlier crashes.
We block much later now in browser startup, before a renderer (i.e.
another client that would connect to the handler) will be started. This
should not be strictly necessary, but is slightly more conservative as a
first pass. This allows for error reporting, and prevents log spew from
each renderer that starts up and tries to connect to a nonexistent
handler. Also added is a UMA timer to see how long we're blocking
startup for by joining with the background thread.
This includes an effective revert of
https://chromium.googlesource.com/chromium/src/+/f3a5670dd8d42b045d31625dde4a2561b471138f
.
BUG=655788, 656800, 565063
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng
Committed: https://crrev.com/be0cfa14d77c72864a74d2bcc7910b0b31b7eecb
Cr-Commit-Position: refs/heads/master@{#439188}
Patch Set 1 #Patch Set 2 : . #
Total comments: 6
Patch Set 3 : fixes #Patch Set 4 : rebase #Patch Set 5 : rebase again #Patch Set 6 : more stripping for elf #Patch Set 7 : rebase part 3 #
Total comments: 6
Patch Set 8 : timeout #
Total comments: 2
Patch Set 9 : comment #
Messages
Total messages: 100 (71 generated)
Description was changed from ========== Make Crashpad start asynchronous, and move back to chrome_elf Crashpad initialization has been reworked to support an asynchronous mode where StartHandler() only calls CreateThread() and does not synchronize with that thread, making it safe to use in DllMain(). So, we can now move it back into chrome_elf to catch earlier crashes. We block much later now in browser startup, before a renderer (i.e. another client that would connect to the handler) will be started. This should not be strictly necessary, but is slightly more conservative as a first pass, and allows for error reporting. Also added is a UMA timer to see how long we're blocking startup for by joining with the background thread. BUG=655788,656800,565063,656800 ========== to ========== Make Crashpad start asynchronous, and move back to chrome_elf Crashpad initialization has been reworked to support an asynchronous mode where StartHandler() only calls CreateThread() and does not synchronize with that thread, making it safe to use in DllMain(). So, we can now move it back into chrome_elf to catch earlier crashes. We block much later now in browser startup, before a renderer (i.e. another client that would connect to the handler) will be started. This should not be strictly necessary, but is slightly more conservative as a first pass, and allows for error reporting. Also added is a UMA timer to see how long we're blocking startup for by joining with the background thread. BUG=655788,656800,565063,656800 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng ==========
Description was changed from ========== Make Crashpad start asynchronous, and move back to chrome_elf Crashpad initialization has been reworked to support an asynchronous mode where StartHandler() only calls CreateThread() and does not synchronize with that thread, making it safe to use in DllMain(). So, we can now move it back into chrome_elf to catch earlier crashes. We block much later now in browser startup, before a renderer (i.e. another client that would connect to the handler) will be started. This should not be strictly necessary, but is slightly more conservative as a first pass, and allows for error reporting. Also added is a UMA timer to see how long we're blocking startup for by joining with the background thread. BUG=655788,656800,565063,656800 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng ========== to ========== Make Crashpad start asynchronous, and move back to chrome_elf Crashpad initialization has been reworked to support an asynchronous mode where StartHandler() only calls CreateThread() and does not synchronize with that thread, making it safe to use in DllMain(). So, we can now move it back into chrome_elf to catch earlier crashes. We block much later now in browser startup, before a renderer (i.e. another client that would connect to the handler) will be started. This should not be strictly necessary, but is slightly more conservative as a first pass, and allows for error reporting. Also added is a UMA timer to see how long we're blocking startup for by joining with the background thread. This includes an effective revert of https://chromium.googlesource.com/chromium/src/+/f3a5670dd8d42b045d31625dde4a... . BUG=655788,656800,565063,656800 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng ==========
scottmg@chromium.org changed reviewers: + ananta@chromium.org, mark@chromium.org, pennymac@chromium.org
mark: general review pennymac/ananta: chrome_elf/fyi
LGTM otherwise https://codereview.chromium.org/2475863004/diff/20001/chrome/app/chrome_exe_m... File chrome/app/chrome_exe_main_win.cc (right): https://codereview.chromium.org/2475863004/diff/20001/chrome/app/chrome_exe_m... chrome/app/chrome_exe_main_win.cc:1: // Copyright (c) 2011 The Chromium Authors. All rights reserved. CL description: it allows for error reporting and prevents log spew from each renderer that starts up and tries to connect to a nonexistent crashpad_handler. https://codereview.chromium.org/2475863004/diff/20001/components/crash/conten... File components/crash/content/app/crashpad_win.cc (right): https://codereview.chromium.org/2475863004/diff/20001/components/crash/conten... components/crash/content/app/crashpad_win.cc:128: env->SetVar(kPipeNameVar, I thought that we’d be able to stick the wait in the first call into a getter in here that grabs the pipe to give to a child, but I see that this isn’t how we’re organized, we just dump the pipe name into the environment as soon as we can. https://codereview.chromium.org/2475863004/diff/20001/components/crash/conten... components/crash/content/app/crashpad_win.cc:195: if (!internal::g_crashpad_client.Get().WaitForHandlerStart()) { This isn’t valid unless StartHandler() returned true. There’s even a DCHECK() that this will trip over.
Description was changed from ========== Make Crashpad start asynchronous, and move back to chrome_elf Crashpad initialization has been reworked to support an asynchronous mode where StartHandler() only calls CreateThread() and does not synchronize with that thread, making it safe to use in DllMain(). So, we can now move it back into chrome_elf to catch earlier crashes. We block much later now in browser startup, before a renderer (i.e. another client that would connect to the handler) will be started. This should not be strictly necessary, but is slightly more conservative as a first pass, and allows for error reporting. Also added is a UMA timer to see how long we're blocking startup for by joining with the background thread. This includes an effective revert of https://chromium.googlesource.com/chromium/src/+/f3a5670dd8d42b045d31625dde4a... . BUG=655788,656800,565063,656800 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng ========== to ========== Make Crashpad start asynchronous, and move back to chrome_elf Crashpad initialization has been reworked to support an asynchronous mode where StartHandler() only calls CreateThread() and does not synchronize with that thread, making it safe to use in DllMain(). So, we can now move it back into chrome_elf to catch earlier crashes. We block much later now in browser startup, before a renderer (i.e. another client that would connect to the handler) will be started. This should not be strictly necessary, but is slightly more conservative as a first pass. This allows for error reporting, and prevents log speq from each renderer that starts up and tries to connect to a nonexistent handler. Also added is a UMA timer to see how long we're blocking startup for by joining with the background thread. This includes an effective revert of https://chromium.googlesource.com/chromium/src/+/f3a5670dd8d42b045d31625dde4a... . BUG=655788,656800,565063,656800 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng ==========
Description was changed from ========== Make Crashpad start asynchronous, and move back to chrome_elf Crashpad initialization has been reworked to support an asynchronous mode where StartHandler() only calls CreateThread() and does not synchronize with that thread, making it safe to use in DllMain(). So, we can now move it back into chrome_elf to catch earlier crashes. We block much later now in browser startup, before a renderer (i.e. another client that would connect to the handler) will be started. This should not be strictly necessary, but is slightly more conservative as a first pass. This allows for error reporting, and prevents log speq from each renderer that starts up and tries to connect to a nonexistent handler. Also added is a UMA timer to see how long we're blocking startup for by joining with the background thread. This includes an effective revert of https://chromium.googlesource.com/chromium/src/+/f3a5670dd8d42b045d31625dde4a... . BUG=655788,656800,565063,656800 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng ========== to ========== Make Crashpad start asynchronous, and move back to chrome_elf Crashpad initialization has been reworked to support an asynchronous mode where StartHandler() only calls CreateThread() and does not synchronize with that thread, making it safe to use in DllMain(). So, we can now move it back into chrome_elf to catch earlier crashes. We block much later now in browser startup, before a renderer (i.e. another client that would connect to the handler) will be started. This should not be strictly necessary, but is slightly more conservative as a first pass. This allows for error reporting, and prevents log speq from each renderer that starts up and tries to connect to a nonexistent handler. Also added is a UMA timer to see how long we're blocking startup for by joining with the background thread. This includes an effective revert of https://chromium.googlesource.com/chromium/src/+/f3a5670dd8d42b045d31625dde4a... . BUG=655788,656800,565063,656800 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng ==========
scottmg@chromium.org changed reviewers: + asvitkine@chromium.org, thestig@chromium.org
https://codereview.chromium.org/2475863004/diff/20001/chrome/app/chrome_exe_m... File chrome/app/chrome_exe_main_win.cc (right): https://codereview.chromium.org/2475863004/diff/20001/chrome/app/chrome_exe_m... chrome/app/chrome_exe_main_win.cc:1: // Copyright (c) 2011 The Chromium Authors. All rights reserved. On 2016/11/04 21:47:56, Mark Mentovai wrote: > CL description: it allows for error reporting and prevents log spew from each > renderer that starts up and tries to connect to a nonexistent crashpad_handler. Done. https://codereview.chromium.org/2475863004/diff/20001/components/crash/conten... File components/crash/content/app/crashpad_win.cc (right): https://codereview.chromium.org/2475863004/diff/20001/components/crash/conten... components/crash/content/app/crashpad_win.cc:128: env->SetVar(kPipeNameVar, On 2016/11/04 21:47:56, Mark Mentovai wrote: > I thought that we’d be able to stick the wait in the first call into a getter in > here that grabs the pipe to give to a child, but I see that this isn’t how we’re > organized, we just dump the pipe name into the environment as soon as we can. Yeah, we could make the call location of BlockUntilHandlerStarted() a get/set in the environment, but I guess it amounts to about the same thing. https://codereview.chromium.org/2475863004/diff/20001/components/crash/conten... components/crash/content/app/crashpad_win.cc:195: if (!internal::g_crashpad_client.Get().WaitForHandlerStart()) { On 2016/11/04 21:47:56, Mark Mentovai wrote: > This isn’t valid unless StartHandler() returned true. There’s even a DCHECK() > that this will trip over. Ah good point, I was only considering the async part. I'm going to burn things down rather than try to set bools and continue if the _synchronous_ part of StartHandler() fails. That means that a simple call to CreateThread() very early in the process lifetime failed, implying that the process is totally screwed, so continuing probably isn't worthwhile. So I LOG(FATAL)d above at StartHandler(), and noted the dependency in comments.
+thestig: chrome/ +asvitkine: histograms.xml
lgtm
Works for me. LGTM.
lgtm
The CQ bit was checked by scottmg@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_...)
The CQ bit was checked by scottmg@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by scottmg@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_compile_dbg_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_comp...)
Patchset #4 (id:60001) has been deleted
The CQ bit was checked by scottmg@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_...)
The CQ bit was checked by scottmg@chromium.org to run a CQ dry run
Patchset #4 (id:80001) has been deleted
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: blimp_linux_dbg on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) chromeos_x86-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) chromium_presubmit on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_chromeos_compile_dbg_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_clobber_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
Description was changed from ========== Make Crashpad start asynchronous, and move back to chrome_elf Crashpad initialization has been reworked to support an asynchronous mode where StartHandler() only calls CreateThread() and does not synchronize with that thread, making it safe to use in DllMain(). So, we can now move it back into chrome_elf to catch earlier crashes. We block much later now in browser startup, before a renderer (i.e. another client that would connect to the handler) will be started. This should not be strictly necessary, but is slightly more conservative as a first pass. This allows for error reporting, and prevents log speq from each renderer that starts up and tries to connect to a nonexistent handler. Also added is a UMA timer to see how long we're blocking startup for by joining with the background thread. This includes an effective revert of https://chromium.googlesource.com/chromium/src/+/f3a5670dd8d42b045d31625dde4a... . BUG=655788,656800,565063,656800 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng ========== to ========== Make Crashpad start asynchronous, and move back to chrome_elf Crashpad initialization has been reworked to support an asynchronous mode where StartHandler() only calls CreateThread() and does not synchronize with that thread, making it safe to use in DllMain(). So, we can now move it back into chrome_elf to catch earlier crashes. We block much later now in browser startup, before a renderer (i.e. another client that would connect to the handler) will be started. This should not be strictly necessary, but is slightly more conservative as a first pass. This allows for error reporting, and prevents log spew from each renderer that starts up and tries to connect to a nonexistent handler. Also added is a UMA timer to see how long we're blocking startup for by joining with the background thread. This includes an effective revert of https://chromium.googlesource.com/chromium/src/+/f3a5670dd8d42b045d31625dde4a... . BUG=655788,656800,565063,656800 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng ==========
The CQ bit was checked by scottmg@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
Patchset #5 (id:120001) has been deleted
The CQ bit was checked by scottmg@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
After shaving a few yaks deep, this should finally be able to land, so will CQ if bots look happy.
LGTM
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_...)
The CQ bit was checked by scottmg@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_...)
Patchset #6 (id:160001) has been deleted
The CQ bit was checked by scottmg@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #6 (id:180001) has been deleted
Dry run: Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_...)
On 2016/12/05 19:17:31, scottmg wrote: > After shaving a few yaks deep, this should finally be able to land, so will CQ > if bots look happy. As it turns out there's another yak named ConvertStringSecurityDescriptorToSecurityDescriptor(). It has long hair, and lives in advapi32.dll where we can't call it from chrome_elf during initialization. We need a SECURITY_DESCRIPTOR for "S:(ML;;;;;S-1-16-0)" to create the pipe that's inherited to the handler (see CreateNamedPipeInstance()). Unfortunately, the pipe is currently created during the synchronous part of initialization (i.e. inside DllMain). Allegedly creating a SECURITY_DESCRIPTOR without that yak is possible, but it seems very non-trivial. I'm going to look into that, but we might also need to consider alternate initialization methods.
The CQ bit was checked by scottmg@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Make Crashpad start asynchronous, and move back to chrome_elf Crashpad initialization has been reworked to support an asynchronous mode where StartHandler() only calls CreateThread() and does not synchronize with that thread, making it safe to use in DllMain(). So, we can now move it back into chrome_elf to catch earlier crashes. We block much later now in browser startup, before a renderer (i.e. another client that would connect to the handler) will be started. This should not be strictly necessary, but is slightly more conservative as a first pass. This allows for error reporting, and prevents log spew from each renderer that starts up and tries to connect to a nonexistent handler. Also added is a UMA timer to see how long we're blocking startup for by joining with the background thread. This includes an effective revert of https://chromium.googlesource.com/chromium/src/+/f3a5670dd8d42b045d31625dde4a... . BUG=655788,656800,565063,656800 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng ========== to ========== Make Crashpad start asynchronous, and move back to chrome_elf Crashpad initialization has been reworked to support an asynchronous mode where StartHandler() only calls CreateThread() and does not synchronize with that thread, making it safe to use in DllMain(). So, we can now move it back into chrome_elf to catch earlier crashes. We block much later now in browser startup, before a renderer (i.e. another client that would connect to the handler) will be started. This should not be strictly necessary, but is slightly more conservative as a first pass. This allows for error reporting, and prevents log spew from each renderer that starts up and tries to connect to a nonexistent handler. Also added is a UMA timer to see how long we're blocking startup for by joining with the background thread. This includes an effective revert of https://chromium.googlesource.com/chromium/src/+/f3a5670dd8d42b045d31625dde4a... . BUG=655788,656800,565063 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by scottmg@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from asvitkine@chromium.org, thestig@chromium.org, mark@chromium.org Link to the patchset: https://codereview.chromium.org/2475863004/#ps220001 (title: "rebase part 3")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: cast_shell_android on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/cast_shell_a...)
The CQ bit was checked by scottmg@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_clang on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_clang/builds/...)
The CQ bit was checked by scottmg@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...)
scottmg@chromium.org changed reviewers: + robertshield@chromium.org
+robertshield for chrome_elf/OWNERS
https://codereview.chromium.org/2475863004/diff/220001/chrome/browser/chrome_... File chrome/browser/chrome_browser_main.cc (right): https://codereview.chromium.org/2475863004/diff/220001/chrome/browser/chrome_... chrome/browser/chrome_browser_main.cc:1419: GetProcAddress(chrome_elf, "BlockUntilHandlerStartedImpl")); This isn't in elf's .def file. Should it be?
https://codereview.chromium.org/2475863004/diff/220001/chrome/browser/chrome_... File chrome/browser/chrome_browser_main.cc (right): https://codereview.chromium.org/2475863004/diff/220001/chrome/browser/chrome_... chrome/browser/chrome_browser_main.cc:1419: GetProcAddress(chrome_elf, "BlockUntilHandlerStartedImpl")); On 2016/12/09 01:56:44, robertshield_slow_reviews wrote: > This isn't in elf's .def file. Should it be? We seem to have a mix of __declspec(dllexport) and .def export. I was following the others in the file where BlockUntilHandlerStartedImpl was added, which are in components/... rather than chrome_elf/ I did confirm that it is indeed in the /exports of chrome_elf.dll though.
https://codereview.chromium.org/2475863004/diff/220001/chrome/browser/chrome_... File chrome/browser/chrome_browser_main.cc (right): https://codereview.chromium.org/2475863004/diff/220001/chrome/browser/chrome_... chrome/browser/chrome_browser_main.cc:1419: GetProcAddress(chrome_elf, "BlockUntilHandlerStartedImpl")); On 2016/12/09 20:23:14, scottmg wrote: > On 2016/12/09 01:56:44, robertshield_slow_reviews wrote: > > This isn't in elf's .def file. Should it be? > > We seem to have a mix of __declspec(dllexport) and .def export. I was following > the others in the file where BlockUntilHandlerStartedImpl was added, which are > in components/... rather than chrome_elf/ > > I did confirm that it is indeed in the /exports of chrome_elf.dll though. No worries, just thought it was a bit weird that we have both ways of declaring exports. Might be nice to just use one (would probably pick the declspec approach). FWIW it's also a little odd that a number of the dll exports are called FooImpl but maybe that's fine since chrome.exe and chrome_elf.dll are so tightly coupled. Anyway, this comment feels like nits, feel free to ignore entirely if you'd like. https://codereview.chromium.org/2475863004/diff/220001/chrome/browser/chrome_... chrome/browser/chrome_browser_main.cc:1422: block_until_handler_started(); This is a WaitForSingleObject(.., INFINITE) at Chrome startup. If something goes wrong here does Chrome hang forever or will a watchdog step in and crash the process / send us a minidump? If the former, would it be worth using a non-INFINITE wait instead? I can't see an obvious case in which the wait wouldn't return immediately, but there might be an unobvious case (some 3rd party module's DLL_THREAD_ATTACH taking forever or some such). Maybe this is fine, but figured I'd ask.
The CQ bit was checked by scottmg@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2475863004/diff/220001/chrome/browser/chrome_... File chrome/browser/chrome_browser_main.cc (right): https://codereview.chromium.org/2475863004/diff/220001/chrome/browser/chrome_... chrome/browser/chrome_browser_main.cc:1419: GetProcAddress(chrome_elf, "BlockUntilHandlerStartedImpl")); On 2016/12/09 21:11:47, robertshield_slow_reviews wrote: > On 2016/12/09 20:23:14, scottmg wrote: > > On 2016/12/09 01:56:44, robertshield_slow_reviews wrote: > > > This isn't in elf's .def file. Should it be? > > > > We seem to have a mix of __declspec(dllexport) and .def export. I was > following > > the others in the file where BlockUntilHandlerStartedImpl was added, which are > > in components/... rather than chrome_elf/ > > > > I did confirm that it is indeed in the /exports of chrome_elf.dll though. > > No worries, just thought it was a bit weird that we have both ways of declaring > exports. Might be nice to just use one (would probably pick the declspec > approach). > > FWIW it's also a little odd that a number of the dll exports are called FooImpl > but maybe that's fine since chrome.exe and chrome_elf.dll are so tightly > coupled. > > Anyway, this comment feels like nits, feel free to ignore entirely if you'd > like. Yeah, it's a bit messy. I think "Impl" has been used to just mean "Thunk" or "Helper" or something. We should clean all those up, but I'm going to go with deferring that to a later CL for the purposes of this change. https://codereview.chromium.org/2475863004/diff/220001/chrome/browser/chrome_... chrome/browser/chrome_browser_main.cc:1422: block_until_handler_started(); On 2016/12/09 21:11:47, robertshield_slow_reviews wrote: > This is a WaitForSingleObject(.., INFINITE) at Chrome startup. If something goes > wrong here does Chrome hang forever or will a watchdog step in and crash the > process / send us a minidump? If the former, would it be worth using a > non-INFINITE wait instead? > > I can't see an obvious case in which the wait wouldn't return immediately, but > there might be an unobvious case (some 3rd party module's DLL_THREAD_ATTACH > taking forever or some such). > > Maybe this is fine, but figured I'd ask. Updated so that it waits a maximum of 5s. There's probably still some case where the act of WFSO could be bad if the process is really screwed, but at least a temporary wait is better than an INFINITE wait.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
On 2016/12/13 18:46:59, scottmg wrote: > https://codereview.chromium.org/2475863004/diff/220001/chrome/browser/chrome_... > File chrome/browser/chrome_browser_main.cc (right): > > https://codereview.chromium.org/2475863004/diff/220001/chrome/browser/chrome_... > chrome/browser/chrome_browser_main.cc:1419: GetProcAddress(chrome_elf, > "BlockUntilHandlerStartedImpl")); > On 2016/12/09 21:11:47, robertshield_slow_reviews wrote: > > On 2016/12/09 20:23:14, scottmg wrote: > > > On 2016/12/09 01:56:44, robertshield_slow_reviews wrote: > > > > This isn't in elf's .def file. Should it be? > > > > > > We seem to have a mix of __declspec(dllexport) and .def export. I was > > following > > > the others in the file where BlockUntilHandlerStartedImpl was added, which > are > > > in components/... rather than chrome_elf/ > > > > > > I did confirm that it is indeed in the /exports of chrome_elf.dll though. > > > > No worries, just thought it was a bit weird that we have both ways of > declaring > > exports. Might be nice to just use one (would probably pick the declspec > > approach). > > > > FWIW it's also a little odd that a number of the dll exports are called > FooImpl > > but maybe that's fine since chrome.exe and chrome_elf.dll are so tightly > > coupled. > > > > Anyway, this comment feels like nits, feel free to ignore entirely if you'd > > like. > > Yeah, it's a bit messy. I think "Impl" has been used to just mean "Thunk" or > "Helper" or something. We should clean all those up, but I'm going to go with > deferring that to a later CL for the purposes of this change. > > https://codereview.chromium.org/2475863004/diff/220001/chrome/browser/chrome_... > chrome/browser/chrome_browser_main.cc:1422: block_until_handler_started(); > On 2016/12/09 21:11:47, robertshield_slow_reviews wrote: > > This is a WaitForSingleObject(.., INFINITE) at Chrome startup. If something > goes > > wrong here does Chrome hang forever or will a watchdog step in and crash the > > process / send us a minidump? If the former, would it be worth using a > > non-INFINITE wait instead? > > > > I can't see an obvious case in which the wait wouldn't return immediately, but > > there might be an unobvious case (some 3rd party module's DLL_THREAD_ATTACH > > taking forever or some such). > > > > Maybe this is fine, but figured I'd ask. > > Updated so that it waits a maximum of 5s. There's probably still some case where > the act of WFSO could be bad if the process is really screwed, but at least a > temporary wait is better than an INFINITE wait. Robert, ping?
LGTM, w/ one comment update suggestion https://codereview.chromium.org/2475863004/diff/240001/components/crash/conte... File components/crash/content/app/crashpad_win.cc (right): https://codereview.chromium.org/2475863004/diff/240001/components/crash/conte... components/crash/content/app/crashpad_win.cc:126: // converted to non-fatal, calls to BlockUntilHandlerStarted() will have nit: consider updating the comment about "if this is converted to non-fatal". As discussed we probably don't ever want to do this conversion.
https://codereview.chromium.org/2475863004/diff/240001/components/crash/conte... File components/crash/content/app/crashpad_win.cc (right): https://codereview.chromium.org/2475863004/diff/240001/components/crash/conte... components/crash/content/app/crashpad_win.cc:126: // converted to non-fatal, calls to BlockUntilHandlerStarted() will have On 2016/12/15 20:06:30, robertshield_slow_reviews wrote: > nit: consider updating the comment about "if this is converted to non-fatal". As > discussed we probably don't ever want to do this conversion. Done.
The CQ bit was checked by scottmg@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from mark@chromium.org, thestig@chromium.org, asvitkine@chromium.org, robertshield@chromium.org Link to the patchset: https://codereview.chromium.org/2475863004/#ps260001 (title: "comment")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_...)
The CQ bit was checked by scottmg@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 260001, "attempt_start_ts": 1481918414192480, "parent_rev": "38692e762529c219ec05fec22eac287c08039591", "commit_rev": "1adfa4247a8dab1f850588442258ac1286d12ef7"}
Message was sent while issue was closed.
Description was changed from ========== Make Crashpad start asynchronous, and move back to chrome_elf Crashpad initialization has been reworked to support an asynchronous mode where StartHandler() only calls CreateThread() and does not synchronize with that thread, making it safe to use in DllMain(). So, we can now move it back into chrome_elf to catch earlier crashes. We block much later now in browser startup, before a renderer (i.e. another client that would connect to the handler) will be started. This should not be strictly necessary, but is slightly more conservative as a first pass. This allows for error reporting, and prevents log spew from each renderer that starts up and tries to connect to a nonexistent handler. Also added is a UMA timer to see how long we're blocking startup for by joining with the background thread. This includes an effective revert of https://chromium.googlesource.com/chromium/src/+/f3a5670dd8d42b045d31625dde4a... . BUG=655788,656800,565063 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng ========== to ========== Make Crashpad start asynchronous, and move back to chrome_elf Crashpad initialization has been reworked to support an asynchronous mode where StartHandler() only calls CreateThread() and does not synchronize with that thread, making it safe to use in DllMain(). So, we can now move it back into chrome_elf to catch earlier crashes. We block much later now in browser startup, before a renderer (i.e. another client that would connect to the handler) will be started. This should not be strictly necessary, but is slightly more conservative as a first pass. This allows for error reporting, and prevents log spew from each renderer that starts up and tries to connect to a nonexistent handler. Also added is a UMA timer to see how long we're blocking startup for by joining with the background thread. This includes an effective revert of https://chromium.googlesource.com/chromium/src/+/f3a5670dd8d42b045d31625dde4a... . BUG=655788,656800,565063 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng Review-Url: https://codereview.chromium.org/2475863004 ==========
Message was sent while issue was closed.
Committed patchset #9 (id:260001)
Message was sent while issue was closed.
Description was changed from ========== Make Crashpad start asynchronous, and move back to chrome_elf Crashpad initialization has been reworked to support an asynchronous mode where StartHandler() only calls CreateThread() and does not synchronize with that thread, making it safe to use in DllMain(). So, we can now move it back into chrome_elf to catch earlier crashes. We block much later now in browser startup, before a renderer (i.e. another client that would connect to the handler) will be started. This should not be strictly necessary, but is slightly more conservative as a first pass. This allows for error reporting, and prevents log spew from each renderer that starts up and tries to connect to a nonexistent handler. Also added is a UMA timer to see how long we're blocking startup for by joining with the background thread. This includes an effective revert of https://chromium.googlesource.com/chromium/src/+/f3a5670dd8d42b045d31625dde4a... . BUG=655788,656800,565063 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng Review-Url: https://codereview.chromium.org/2475863004 ========== to ========== Make Crashpad start asynchronous, and move back to chrome_elf Crashpad initialization has been reworked to support an asynchronous mode where StartHandler() only calls CreateThread() and does not synchronize with that thread, making it safe to use in DllMain(). So, we can now move it back into chrome_elf to catch earlier crashes. We block much later now in browser startup, before a renderer (i.e. another client that would connect to the handler) will be started. This should not be strictly necessary, but is slightly more conservative as a first pass. This allows for error reporting, and prevents log spew from each renderer that starts up and tries to connect to a nonexistent handler. Also added is a UMA timer to see how long we're blocking startup for by joining with the background thread. This includes an effective revert of https://chromium.googlesource.com/chromium/src/+/f3a5670dd8d42b045d31625dde4a... . BUG=655788,656800,565063 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng Committed: https://crrev.com/be0cfa14d77c72864a74d2bcc7910b0b31b7eecb Cr-Commit-Position: refs/heads/master@{#439188} ==========
Message was sent while issue was closed.
Patchset 9 (id:??) landed as https://crrev.com/be0cfa14d77c72864a74d2bcc7910b0b31b7eecb Cr-Commit-Position: refs/heads/master@{#439188} |