[wayland][SW-WR] Slowly resizing window causes memory leak and elements to flicker
Categories
(Core :: Widget: Gtk, defect, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr128 | --- | unaffected |
| firefox-esr140 | --- | unaffected |
| firefox140 | --- | unaffected |
| firefox141 | --- | unaffected |
| firefox142 | --- | verified |
| firefox143 | --- | verified |
People
(Reporter: ke5trel, Assigned: stransky)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: memory-leak, regression)
Attachments
(1 external file)
STR:
- Disable hardware acceleration so it falls back to SW-WR on Ubuntu 25.04 (Wayland).
- Slowly resize the window.
Expected:
Total system memory usage remains stable.
Actual:
Total system memory usage grows rapidly while resizing and remains high. Elements sometimes flicker during resizing.
The memory growth is not recorded in System Monitor's Processes list and not attributed to any explicit allocation in about:memory.
Closing window recovers memory.
Does not happen with MOZ_ENABLE_WAYLAND=0 or HW-WR.
Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=dc6805af959576f619df93c9042e22f6115696c8&tochange=dfa8ff6ede6d3a7a42e304e626d8ded4d1922efa
Regressed by Bug 1973890.
Comment 1•1 year ago
|
||
:stransky, since you are the author of the regressor, bug 1973890, could you take a look?
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 2•1 year ago
|
||
We should also track IPC memory used here.
| Assignee | ||
Comment 3•1 year ago
|
||
When WaylandBuffer transaction is detached from compositor, remove it from WaylandSurface.
Updated•1 year ago
|
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 6•1 year ago
|
||
Comment on attachment 9501769 [details]
Bug 1978207 [Wayland] Remove detached WaylandBuffer transactions from WaylandSurface r?emilio
Beta/Release Uplift Approval Request
- User impact if declined/Reason for urgency: Memleaks on SW-WR rendering if window is resized.
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: Open Firefox on Wayland, resizing Firefox window by mouse. Check if used memory grows.
- List of other uplifts needed: Bug 1977922
- Risk to taking this patch: Medium
- Why is the change risky/not risky? (and alternatives if risky): Release WaylandBuffer transactions rapidly from WaylandSurface, rather intrusive change.
- String changes made/needed:
- Is Android affected?: Yes
| Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Reproduced the issue on Firefox 142.0a1 (2025-07-19) on Ubuntu 24.04 with hw accel disabled, which caused the system to crash after all the ram was used.
The issue is fixed on Firefox 143.0a1 (2025-07-22) on the same system. Will verify the fix on beta as well.
Comment 8•1 year ago
|
||
Comment on attachment 9501769 [details]
Bug 1978207 [Wayland] Remove detached WaylandBuffer transactions from WaylandSurface r?emilio
Approved for 142.0b3
Updated•1 year ago
|
Verified that this is fixed on Firefox 142.0b3 (treeherder build) on Ubuntu 24.04.
Description
•