WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
305401
[GTK3] leaks DMA-BUF allocations when loading and unloading web pages
https://bugs.webkit.org/show_bug.cgi?id=305401
Summary
[GTK3] leaks DMA-BUF allocations when loading and unloading web pages
Gavin Stark
Reported
2026-01-13 10:25:40 PST
Created
attachment 477983
[details]
Sample app, including Makefile and sample content The leak occurs during normal page navigation without any video or WebGL content. Memory usage grows continuously and buff ers are never released. Setting `WEBKIT_DISABLE_DMABUF_RENDERER=1` completely stops the leak, confirming the issue is in the DMABuf rendering path. ## Steps to Reproduce 1. Launch the included sample application 2. Monitor DMA-BUF allocations: `sudo cat /sys/kernel/debug/dma_buf/bufinfo` as well as `/proc/<PID>/fd` 3. Launch the test application: `./gtk_webkit_viewer file:///path/to/file/index.html 5 360 > log.txt` 4. Observe that DMA-BUF count increases and does not return to baseline 5. Observe data in `log.txt` ## Expected Behavior DMA-BUF allocations should be released when pages are unloaded or navigated away from. Buffer count should return to baseline after navigation. ## Actual Behavior DMA-BUF allocations accumulate with each page load/unload cycle. Buffers are never freed until the process is terminated. ## Observed With the test code provided entries in `/proc/<PID>/fd` keep accumulating all pointing to dmabuf. ## Workaround Setting `WEBKIT_DISABLE_DMABUF_RENDERER=1` prevents the leak by falling back to SHM-based rendering but impacts performance. ## System Information - Distribution: Ubuntu 22.04 or 24.04 - Kernel: 5.15.0-164-generic - WebKitGTK version: 2.44.0 - Mesa version: libegl-mesa0:amd64 23.2.1-1ubuntu3.1~22.04.3 - GPU: 04:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] (rev 85) 04:00.7 Non-VGA unclassified device: Advanced Micro Devices, Inc. [AMD] Raven/Raven2/Renoir Non-Sensor Fusion Hub KMDF driver - DRM driver: OpenGL renderer string: AMD Ryzen Embedded V1202B with Radeon Vega Gfx (raven, LLVM 15.0.7, DRM 3.42, 5.15.0-164-generic)
Attachments
Sample app, including Makefile and sample content
(45.50 KB, application/x-tar)
2026-01-13 10:25 PST
,
Gavin Stark
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Carlos Garcia Campos
Comment 1
2026-01-14 05:12:28 PST
We keep the DMA-BUF buffers mapped in the UI process because we are failing to delete the associated texture. We need to make sure the gl context is current before calling glDeleteTextures()
Carlos Garcia Campos
Comment 2
2026-01-14 05:15:09 PST
Pull request:
https://github.com/WebKit/WebKit/pull/56555
EWS
Comment 3
2026-01-16 01:27:31 PST
Committed
305700@main
(6fab811984ab): <
https://commits.webkit.org/305700@main
> Reviewed commits have been landed. Closing PR #56555 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug