[Webkit-unassigned] [Bug 51351] New: UI process should respond to synchronous messages from the web process on a non-main thread by default
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Dec 20 13:21:43 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=51351
Summary: UI process should respond to synchronous messages from
the web process on a non-main thread by default
Product: WebKit
Version: 528+ (Nightly build)
Platform: All
OS/Version: All
Status: NEW
Keywords: NeedsRadar
Severity: Normal
Priority: P2
Component: WebKit2
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: aroben at apple.com
CC: andersca at apple.com, sam at webkit.org
The UI process currently responds to both synchronous and asynchronous messages from the web process on the main thread. Messages are received on the CoreIPC::Connection's work queue and then forwarded to the main thread for processing.
This can cause deadlocks on Windows when windowed plugins are involved. For example, take the case of a YouTube video embedded into some third party web page. Here's what happens:
Web process:
Clicking on the plugin opens a new window so that it can be navigated to the video's YouTube page. In order to open the new window, the web process sends a synchronous WebPageProxy::CreateNewPage message and blocks its main thread to wait for the reply.
UI process:
The UI process receives the WebPageProxy::CreateNewPage message, and ends up calling through to WKPageUIClient::createNewPage. The client app responds to this callback by creating a new window and selecting it. Selecting the new window causes the plugin to lose focus. As part of unfocusing the plugin, Windows sends the plugin a synchronous WM_KILLFOCUS message to it and blocks the main thread while waiting for the message to be handled.
Since the web process's main thread is still blocked waiting for the reply to WebPageProxy::CreateNewPage, it can't process the WM_KILLFOCUS message, so the two processes deadlock. (The web process is waiting for CreateNewPage to be handled, and the UI process is waiting for WM_KILLFOCUS to be handled.)
We should make the UI process respond to synchronous messages on a non-main thread by default. We'll want to continue making WK2 client callbacks (e.g., WKPageUIClient::createNewPage) on the main thread, but those need to happen asynchronously to avoid deadlocks.
--
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