Bug 233328

Summary: ANGLE Metal: The memory backing IOSurfaces of former client buffer pbuffers is leaked
Product: WebKit Reporter: Kimmo Kinnunen <kkinnunen>
Component: WebGLAssignee: Kimmo Kinnunen <kkinnunen>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, ews-watchlist, geofflang, gman, jonahr, kbr, kkinnunen, koivisto, kondapallykalyan, kpiddington, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 234356    
Attachments:
Description Flags
Patch
ews-feeder: commit-queue-
Patch
ews-feeder: commit-queue-
Patch for landing none

Kimmo Kinnunen
Reported 2021-11-18 12:27:02 PST
ANGLE Metal: The memory backing IOSurfaces of former client buffer pbuffers is leaked This affects mainly WebGL GPU process. To repro: Set "WebGL via Metal" and "GPU Process: WebGL" Navigate to https://webglsamples.org/aquarium/aquarium.html and observe GPUP memory consumption go up. footprint $(pgrep GPU.Development) GPU Process uses m_context->markDisplayBufferInUse(); to destroy each WebGL drawing buffer PBuffer before sending the IOSurface to WebContent process for compositing. This should detach the IOSurface from the EGL pbuffer and as such the pbuffer from the GL texture. Somehow the memory is still leaking through GPU process. Note: This leaking memory is leaked as "something something graphics memory" (via footprint tool). Normal IOSurfaces are marked as "IOSurface" by footprint. The leak doesn't exist in OpenGL backend.
Attachments
Patch (23.83 KB, patch)
2021-11-24 04:53 PST, Kimmo Kinnunen
ews-feeder: commit-queue-
Patch (26.46 KB, patch)
2021-11-24 05:50 PST, Kimmo Kinnunen
ews-feeder: commit-queue-
Patch for landing (26.46 KB, patch)
2021-11-24 06:08 PST, Kimmo Kinnunen
no flags
Radar WebKit Bug Importer
Comment 1 2021-11-18 12:32:48 PST
Kenneth Russell
Comment 2 2021-11-18 18:49:18 PST
Yikes. Please tell us if it looks like this leak is inside ANGLE.
Kimmo Kinnunen
Comment 3 2021-11-24 04:53:09 PST
Kimmo Kinnunen
Comment 4 2021-11-24 05:50:21 PST
Kimmo Kinnunen
Comment 5 2021-11-24 06:08:25 PST
Created attachment 445096 [details] Patch for landing
Kimmo Kinnunen
Comment 6 2021-11-25 00:59:06 PST
> Yikes. Please tell us if it looks like this leak is inside ANGLE. No, this one was in WebKit, one of my added features.
EWS
Comment 7 2021-11-25 01:17:53 PST
Committed r286160 (244544@main): <https://commits.webkit.org/244544@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 445096 [details].
Note You need to log in before you can comment on or make changes to this bug.