Bug 203650

Summary: Unbounded memory growth due to WebGL buffers not being freed
Product: WebKit Reporter: Arindam Bose <arindam.bose>
Component: WebGLAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: dino, justin_fan, kkinnunen, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 12   
Hardware: Mac   
OS: macOS 10.14   
Attachments:
Description Flags
GL delete buffer memory growth example. none

Arindam Bose
Reported 2019-10-30 18:16:56 PDT
Created attachment 382401 [details] GL delete buffer memory growth example. This is coming through from a bug report on Mapbox GL-JS https://github.com/mapbox/mapbox-gl-js/issues/8771 Safari is seeing unbounded memory growth in interactions wherein the user is constantly loading and unloading tiles by panning or zooming the interactive map. We were able to run use the Xcode instruments allocation tracker on a debug build of WebKit, and found that calls to `WebGLRenderingContext.deleteBuffer` was not freeing up memory. We were able to confirm this by creating an isolated example page that repeatedly creates->uploads and then deletes a vertex buffer every frame, the example page is attached. The process for the tab grows upto 6gb of memory consumption in 30s.
Attachments
GL delete buffer memory growth example. (1.47 KB, text/html)
2019-10-30 18:16 PDT, Arindam Bose
no flags
Radar WebKit Bug Importer
Comment 1 2019-10-30 23:29:57 PDT
Kimmo Kinnunen
Comment 2 2024-01-17 01:50:36 PST
Thank you for the report. This is fixed now.
Note You need to log in before you can comment on or make changes to this bug.