[Webkit-unassigned] [Bug 129684] Race condition when closing pages with network process enabled

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 4 08:38:59 PST 2014


https://bugs.webkit.org/show_bug.cgi?id=129684





--- Comment #1 from Carlos Garcia Campos <cgarcia at igalia.com>  2014-03-04 08:36:02 PST ---
This happens sometimes when closing the last page of a web process:

1.- WebPageProxy::close() sends the Close message to the WebProcess
2.- WebProcessProxy::removeWebPage() checks that it's the last page and that the process can be terminated and closes the connection (this only happens when using the network process)
3.- The WebProcess receives the Close message and enables the process termination
4.- The WebProcess io thread notices the connection has been closed and invalidates it
5.- Connection::connectionDidClose() calls platformInvalidate and schedules dispatchConnectionDidClose on the main loop
6.- WebProcess::shouldTerminate() tries to send the sync message ShouldTerminate to the UI process

At this point the connection is still valid (it has a client because dispatchConnectionDidClose is scheduled but hasn't been handled yet) but the connection has been invalidated in plaformInvalidate. So we fail to send the message, of course, but the connection keeps waiting for the reply because it still has a client. 

This only happens sometimes because in other cases where the dispatchConnectionDidClose is run before the sendSync, the connection ends up in didFailToSendSyncMessage() and the processes exists.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list