Descriptionwin: Crash handler server
This replaces the registration server, and adds dispatch to a delegate
on crash requests.
(As you are already aware) we went around in circles on trying to come
up with a slightly-too-fancy threading design. All of them seemed to
have problems when it comes to out of order events, and orderly
shutdown, so I've gone back to something not-too-fancy.
Two named pipe instances (that clients connect to) are created. These
are used only for registration (which should take <1ms), so 2 should be
sufficient to avoid any waits. When a client registers, we duplicate
an event to it, which is used to signal when it wants a dump taken.
The server registers threadpool waits on that event, and also on the
process handle (which will be signalled when the client process exits).
These requests (in particular the taking of the dump) are serviced
on the threadpool, which avoids us needing to manage those threads,
but still allows parallelism in taking dumps. On process termination,
we use an IO Completion Port to post a message back to the main thread
to request cleanup. This complexity is necessary so that we can
unregister the threadpool waits without being on the threadpool, which
we need to do synchronously so that we can be sure that no further
callbacks will execute (and expect to have the client data around
still).
In a followup, I will readd support for DumpWithoutCrashing -- I don't
think it will be too difficult now that we have an orderly way to
clean up client records in the server.
R=cpu@chromium.org, mark@chromium.org, jschuh@chromium.org
BUG=crashpad:1, crashpad:45
Committed: https://chromium.googlesource.com/crashpad/crashpad/+/6978bf7646df2a48c8ba770452de043795ed1411
Patch Set 1 #Patch Set 2 : stub of crash report exception handler #Patch Set 3 : handler based on thread pool #Patch Set 4 : reorganize, and CREH to ExceptionHandlerServer #Patch Set 5 : wip on test #Patch Set 6 : yarewrite #Patch Set 7 : fix up shutdown #Patch Set 8 : shutdown #Patch Set 9 : improve shutdown #Patch Set 10 : rewrite with set on main thread #Patch Set 11 : . #Patch Set 12 : remove ScopedWaitHANDLE #
Total comments: 42
Patch Set 13 : fixes and move some things around #
Total comments: 42
Patch Set 14 : partial fixes #Patch Set 15 : check for forged shutdown requests #Patch Set 16 : . #Patch Set 17 : muck with connections #Patch Set 18 : ... #
Total comments: 28
Patch Set 19 : fixes #
Total comments: 6
Patch Set 20 : more fixes #Patch Set 21 : 80col #Patch Set 22 : oops #
Messages
Total messages: 24 (5 generated)
|