Bug 298025
| Summary: | [GTK][WPE] Web process sometimes gets locked on exit | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Carlos Garcia Campos <cgarcia> |
| Component: | WebKitGTK | Assignee: | Carlos Garcia Campos <cgarcia> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | bugs-noreply, mcatanzaro |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=260856 | ||
Carlos Garcia Campos
It happens when the network connection is closed before WebPage::close is called. In that case WebPage::close() tries to get a network process connection to send ClearPageSpecificData message, but WebProcess::ensureNetworkProcessConnection() fails causing a process exit. In the exit handlers PlatformDisplay::invalidateSkiaGLContexts() is called, which tries to invalidate the GL contexts of the painting threads that are still running. We use RunLoop::dispatch() and a semaphore to wait to clear context from painting threads, but that doesn't work because painting threads don't run a loop. We should avoid the early exit first by not calling WebProcess::ensureNetworkProcessConnection() from WebPage::close(), but we should also stop trying to invalidate the skia gl contexts from the main thread. LayerTreeHost is the owner of the WorkerPool that runs the painting tasks, so the gl contexts will be released when the threads finish on LayerTreeHost destructor. We only need to care about the main thread gl context for which we can just set to nullptr.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Carlos Garcia Campos
Pull request: https://github.com/WebKit/WebKit/pull/50002
EWS
Committed 299312@main (5a0e48592bf4): <https://commits.webkit.org/299312@main>
Reviewed commits have been landed. Closing PR #50002 and removing active labels.