davidbrs / google-breakpad

Automatically exported from code.google.com/p/google-breakpad
0 stars 0 forks source link

OOP dump request should not be handled in wait thread on win32 #651

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
One of the flags used to register dump request callback in 
crash_generation_server.cc is WT_EXECUTEINWAITTHREAD.

According to MSDN 
(https://msdn.microsoft.com/en-us/library/windows/desktop/ms685061%28v=vs.120%29
.aspx) providing this flag means:

"The callback function is invoked by the wait thread itself. This flag should 
be used only for short tasks or it could affect other wait operations."

Since one wait thread handles quite a large amount of events (up to 63), what 
this basically means is that while the dump is generated, all the other events 
in that thread are blocked, and you can't e.g. connect to the server until that 
callback is finished, even though the design of the server allows it to do so.

Proposed patch is an attempt to fix this problem, along with the changes 
necessary to execute the callback in a non-blocking way (manual reset events 
can't be used in this case).

Original issue reported on code.google.com by soulthre...@linuxoids.net on 7 May 2015 at 8:45

Attachments: