DescriptionThe Crash Generation Server internal state ('server_state_' member) is normally
updated and accessed from a single thread - and this is the thread running
CrashGenerationServer::HandleConnectionRequest.
There are two exceptions of this rule and we must ensure that they are handled
correctly:
1. The server state is set during startup (CrashGenerationServer::Start) as
part of the initial setup. There was a small race window between requesting the
first connection and setting the initial state to 'Connecting' or 'Connected' in
which the first client can actually connect and trigger HandleConnectionRequest
in the thread pool - I'm basically removing the code which requests the first
connection from the startup routine which completely eliminates this race
window. The first connection request will now happen on the thread pool.
2. The server state is checked during shutdown (CrashGenerationServer
destructor). This is not a problem at all since it only checks whether the
IPC_SERVER_STATE_ERROR was reached which is a terminal state. The first thing
done after that is to wait until all threads in the thread pool complete. No
problems here.
This is tracked by the following bug:
http://code.google.com/p/chromium/issues/detail?id=144928
Thanks,
-Ivan
Patch Set 1 #Patch Set 2 : Bypassing EnterErrorState in the case where SetEvent fails since it will try one more time to set t… #MessagesTotal messages: 2
|