New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 1
Type: Bug

Blocked on:
issue 567850



Sign in to add a comment
link

Issue 656800: Repair damage done to early crash reporting in https://bugs.chromium.org/p/chromium/issues/detail?id=655788

Reported by scottmg@chromium.org, Oct 17 2016 Project Member

Issue description

In the process of investigating https://bugs.chromium.org/p/chromium/issues/detail?id=655788 it was discovered that crashpad_handler.exe is launched from within DllMain() via CreateProcess(). (Or rather, chrome.exe --type=crashpad-handler in this case.)

This is specifically documented as being disallowed here: https://msdn.microsoft.com/en-us/library/windows/desktop/dn633971(v=vs.85).aspx.

DllMain() has the loader lock, so if CreateProcess() loads a dll, it's likely going to deadlock. It's surprising that it worked at all, but unfortunately only deadlocked when:

"""
Open gpedit.msc, navigate to Computer Configuration -> Windows Settings -> Security Settings -> Software Restriction Policies

On the Software Restriction Policies node right click and select to "New Software Restriction Policies". 

Under Software Restriction Policies open the Enforcement entry, and enable "Enforce certificate rules". 
"""

was in effect.

As a temporary solution for M54, https://codereview.chromium.org/2428703002/ deferred crashpad_handler.exe launch until later (to WinMain()) but this defeats the purpose of early crash handling, going back to a normal register-in-main() style handler.

It isn't sufficient to just CreateThread() the main initialization in chrome_elf because chrome.dll in the browser process thunks back in to chrome_elf to set those darn crash keys. If the initialization is deferred, then the dictionary isn't initialized so we're racing that thread.

We should meet and figure out the best way to solve this for M55.
 

Comment 1 by scottmg@chromium.org, Oct 18 2016

We had discussed different startup methods related to

https://bugs.chromium.org/p/chromium/issues/detail?id=565063

and a proposal in https://bugs.chromium.org/p/chromium/issues/detail?id=567850 summarized in https://bugs.chromium.org/p/chromium/issues/detail?id=567850#c10.

So if we, in process in the browser in chrome_elf DllMain():
  1) set up the UnhandledExceptionFilter and;
  2) create the signalling events
  3) call CreateThread() that calls CreateProcess() to start the handler, doesn't synchronize with that new thread, and passes the events to the handler process via inheritance
  4) continues on and does the rest of the chrome_elf in process initialization

Then:
- we won't be calling CreateProcess() in DllMain()
- will have the various globals initialized for chrome by the time it gets to thunking back into chrome_elf (to set crash keys for example)
- if there's an early crash, the browser or chrome_elf will or whatever will still signal the events, and then go to sleep, so when the handler "eventually" starts up, it should receive the signal and capture the dump.

We could also move the CreateProcess() later to be less "sneaky" in chrome_elf, but that'd mean that the handler might not get started if we crash before we get to where it gets launched, so we still want to kick off that CreateProcess as early as possible, I think.

Does that sound believable to anyone?

Comment 2 by scottmg@chromium.org, Oct 18 2016

Blockedon: 567850

Comment 3 by bugdroid1@chromium.org, Oct 18 2016

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f3a5670dd8d42b045d31625dde4a2561b471138f

commit f3a5670dd8d42b045d31625dde4a2561b471138f
Author: scottmg <scottmg@chromium.org>
Date: Tue Oct 18 01:01:21 2016

Signal chrome_elf to initialize crash reporting, rather than doing it in DllMain

Currently, initialization crash reporting indirectly calls
CreateProcess() from chrome_elf's DllMain(), which causes deadlock in
some configurations (showing up in M54).

Instead, signal to chrome_elf that it should initialize crash reporting
later in WinMain(). This means we lose a little coverage that we were
hoping to gain from the move to chrome_elf, but a localized fix is
required for merge to stable.

Follow up bug is  https://crbug.com/656800 .

BUG= 655788 ,  656800 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng
TEST=enforce certificate rules per https://bugs.chromium.org/p/chromium/issues/detail?id=655788#c57 and then try to launch chrome.

