Closed Bug 1797978 Opened 1 year ago Closed 1 year ago

[Wayland VSync] Animated image in theme has a steady memory leak when window is obscured

Categories

(Core :: Widget: Gtk, defect, P3)

Firefox 108
defect

Tracking

()

RESOLVED FIXED
108 Branch
Tracking Status
firefox-esr102 --- wontfix
firefox106 --- wontfix
firefox107 --- wontfix
firefox108 --- fixed

People

(Reporter: ke5trel, Assigned: stransky)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: memory-leak, regression)

Attachments

(1 file)

STR:

  1. Start with MOZ_ENABLE_WAYLAND=1 on Ubuntu 22.04.
  2. Install a theme with an animated gif background that loops for several seconds like Dark Space.
  3. Open two windows and completely cover one with the other window.

Total system memory usage climbs steadily when window is completely covered and only released when it becomes visible. It is not attributed to any Firefox process in about:processes or the system Task Manager but can be measured in about:memory gfx section of main process.

4,126.39 MB (100.0%) -- gfx
└──4,126.39 MB (100.0%) -- webrender
   ├──2,219.32 MB (53.78%) -- textures
   │  ├──1,912.55 MB (46.35%) ── render-texture-hosts
   │  ├────128.00 MB (03.10%) ── render-targets
   │  ├────118.50 MB (02.87%) -- texture-cache
   │  │    ├──118.50 MB (02.87%) ── atlas
   │  │    └────0.00 MB (00.00%) ── standalone
   │  └─────60.27 MB (01.46%) ++ (7 tiny)
   └──1,907.06 MB (46.22%) -- images/mapped_from_owner
      ├──1,902.16 MB (46.10%) -- pid=19542
      │  ├──1,892.29 MB (45.86%) ── image(640x360, compositor_ref:3, creator_ref:1)/decoded-other [2153]
      │  └──────9.87 MB (00.24%) ++ (24 tiny)
      └──────4.91 MB (00.12%) ++ (2 tiny)

It occurs with Webrender but not with the Basic compositor on 91 ESR.

Shorter animations that are less than a second long (eg ANIMATED Sakura by candelora) do not seem to be affected.

Regression window:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=69e6477b290b4f6d2beffffd3520e07d51685182&tochange=d9b0105477475ee9d411fdd67d37b1774aedb3da

Possibly regressed by Bug 1676909 or Bug 1676559.

Bug 1676909 - Don't evict items from the texture cache if they were used in the previous frame.

:jnicol, since you are the author of the regressor, bug 1676909, could you take a look? Also, could you set the severity field?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jnicol)

It's related to Wayland Vsync code - when I disable it I don't see the mem leaks.

Component: Graphics: WebRender → Widget: Gtk
Priority: -- → P3
Assignee: nobody → stransky
Flags: needinfo?(jnicol)
Summary: Animated image in theme has a steady memory leak when window is obscured → [Wayland VSync] Animated image in theme has a steady memory leak when window is obscured

Real regression is Bug 1795574 / https://phabricator.services.mozilla.com/D159498 where vsync call from idle callback was removed.

Regressed by: 1795574
No longer regressed by: 1676909
Pushed by stransky@redhat.com:
https://hg.mozilla.org/integration/autoland/rev/1ff0bd4fcae7
[Wayland] Fire Vsync from idle callback r=emilio
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch
QA Whiteboard: [qa-108b-p2]
See Also: → 1829493
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: