APZUpdater::ClearTree never runs when the root layers id is blocked on an epoch that is never built, leaking the APZ tree and compositor bridge
Categories
(Core :: Panning and Zooming, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox161 | --- | fixed |
People
(Reporter: florian, Assigned: florian)
References
Details
Attachments
(1 external file)
When a window is closed before WebRender builds the scene for its last root display list, the root layers id stays blocked on that epoch in APZUpdater. APZUpdater::ProcessQueue skips blocked tasks, including the ClearTree task that CompositorBridgeParent::StopAndClearResources queues with DuringShutdown::Yes. So ClearTree never runs, not even in the final ProcessPendingTasks at updater deregistration.
The ClearTree runnable holds the APZUpdater, so the APZCTreeManager, its APZCs, the ChromeProcessController and the compositor bridge and manager leak. This shows up as leakcheck | default 14488 bytes leaked (APZCTreeManager, APZCTreeManager::CheckerboardFlushObse, APZUpdater, APZUpdater::ClearTree, ...) in linux debug swr runs of browser/components/aiwindow/ui/test/browser/browser.toml, with the window closed in browser_sidebar_aiwindow.js. Bug 2080312 and bug 2085174 show the same leaked classes in the gpu process and are probably the same defect.
The fix lets DuringShutdown::Yes tasks run whatever the epoch state. ProcessQueue already discards the tasks still blocked once ClearTree has run.
| Assignee | ||
Comment 1•1 month ago
|
||
When a window is torn down before WebRender builds the scene for its last root
display list, the root layers id stays blocked on that epoch. Nothing will build
it anymore, so ProcessQueue kept skipping the queued ClearTree task, which holds
the APZUpdater and leaks the whole APZ tree and compositor bridge. Tasks queued
during shutdown now run regardless of epochs, so ClearTree runs ahead of earlier
blocked root tasks, which ProcessQueue then drops as it already does for stale
content subtree tasks since bug 1465658.
Updated•1 month ago
|
Comment 3•1 month ago
|
||
| bugherder | ||
Updated•27 days ago
|
Description
•