[Webkit-unassigned] [Bug 241353] [WPE] REGRESSION (r294381): WPEWebProcess leak after closing browser

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 10 15:00:04 PDT 2022


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

--- Comment #4 from Yury Semikhatsky <yurys at chromium.org> ---
I managed to debug what causes the issue. We call WebPageProxy::forceRepaint, which in turn sends an async message to the web process and captures a strong reference to the WebPageProxy in the async callback. In WPE on a static page the callback is not invoked for a long time and the client closes the page. While the page is closed, the callback is still in asyncReplyHandlerMap and keeps WebProcessPool alive. Since the closed page was last page in the web process the process gets into WebProcessCache and in 30s gets stopped (CachedProcess::suspensionTimerFired). When the browser exists, the web process is still alive an is in the STOPPED state. Since the reference to WebProcessPool (and transitively to WebProcessProxy) still exists the web process is not killed and keeps hanging after the UIProcess exited.

The retention chain looks like this:



  asyncReplyHandlerMap
           │
           ▼
sendWithAsyncReply callback
           │
           ▼
      WebPageProxy
           │
           ▼
  API::PageConfiguration
           │
           ▼
     WebProcessPool
           │
           ▼
    WebProcessCache
           │
           ▼
      CachedProcess
           │
           ▼
     WebProccessProxy


I'll upload a fix for this particular issue shorty but it looks like a bigger problem with stopping web process when there are in-flight IPC messages.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220610/e3e6eb5d/attachment.htm>


More information about the webkit-unassigned mailing list