RESOLVED FIXED298025
[GTK][WPE] Web process sometimes gets locked on exit
https://bugs.webkit.org/show_bug.cgi?id=298025
Summary [GTK][WPE] Web process sometimes gets locked on exit
Carlos Garcia Campos
Reported 2025-08-28 04:50:43 PDT
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
Carlos Garcia Campos
Comment 1 2025-08-28 04:53:18 PDT
EWS
Comment 2 2025-08-29 02:52:14 PDT
Committed 299312@main (5a0e48592bf4): <https://commits.webkit.org/299312@main> Reviewed commits have been landed. Closing PR #50002 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.