Bug 232139

Summary: RemoteDisplayListRecorder RemoteImageBuffer refcount cycle causes GPUP memory leak
Product: WebKit Reporter: Kimmo Kinnunen <kkinnunen>
Component: CanvasAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: dino, wenson_hsieh
Priority: P2    
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=187964
Bug Depends on:    
Bug Blocks: 229825    
Attachments:
Description Flags
Create leaks with ImageBitmap none

Description Kimmo Kinnunen 2021-10-22 03:23:33 PDT
RemoteDisplayListRecorder RemoteImageBuffer refcount cycle causes GPUP memory leak

Contributing factors:
RemoteDisplayListRecorder refs RemoteImageBuffer refs RemoteDisplayListRecorder

RemoteDisplayListRecorderProxy does not send destruction notification

GPUP side does not remove the RemoteDisplayListRecorder ever.

Note:
Due to bug 187964 the test case is hard to repro.
After testcase runs, open inspector to run gc.
Comment 1 Kimmo Kinnunen 2021-10-22 03:24:05 PDT
Created attachment 442144 [details]
Create leaks with ImageBitmap
Comment 2 Kimmo Kinnunen 2021-10-22 03:45:06 PDT
*** Bug 232138 has been marked as a duplicate of this bug. ***
Comment 3 Wenson Hsieh 2021-10-22 10:52:42 PDT
Good catch. RemoteImageBuffer owns its RemoteDisplayListRecorder, so RemoteDisplayListRecorder should have a weak back-pointer to its RemoteImageBuffer.

I plan to fix this along with https://bugs.webkit.org/show_bug.cgi?id=232113.

*** This bug has been marked as a duplicate of bug 232113 ***