Review-Url: https://codereview.chromium.org/2428703002
Cr-Commit-Position: refs/heads/master@{#425840}

[modify] https://crrev.com/f3a5670dd8d42b045d31625dde4a2561b471138f/chrome/app/chrome_exe_main_win.cc
[modify] https://crrev.com/f3a5670dd8d42b045d31625dde4a2561b471138f/chrome_elf/chrome_elf.def
[modify] https://crrev.com/f3a5670dd8d42b045d31625dde4a2561b471138f/chrome_elf/chrome_elf_main.cc
[modify] https://crrev.com/f3a5670dd8d42b045d31625dde4a2561b471138f/chrome_elf/chrome_elf_main.h

Comment 4 by bugdroid1@chromium.org, Oct 18 2016

Project Member
Labels: merge-merged-2840
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0aa889d7b478450c71133081216ccefbd645ba30

commit 0aa889d7b478450c71133081216ccefbd645ba30
Author: Scott Graham <scottmg@chromium.org>
Date: Tue Oct 18 23:13:23 2016

Signal chrome_elf to initialize crash reporting, rather than doing it in DllMain

Currently, initialization crash reporting indirectly calls
CreateProcess() from chrome_elf's DllMain(), which causes deadlock in
some configurations (showing up in M54).

Instead, signal to chrome_elf that it should initialize crash reporting
later in WinMain(). This means we lose a little coverage that we were
hoping to gain from the move to chrome_elf, but a localized fix is
required for merge to stable.

Follow up bug is  https://crbug.com/656800 .

BUG= 655788 ,  656800 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng
TEST=enforce certificate rules per https://bugs.chromium.org/p/chromium/issues/detail?id=655788#c57 and then try to launch chrome.

Review-Url: https://codereview.chromium.org/2428703002
Cr-Commit-Position: refs/heads/master@{#425840}
(cherry picked from commit f3a5670dd8d42b045d31625dde4a2561b471138f)

Review URL: https://codereview.chromium.org/2431483004 .

Cr-Commit-Position: refs/branch-heads/2840@{#754}
Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607}

[modify] https://crrev.com/0aa889d7b478450c71133081216ccefbd645ba30/chrome/app/chrome_exe_main_win.cc
[modify] https://crrev.com/0aa889d7b478450c71133081216ccefbd645ba30/chrome_elf/chrome_elf.def
[modify] https://crrev.com/0aa889d7b478450c71133081216ccefbd645ba30/chrome_elf/chrome_elf_main.cc
[modify] https://crrev.com/0aa889d7b478450c71133081216ccefbd645ba30/chrome_elf/chrome_elf_main.h

Comment 5 by bugdroid1@chromium.org, Oct 19 2016

Project Member
Labels: merge-merged-2883
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ee677d8266a689f574f3d59ce10077c84dedb6a5

commit ee677d8266a689f574f3d59ce10077c84dedb6a5
Author: Scott Graham <scottmg@chromium.org>
Date: Wed Oct 19 22:26:09 2016

Signal chrome_elf to initialize crash reporting, rather than doing it in DllMain

Currently, initialization crash reporting indirectly calls
CreateProcess() from chrome_elf's DllMain(), which causes deadlock in
some configurations (showing up in M54).

Instead, signal to chrome_elf that it should initialize crash reporting
later in WinMain(). This means we lose a little coverage that we were
hoping to gain from the move to chrome_elf, but a localized fix is
required for merge to stable.

Follow up bug is  https://crbug.com/656800 .

BUG= 655788 ,  656800 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng
TEST=enforce certificate rules per https://bugs.chromium.org/p/chromium/issues/detail?id=655788#c57 and then try to launch chrome.

Review-Url: https://codereview.chromium.org/2428703002
Cr-Commit-Position: refs/heads/master@{#425840}
(cherry picked from commit f3a5670dd8d42b045d31625dde4a2561b471138f)

Review URL: https://codereview.chromium.org/2437903002 .

Cr-Commit-Position: refs/branch-heads/2883@{#198}
Cr-Branched-From: 614d31daee2f61b0180df403a8ad43f20b9f6dd7-refs/heads/master@{#423768}

[modify] https://crrev.com/ee677d8266a689f574f3d59ce10077c84dedb6a5/chrome/app/chrome_exe_main_win.cc
[modify] https://crrev.com/ee677d8266a689f574f3d59ce10077c84dedb6a5/chrome_elf/chrome_elf.def
[modify] https://crrev.com/ee677d8266a689f574f3d59ce10077c84dedb6a5/chrome_elf/chrome_elf_main.cc
[modify] https://crrev.com/ee677d8266a689f574f3d59ce10077c84dedb6a5/chrome_elf/chrome_elf_main.h

Comment 6 by bugdroid1@chromium.org, Oct 21 2016

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/crashpad/crashpad.git/+/2d87606bb56bb00ed78ae17f334d7e65af11bcc0

commit 2d87606bb56bb00ed78ae17f334d7e65af11bcc0
Author: Scott Graham <scottmg@chromium.org>
Date: Fri Oct 21 20:08:18 2016

win: Start crashpad_handler by inheriting connection data to it

Previously, StartHandler() launched the handler process, then connected
over a pipe to register for crash handling. Instead, the initial client
can create and inherit handles to the handler and pass those handle
values and other data (addresses, etc.) on the command line.

This should improve startup time as there's no need to synchronize with
the process at startup, and allows avoiding a call to CreateProcess()
directly in StartHandler(), which is important for registration for
crash reporting from DllMain().

Incidentally adds new utility functions for string/number conversion and
string splitting.

Note: API change; UseHandler() is removed for all platforms.

BUG= chromium:567850 , chromium:656800 

Change-Id: I1602724183cb107f805f109674c53e95841b24fd
Reviewed-on: https://chromium-review.googlesource.com/400015
Reviewed-by: Mark Mentovai <mark@chromium.org>

[modify] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/client/crashpad_client.h
[modify] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/client/crashpad_client_mac.cc
[modify] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/client/crashpad_client_win.cc
[modify] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/client/crashpad_client_win_test.cc
[modify] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/handler/crashpad_handler.ad
[modify] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/handler/handler_main.cc
[modify] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/handler/win/crash_other_program.cc
[modify] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/handler/win/crashy_test_program.cc
[modify] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/handler/win/crashy_test_z7_loader.cc
[modify] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/handler/win/hanging_program.cc
[modify] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/handler/win/self_destroying_test_program.cc
[modify] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/snapshot/win/crashpad_snapshot_test_crashing_child.cc
[modify] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/snapshot/win/crashpad_snapshot_test_dump_without_crashing.cc
[modify] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/snapshot/win/end_to_end_test.py
[modify] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/snapshot/win/exception_snapshot_win_test.cc
[modify] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/test/win/win_child_process.cc
[modify] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/tools/mac/run_with_crashpad.cc
[modify] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/util/stdlib/string_number_conversion.cc
[modify] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/util/stdlib/string_number_conversion.h
[modify] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/util/string/split_string.cc
[modify] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/util/string/split_string.h
[modify] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/util/string/split_string_test.cc
[modify] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/util/util.gyp
[modify] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/util/util_test.gyp
[modify] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/util/win/exception_handler_server.cc
[modify] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/util/win/exception_handler_server.h
[modify] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/util/win/exception_handler_server_test.cc
[add] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/util/win/initial_client_data.cc
[add] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/util/win/initial_client_data.h
[add] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/util/win/initial_client_data_test.cc
[modify] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/util/win/registration_protocol_win.cc
[modify] https://crrev.com/2d87606bb56bb00ed78ae17f334d7e65af11bcc0/util/win/registration_protocol_win.h

Comment 7 by bugdroid1@chromium.org, Oct 22 2016

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/crashpad/crashpad.git/+/cc0b7deef27d8e56b1fb7b871e66af89991d711d

commit cc0b7deef27d8e56b1fb7b871e66af89991d711d
Author: Scott Graham <scottmg@chromium.org>
Date: Fri Oct 21 23:11:52 2016

Get VS2013 compilation working again for Crashpad

Follow up #1 to https://chromium-review.googlesource.com/c/400015/,
still pending further discussion on details of registration.

R=mark@chromium.org
BUG= chromium:567850 , chromium:656800 

Change-Id: Idfee3a3241d7cfe418fbf9e40f17f35e5dbefac9
Reviewed-on: https://chromium-review.googlesource.com/401182
Reviewed-by: Mark Mentovai <mark@chromium.org>

[modify] https://crrev.com/cc0b7deef27d8e56b1fb7b871e66af89991d711d/util/win/initial_client_data.h

Comment 8 by bugdroid1@chromium.org, Oct 27 2016

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ee677d8266a689f574f3d59ce10077c84dedb6a5

commit ee677d8266a689f574f3d59ce10077c84dedb6a5
Author: Scott Graham <scottmg@chromium.org>
Date: Wed Oct 19 22:26:09 2016

Signal chrome_elf to initialize crash reporting, rather than doing it in DllMain

Currently, initialization crash reporting indirectly calls
CreateProcess() from chrome_elf's DllMain(), which causes deadlock in
some configurations (showing up in M54).

Instead, signal to chrome_elf that it should initialize crash reporting
later in WinMain(). This means we lose a little coverage that we were
hoping to gain from the move to chrome_elf, but a localized fix is
required for merge to stable.

Follow up bug is  https://crbug.com/656800 .

BUG= 655788 ,  656800 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng
TEST=enforce certificate rules per https://bugs.chromium.org/p/chromium/issues/detail?id=655788#c57 and then try to launch chrome.

Review-Url: https://codereview.chromium.org/2428703002
Cr-Commit-Position: refs/heads/master@{#425840}
(cherry picked from commit f3a5670dd8d42b045d31625dde4a2561b471138f)

Review URL: https://codereview.chromium.org/2437903002 .

Cr-Commit-Position: refs/branch-heads/2883@{#198}
Cr-Branched-From: 614d31daee2f61b0180df403a8ad43f20b9f6dd7-refs/heads/master@{#423768}

[modify] https://crrev.com/ee677d8266a689f574f3d59ce10077c84dedb6a5/chrome/app/chrome_exe_main_win.cc
[modify] https://crrev.com/ee677d8266a689f574f3d59ce10077c84dedb6a5/chrome_elf/chrome_elf.def
[modify] https://crrev.com/ee677d8266a689f574f3d59ce10077c84dedb6a5/chrome_elf/chrome_elf_main.cc
[modify] https://crrev.com/ee677d8266a689f574f3d59ce10077c84dedb6a5/chrome_elf/chrome_elf_main.h

Comment 9 by bugdroid1@chromium.org, Oct 27 2016

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0aa889d7b478450c71133081216ccefbd645ba30

commit 0aa889d7b478450c71133081216ccefbd645ba30
Author: Scott Graham <scottmg@chromium.org>
Date: Tue Oct 18 23:13:23 2016

Signal chrome_elf to initialize crash reporting, rather than doing it in DllMain

Currently, initialization crash reporting indirectly calls
CreateProcess() from chrome_elf's DllMain(), which causes deadlock in
some configurations (showing up in M54).

Instead, signal to chrome_elf that it should initialize crash reporting
later in WinMain(). This means we lose a little coverage that we were
hoping to gain from the move to chrome_elf, but a localized fix is
required for merge to stable.

Follow up bug is  https://crbug.com/656800 .

BUG= 655788 ,  656800 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng
TEST=enforce certificate rules per https://bugs.chromium.org/p/chromium/issues/detail?id=655788#c57 and then try to launch chrome.

Review-Url: https://codereview.chromium.org/2428703002
Cr-Commit-Position: refs/heads/master@{#425840}
(cherry picked from commit f3a5670dd8d42b045d31625dde4a2561b471138f)

Review URL: https://codereview.chromium.org/2431483004 .

Cr-Commit-Position: refs/branch-heads/2840@{#754}
Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607}

[modify] https://crrev.com/0aa889d7b478450c71133081216ccefbd645ba30/chrome/app/chrome_exe_main_win.cc
[modify] https://crrev.com/0aa889d7b478450c71133081216ccefbd645ba30/chrome_elf/chrome_elf.def
[modify] https://crrev.com/0aa889d7b478450c71133081216ccefbd645ba30/chrome_elf/chrome_elf_main.cc
[modify] https://crrev.com/0aa889d7b478450c71133081216ccefbd645ba30/chrome_elf/chrome_elf_main.h

Comment 10 by scottmg@chromium.org, Nov 2 2016

Labels: Postmortem-Followup

Comment 11 by bugdroid1@chromium.org, Nov 2 2016

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/crashpad/crashpad.git/+/76ef9b5c2b00cb982ad9676b880c3b76ecb15e72

commit 76ef9b5c2b00cb982ad9676b880c3b76ecb15e72
Author: Scott Graham <scottmg@chromium.org>
Date: Wed Nov 02 21:24:21 2016

win: Address failure-to-start-handler case for async startup

Second follow up to https://chromium-review.googlesource.com/c/400015/

The ideal would be that if we fail to start the handler, then we don't
end up passing through our unhandled exception filter at all.

In the case of the non-initial client (i.e. renderers) we can do this by
not setting our UnhandledExceptionFilter until after we know we've
connected successfully (because those connections are synchronous from
its point of view). We also change WaitForNamedPipe in the connection
message to block forever, so as long as the precreated pipe exists,
they'll wait to connect. After the initial client has passed the server
side of that pipe to the handler, the handler has the only handle to it.
So, if the handler has disappeared for whatever reason, pipe-connecting
clients will fail with FILE_NOT_FOUND, and will not stick around in the
connection loop. This means non-initial clients do not need additional
logic to avoid getting stuck in our UnhandledExceptionFilter.

For the initial client, it would be ideal to avoid passing through our
UEF too, but none of the 3 options are great:
1. Block until we find out if we started, and then install the filter.
   We don't want to do that, because we don't want to wait.
2. Restore the old filter if it turns out we failed to start. We can't
   do that because Chrome disables ::SetUnhandledExceptionFilter()
   immediately after StartHandler/SetHandlerIPCPipe returns.
3. Don't install our filter until we've successfully started. We don't
   want to do that because we'd miss early crashes, negating the benefit
   of deferred startup.

So, we do need to pass through our UnhandledExceptionFilter. I don't
want more Win32 API calls during the vulnerable filter function. So, at
any point during async startup where there's a failure, set a global
atomic that allows the filter function to abort without trying to signal
a handler that's known to not exist.

One further improvement we might want to look at is unexpected
termination of the handler (as opposed to a failure to start) which
would still result in a useless Sleep(60s). This isn't new behaviour,
but now we have a clear thing to do if we detect the handler is gone.

(Also a missing DWORD/size_t cast for the _x64 bots.)

R=mark@chromium.org
BUG= chromium:567850 , chromium:656800 

Change-Id: I5be831ca39bd8b2e5c962b9647c8bd469e2be878
Reviewed-on: https://chromium-review.googlesource.com/400985
Reviewed-by: Mark Mentovai <mark@chromium.org>

[modify] https://crrev.com/76ef9b5c2b00cb982ad9676b880c3b76ecb15e72/client/crashpad_client_win.cc
[modify] https://crrev.com/76ef9b5c2b00cb982ad9676b880c3b76ecb15e72/util/win/exception_handler_server.cc
[modify] https://crrev.com/76ef9b5c2b00cb982ad9676b880c3b76ecb15e72/util/win/registration_protocol_win.cc
[modify] https://crrev.com/76ef9b5c2b00cb982ad9676b880c3b76ecb15e72/util/win/registration_protocol_win.h

Comment 12 by durga.behera@chromium.org, Nov 3 2016

Labels: TE-NeedsTriageHelp
Added TE-NeedsTriageHelp as it can't be triaged from TE end.
Anyhow the reference issue in the Subject line is already verified.

Comment 14 by bugdroid1@chromium.org, Nov 4 2016

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a

commit 7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a
Author: scottmg <scottmg@chromium.org>
Date: Fri Nov 04 19:51:28 2016

Update Crashpad to b47bf6c250c6b825dee1c5fbad9152c2c962e828

2d87606bb56b win: Start crashpad_handler by inheriting connection data
             to it
cc0b7deef27d Get VS2013 compilation working again for Crashpad
f735d050c487 Port the util library to Linux
e956a8252fc1 Port the util library to Android
d5a759c900ae Update mini_chromium to 8e8d3cc9a245
d1aafe78ea46 Port the test library and crashpad_test_test to
             Linux/Android
b978b03fa188 Port most of crashpad_util_test to Linux/Android
c2814e251912 Don't throttle explicitly requested uploads
fd751f4708cc Correct StringToUnsignedInt[64]()
e7bd798af438 Update build/test and status documentation to reflect
             Android
e616638c9d87 Replace Rietveld with Gerrit in the developer documentation
47a830465f78 Port the minidump library to Android and ARM
88e3b6b02271 Omit platform-specific assembler source from builds as
             needed
96b9857aceb4 Fix the crashpad_minidump library for 32-bit ARM
c55e49c13d5c doc: Remove errant parenthesis
76ef9b5c2b00 win: Address failure-to-start-handler case for async
             startup
55ba6b67801b break; after handling --initial-client-data on command line
bb7d249d65a1 Partially port the crashpad_client library to Linux/Android
375082098deb mac: Fix tests on 10.12.1
c4cdec3d72a2 Handle non-crashing cases for server failure to start
b47bf6c250c6 Fix tests when running on Win10

Also update .GN files, and adapt Chrome side code for changes in API.
Only the first three files are modified here, the rest are unmodified
from upstream Crashpad repo.

This does not yet make handler startup asynchronous, or move it back to
chrome_elf. Those will be done in smaller followup CLs.

R=mark@chromium.org
TBR=rsesek
BUG= 660955 ,565063, 656800 , 655788 

Review-Url: https://codereview.chromium.org/2478633002
Cr-Commit-Position: refs/heads/master@{#429983}

[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/build/secondary/third_party/crashpad/crashpad/util/BUILD.gn
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/components/crash/content/app/crashpad_mac.mm
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/components/crash/content/app/crashpad_win.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/README.chromium
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/DEPS
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/client/client.gyp
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/client/crashpad_client.h
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/client/crashpad_client_mac.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/client/crashpad_client_win.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/client/crashpad_client_win_test.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/client/crashpad_info.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/doc/developing.ad
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/doc/status.ad
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/handler/crashpad_handler.ad
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/handler/handler.gyp
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/handler/handler_main.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/handler/win/crash_other_program.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/handler/win/crashy_test_program.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/handler/win/crashy_test_z7_loader.cc
[add] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/handler/win/fake_handler_that_crashes_at_startup.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/handler/win/hanging_program.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/handler/win/self_destroying_test_program.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/snapshot/mac/mach_o_image_annotations_reader_test.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/snapshot/mac/mach_o_image_reader.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/snapshot/mac/mach_o_image_reader.h
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/snapshot/mac/process_types/crashpad_info.proctype
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/snapshot/module_snapshot.h
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/snapshot/win/crashpad_snapshot_test_crashing_child.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/snapshot/win/crashpad_snapshot_test_dump_without_crashing.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/snapshot/win/end_to_end_test.py
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/snapshot/win/exception_snapshot_win_test.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/test/multiprocess_exec_posix.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/test/multiprocess_exec_test_child.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/test/multiprocess_posix_test.cc
[add] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/test/paths_linux.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/test/paths_mac.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/test/paths_win.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/test/scoped_temp_dir_posix.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/test/test.gyp
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/test/win/win_child_process.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/tools/mac/run_with_crashpad.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/util/file/file_writer.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/util/misc/clock_test.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/util/misc/metrics.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/util/misc/uuid.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/util/numeric/checked_address_range_test.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/util/posix/close_multiple.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/util/posix/drop_privileges.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/util/posix/process_info.h
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/util/posix/process_info_test.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/util/posix/symbolic_constants_posix.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/util/posix/symbolic_constants_posix_test.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/util/stdlib/string_number_conversion.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/util/stdlib/string_number_conversion.h
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/util/string/split_string.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/util/string/split_string.h
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/util/string/split_string_test.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/util/thread/thread_log_messages.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/util/util.gyp
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/util/util_test.gyp
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/util/win/exception_handler_server.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/util/win/exception_handler_server.h
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/util/win/exception_handler_server_test.cc
[add] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/util/win/initial_client_data.cc
[add] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/util/win/initial_client_data.h
[add] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/util/win/initial_client_data_test.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/util/win/registration_protocol_win.cc
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/util/win/registration_protocol_win.h
[modify] https://crrev.com/7b9234c4b2a7f4f4fa84c80ecb22d41c54899f6a/third_party/crashpad/crashpad/util/win/termination_codes.h

Comment 15 by scottmg@chromium.org, Nov 4 2016

Owner: scottmg@chromium.org
Status: Started (was: Unconfirmed)

Comment 16 by bugdroid1@chromium.org, Dec 2 2016

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/56c90a89889693bd6e1a7d7bb4b8f49c69bab2fd

commit 56c90a89889693bd6e1a7d7bb4b8f49c69bab2fd
Author: scottmg <scottmg@chromium.org>
Date: Fri Dec 02 21:52:49 2016

win64: fix lookup of RtlAddFunctionTable() helper for v8

This helper function moved from chrome.exe to chrome_elf. The failure to
look up is unfortunately silent because the same code is used in test
binaries. As a result, RtlAddFunctionTable() wasn't called, so any
crashes with v8 jit on the stack on Win x64 caused program termination
without giving our crash handler a chance to catch it.

R=thakis@chromium.org, jochen@chromium.org
BUG=670466, 656800 ,604923,v8:3598

Review-Url: https://codereview.chromium.org/2548653004
Cr-Commit-Position: refs/heads/master@{#436041}

[modify] https://crrev.com/56c90a89889693bd6e1a7d7bb4b8f49c69bab2fd/chrome/common/v8_breakpad_support_win.cc

Comment 17 by bugdroid1@chromium.org, Dec 7 2016

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/crashpad/crashpad.git/+/5b83e58771e25f7e7c8c84e854defa8f464457a2

commit 5b83e58771e25f7e7c8c84e854defa8f464457a2
Author: Scott Graham <scottmg@chromium.org>
Date: Wed Dec 07 19:35:07 2016

win: Remove use of rpcrt4 and advapi32 from some util code

ConvertStringSecurityDescriptorToSecurityDescriptor() is used when
creating the initial connection pipe. Because this is done from inside
DllMain(), we cannot use advapi32 (where this function is). Instead,
save the binary representation of the self-relative SECURITY_DESCRIPTOR.
It is conceivable that this could change, but unlikely as this is the
same blob that would be stored on a file in NTFS.

Another potential approach would be to not make the pipe available to
all integrity levels here, and instead modify the Chromium sandbox code
to allow a specific pipe name prefix that would have to correspond with
the pipe name that Crashpad creates.

Similarly, UuidCreate() (used when initializing the database) is in a
DLL that can't be loaded early, so use the Linux/Android implementation
on Windows too.

R=mark@chromium.org
BUG= chromium:655788 , chromium:656800 

Change-Id: I434f8e96fc275fc30d0a31208b025bfc08595ff9
Reviewed-on: https://chromium-review.googlesource.com/417223
Reviewed-by: Mark Mentovai <mark@chromium.org>

[modify] https://crrev.com/5b83e58771e25f7e7c8c84e854defa8f464457a2/util/misc/uuid.cc
[modify] https://crrev.com/5b83e58771e25f7e7c8c84e854defa8f464457a2/util/util.gyp
[modify] https://crrev.com/5b83e58771e25f7e7c8c84e854defa8f464457a2/util/util_test.gyp
[modify] https://crrev.com/5b83e58771e25f7e7c8c84e854defa8f464457a2/util/win/registration_protocol_win.cc
[modify] https://crrev.com/5b83e58771e25f7e7c8c84e854defa8f464457a2/util/win/registration_protocol_win.h
[add] https://crrev.com/5b83e58771e25f7e7c8c84e854defa8f464457a2/util/win/registration_protocol_win_test.cc

Comment 18 by mark@chromium.org, Dec 7 2016

I sense a roll coming…

Comment 19 by scottmg@chromium.org, Dec 7 2016

Some of those arraysize/offsetofs break VS2013, so one more fiddly CL before the roll...

Comment 20 by bugdroid1@chromium.org, Dec 7 2016

Project Member

Comment 21 by bugdroid1@chromium.org, Dec 8 2016

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/crashpad/crashpad.git/+/32981a3ee9d7c2769fb27afa038fe2e194cfa329

commit 32981a3ee9d7c2769fb27afa038fe2e194cfa329
Author: Scott Graham <scottmg@chromium.org>
Date: Thu Dec 08 17:58:46 2016

win: Fix clang warning in SECURITY_DESCRIPTOR construction

c:\src\cr\src\third_party\crashpad\crashpad\util\win\registration_protocol_win.cc(193,23):  error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
                      SECURITY_MANDATORY_LABEL_AUTHORITY,
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
c:\src\depot_tools\win_toolchain\vs_files\d5dc33b15d1b2c086f2f6632e2fd15882f80dbd3\win_sdk\Include\10.0.10586.0\um\winnt.h(9068,54):  note: expanded from macro 'SECURITY_MANDATORY_LABEL_AUTHORITY'
                                                     ^~~~~~~~~~~~
1 error generated.

R=mark@chromium.org
BUG= chromium:656800 

Change-Id: I1121a42ca98d8a7432e247d4b44a9ad1214d4b39
Reviewed-on: https://chromium-review.googlesource.com/418010
Reviewed-by: Mark Mentovai <mark@chromium.org>

[modify] https://crrev.com/32981a3ee9d7c2769fb27afa038fe2e194cfa329/util/win/registration_protocol_win.cc

Comment 22 by bugdroid1@chromium.org, Dec 8 2016

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e585bac3b48a1fd12eb7a85ad3d94d823306117f

commit e585bac3b48a1fd12eb7a85ad3d94d823306117f
Author: scottmg <scottmg@chromium.org>
Date: Thu Dec 08 22:45:48 2016

Update Crashpad to 32981a3ee9d7c2769fb27afa038fe2e194cfa329

0c41b1549667 Convert AsciiDoc documentation to Markdown
3830e4e5c145 Update the link to mini_chromium’s README
6753ba5a5a9a catch_exception_tool.md: fix on_demand_service_tool link
             text
05c89beaae4e doc: Another silly follow-up
1f2a2c82c6b2 doc: Small updates after Markdown migration
f5e869c51f4e doc: Check in the man page index instead of generating it
8e3e65178a1d Update Doxyfile to 1.8.12
952f787f4aab doc: Standardize on “macOS” in comments
acabe35928f5 doc: Fix all Doxygen warnings, cleaning up some generated
             documentation
ac2e7cfbb2da doc: Make Doxygen-generated HTML interface documentation
             prettier
f191fff64dd3 doc: Fix bad merge resulting in twin “Man Pages” links
             in nav bar
dd4859965f90 Update compat version of winnt.h to 10.0.14393.0 SDK
             (Windows 10 1607)
5c44f1d14f1c Indicate rdtscp availability in MINIDUMP_SYSTEM_INFO of
             x86_64 minidumps
3abde199a712 minidump: fix tests to expect new rdtscp bit after
             5c44f1d14f1c
741c9cc51ea3 mac: Deal with bootstrap_look_up() race encountered on
             10.12.1
1382618fbe00 Provide backup #defines for things introduced in SDK
             10.0.10240.0
dd85381a32dd GCC fix: Disable -Wmultichar warning throughout Crashpad
5b14b419925f GCC fix: Don’t name a method exactly the same as its
             return type
57b2210ed75d GCC fix: Make UUID POD
f83530bf9a0b GCC fix: Don’t use arraysize() on packed structs
72fbc56e58d3 MSVC++ fix: Don’t declare local[0] arrays for
             ARRAYSIZE_UNSAFE test
b37aa95da79c MSVC++ fix: ALLOW_UNUSED_LOCAL variables only used in
             static_assert
f09d0cde00a1 Improve time handling and error checking
5a21fc157380 Fix Windows build after f09d0cde00a1
8b3eec83e982 win: Add signal handler for SIGABRT to handle abort() calls
68095b6a4e61 Don't LOG(ERROR) for usage, and fix VS2013 build after
             8b3eec8
777634b1ebad Use ADDRESS_SANITIZER instead of
             __has_feature(address_sanitizer)
5b83e58771e2 win: Remove use of rpcrt4 and advapi32 from some util code
f94dd14c45ea win: fix SECURITY_DESCRIPTOR builder on vs2013
556c4e4f5045 Have crashpad call ASan's crash handler if present
f66d5df30cb8 Roll mini_chromium to de1afb0
6b09b08a2202 Update util/file/string_file.cc for new base/numerics API
32981a3ee9d7 win: Fix clang warning in SECURITY_DESCRIPTOR construction

Updated build/secondary GN files to match .gyp changes.

BUG= 656800 
R=mark@chromium.org

Review-Url: https://codereview.chromium.org/2555353002
Cr-Commit-Position: refs/heads/master@{#437376}

[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/build/secondary/third_party/crashpad/crashpad/util/BUILD.gn
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/components/browser_watcher/postmortem_minidump_writer_win_unittest.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/components/browser_watcher/postmortem_report_collector_unittest.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/README.chromium
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/DEPS
[add] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/README.md
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/build/crashpad.gypi
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/client/capture_context_mac_test.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/client/crashpad_client.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/client/crashpad_client_win.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/client/crashpad_info.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/client/crashpad_info.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/client/prune_crash_reports.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/client/settings.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/compat/mac/mach-o/getsect.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/compat/non_win/dbghelp.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/compat/non_win/winnt.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/compat/win/winnt.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/doc/appengine/README
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/doc/appengine/main.go
[delete] https://crrev.com/86a6788070f1872e7136d6c1ebe0a0d35e4a2e1c/third_party/crashpad/crashpad/doc/developing.ad
[add] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/doc/developing.md
[delete] https://crrev.com/86a6788070f1872e7136d6c1ebe0a0d35e4a2e1c/third_party/crashpad/crashpad/doc/index.ad
[add] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/doc/man.md
[delete] https://crrev.com/86a6788070f1872e7136d6c1ebe0a0d35e4a2e1c/third_party/crashpad/crashpad/doc/status.ad
[add] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/doc/status.md
[delete] https://crrev.com/86a6788070f1872e7136d6c1ebe0a0d35e4a2e1c/third_party/crashpad/crashpad/doc/support/asciidoc.conf
[delete] https://crrev.com/86a6788070f1872e7136d6c1ebe0a0d35e4a2e1c/third_party/crashpad/crashpad/doc/support/asciidoc.css
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/doc/support/crashpad.doxy
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/doc/support/crashpad.doxy.h
[add] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/doc/support/crashpad_doxygen.css
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/doc/support/generate.sh
[delete] https://crrev.com/86a6788070f1872e7136d6c1ebe0a0d35e4a2e1c/third_party/crashpad/crashpad/doc/support/generate_asciidoc.sh
[delete] https://crrev.com/86a6788070f1872e7136d6c1ebe0a0d35e4a2e1c/third_party/crashpad/crashpad/doc/support/man_footer.ad
[delete] https://crrev.com/86a6788070f1872e7136d6c1ebe0a0d35e4a2e1c/third_party/crashpad/crashpad/handler/crashpad_handler.ad
[add] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/handler/crashpad_handler.md
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/handler/handler.gyp
[add] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/handler/win/crashy_signal.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/minidump/minidump_exception_writer.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/minidump/minidump_extensions.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/minidump/minidump_module_crashpad_info_writer.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/minidump/minidump_simple_string_dictionary_writer.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/minidump/minidump_simple_string_dictionary_writer.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/minidump/minidump_system_info_writer.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/minidump/minidump_system_info_writer_test.cc
[add] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/navbar.md
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/snapshot/capture_memory.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/snapshot/cpu_context.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/snapshot/exception_snapshot.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/snapshot/mac/cpu_context_mac.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/snapshot/mac/exception_snapshot_mac.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/snapshot/mac/mach_o_image_annotations_reader_test.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/snapshot/mac/memory_snapshot_mac.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/snapshot/mac/process_reader.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/snapshot/mac/process_reader_test.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/snapshot/mac/process_snapshot_mac.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/snapshot/mac/process_types/crashreporterclient.proctype
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/snapshot/mac/process_types/custom.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/snapshot/mac/process_types_test.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/snapshot/mac/system_snapshot_mac.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/snapshot/mac/thread_snapshot_mac.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/snapshot/module_snapshot.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/snapshot/system_snapshot.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/snapshot/test/test_process_snapshot.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/snapshot/win/end_to_end_test.py
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/snapshot/win/exception_snapshot_win.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/snapshot/win/pe_image_annotations_reader.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/snapshot/win/process_snapshot_win_test.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/snapshot/win/thread_snapshot_win.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/test/win/win_multiprocess.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/third_party/apple_cctools/README.crashpad
[delete] https://crrev.com/86a6788070f1872e7136d6c1ebe0a0d35e4a2e1c/third_party/crashpad/crashpad/tools/crashpad_database_util.ad
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/tools/crashpad_database_util.cc
[add] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/tools/crashpad_database_util.md
[delete] https://crrev.com/86a6788070f1872e7136d6c1ebe0a0d35e4a2e1c/third_party/crashpad/crashpad/tools/generate_dump.ad
[add] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/tools/generate_dump.md
[delete] https://crrev.com/86a6788070f1872e7136d6c1ebe0a0d35e4a2e1c/third_party/crashpad/crashpad/tools/mac/catch_exception_tool.ad
[add] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/tools/mac/catch_exception_tool.md
[delete] https://crrev.com/86a6788070f1872e7136d6c1ebe0a0d35e4a2e1c/third_party/crashpad/crashpad/tools/mac/exception_port_tool.ad
[add] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/tools/mac/exception_port_tool.md
[delete] https://crrev.com/86a6788070f1872e7136d6c1ebe0a0d35e4a2e1c/third_party/crashpad/crashpad/tools/mac/on_demand_service_tool.ad
[add] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/tools/mac/on_demand_service_tool.md
[delete] https://crrev.com/86a6788070f1872e7136d6c1ebe0a0d35e4a2e1c/third_party/crashpad/crashpad/tools/mac/run_with_crashpad.ad
[add] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/tools/mac/run_with_crashpad.md
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/tools/tool_support.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/mac/launchd.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/mac/mac_util.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/mac/mac_util.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/mac/service_management.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/mac/xattr.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/mach/child_port_handshake.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/mach/child_port_server.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/mach/exc_client_variants.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/mach/exc_client_variants_test.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/mach/exc_server_variants.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/mach/exception_types.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/mach/exception_types_test.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/mach/mach_extensions.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/mach/mach_message.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/mach/mach_message_server.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/mach/mach_message_server_test.cc
[add] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/misc/address_sanitizer.h
[add] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/misc/arraysize_unsafe.h
[add] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/misc/arraysize_unsafe_test.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/misc/initialization_state_dcheck.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/misc/metrics.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/misc/uuid.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/misc/uuid.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/misc/uuid_test.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/net/http_transport.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/net/http_transport_test.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/posix/close_multiple.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/posix/drop_privileges.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/stdlib/map_insert.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/stdlib/string_number_conversion.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/stdlib/string_number_conversion.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/stdlib/string_number_conversion_test.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/string/split_string.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/string/split_string.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/util.gyp
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/util_test.gyp
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/win/command_line.h
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/win/process_info_test.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/win/registration_protocol_win.cc
[modify] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/win/registration_protocol_win.h
[add] https://crrev.com/e585bac3b48a1fd12eb7a85ad3d94d823306117f/third_party/crashpad/crashpad/util/win/registration_protocol_win_test.cc

Comment 23 by bugdroid1@chromium.org, Dec 16 2016

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/be0cfa14d77c72864a74d2bcc7910b0b31b7eecb

commit be0cfa14d77c72864a74d2bcc7910b0b31b7eecb
Author: scottmg <scottmg@chromium.org>
Date: Fri Dec 16 21:00:59 2016

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/+/f3a5670dd8d42b045d31625dde4a2561b471138f
.

BUG= 655788 , 656800 ,565063
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng

Review-Url: https://codereview.chromium.org/2475863004
Cr-Commit-Position: refs/heads/master@{#439188}

[modify] https://crrev.com/be0cfa14d77c72864a74d2bcc7910b0b31b7eecb/chrome/app/chrome_exe_main_win.cc
[modify] https://crrev.com/be0cfa14d77c72864a74d2bcc7910b0b31b7eecb/chrome/browser/chrome_browser_main.cc
[modify] https://crrev.com/be0cfa14d77c72864a74d2bcc7910b0b31b7eecb/chrome_elf/chrome_elf.def
[modify] https://crrev.com/be0cfa14d77c72864a74d2bcc7910b0b31b7eecb/chrome_elf/chrome_elf_main.cc
[modify] https://crrev.com/be0cfa14d77c72864a74d2bcc7910b0b31b7eecb/chrome_elf/chrome_elf_main.h
[modify] https://crrev.com/be0cfa14d77c72864a74d2bcc7910b0b31b7eecb/components/crash/content/app/crashpad.cc
[modify] https://crrev.com/be0cfa14d77c72864a74d2bcc7910b0b31b7eecb/components/crash/content/app/crashpad.h
[modify] https://crrev.com/be0cfa14d77c72864a74d2bcc7910b0b31b7eecb/components/crash/content/app/crashpad_win.cc
[modify] https://crrev.com/be0cfa14d77c72864a74d2bcc7910b0b31b7eecb/tools/metrics/histograms/histograms.xml

Comment 24 by scottmg@chromium.org, Dec 16 2016

Status: Fixed (was: Started)
That was a lot more work than I expected! Hopefully we get bug 565063 out of it too.

Sign in to add a comment