RESOLVED FIXED323734
GPU process leaks GPUConnectionToWebProcess because didClose() never clears m_remoteGPUMap
https://bugs.webkit.org/show_bug.cgi?id=323734
Summary GPU process leaks GPUConnectionToWebProcess because didClose() never clears m...
Kishore Sri Venkata Ganesh Bolisetty
Reported 2026-09-08 22:50:13 PDT
GPUConnectionToWebProcess::didClose() clears m_remoteRenderingBackendMap to break the cycle formed by RemoteRenderingBackend's strong ref back to the connection. However RemoteGPU, which lives in m_remoteGPUMap, also holds a strong ref to RemoteRenderingBackend. m_remoteGPUMap is never cleared: its only removal path is releaseGPU(), reached from an explicit ReleaseRemoteGPU message that never arrives when the WebContent process simply exits, which is exactly the case didClose() handles. So clearing m_remoteRenderingBackendMap only drops the map's own reference, and any backend still held by a RemoteGPU stays alive. The surviving backend holds a strong ref to RemoteSharedResourceCache, which owns a per-connection WebCore::IOSurfacePool, so every pooled "WebKit LayerBacking" IOSurface stays allocated for the lifetime of the GPU process. Repeatedly loading www.youtube.com/user/Apple leaks roughly two connections per load-and-close cycle, growing the iokit.IOSurface, kalloc.1024 and kalloc.4096 zones without bound.
Attachments
Kishore Sri Venkata Ganesh Bolisetty
Comment 1 2026-09-08 22:50:14 PDT
Kishore Sri Venkata Ganesh Bolisetty
Comment 2 2026-09-08 23:31:44 PDT
EWS
Comment 3 2026-09-10 14:17:25 PDT
Committed 320867@main (4d7824351be9): <https://commits.webkit.org/320867@main> Reviewed commits have been landed. Closing PR #73536 and removing active labels.
EWS
Comment 4 2026-09-14 16:32:57 PDT
Committed 316606.712@safari-7625-branch (4d7266b208f2): <https://commits.webkit.org/316606.712@safari-7625-branch> Reviewed commits have been landed. Closing PR #6694 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.