Closed Bug 1432064 Opened 6 years ago Closed 6 years ago

WebRender seems to leak memory

Categories

(Core :: Graphics: WebRender, defect, P2)

defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: linuxhippy, Unassigned)

References

Details

(Whiteboard: [MemShrink:P2])

Attachments

(1 file)

Attached file memory-report.json.gz
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0
Build ID: 20180121100439

Steps to reproduce:

Used WebRender during a typical work-day


Actual results:

after closing all tabs except one (about:memory), the main firefox process still consumed 850mb resident memory after clicking several times at the "minimize memory", "GC", and "CC" buttons (+350mb for one Web Content process).


Expected results:

It seems when webrender is enabled, firefox leaks some memory.
Component: Untriaged → Graphics: WebRender
Product: Firefox → Core
Whiteboard: [MemShrink]
Looks like ~50% of the main process memory usage is shared memory, so it's possible we're leaking, or it's possible this is just how much memory webrender uses.

Clemens, can you provide a memory report after initially loading a certain set of sites. Then go ahead and open a about:blank tab, close the rest and then take a memory report again after waiting 60s? This will help us compare memory usage. Also if possible can you try to reproduce in safe mode? It's possible an addon is causing Firefox to keep processes open longer than we'd expect.
Flags: needinfo?(linuxhippy)
Safe mode will probably turn off WebRender?
(In reply to Milan Sreckovic [:milan] from comment #2)
> Safe mode will probably turn off WebRender?

Because safe mode turns off GPU acceleration, and WebRender needs it...
(In reply to Milan Sreckovic [:milan] from comment #3)
> (In reply to Milan Sreckovic [:milan] from comment #2)
> > Safe mode will probably turn off WebRender?
> 
> Because safe mode turns off GPU acceleration, and WebRender needs it...

Forgot about that, I guess testing with addons manually disabled is the next best option.
There is a leak by enabling WebRender. It is Bug 1432708.
> can you provide a memory report after initially loading a certain set of sites.
>  Then go ahead and open a about:blank tab, close the rest and then take a memory report again after waiting 60s

Please re-read my bug-report. This is exactly what I initially did.

1. Used Firefox + WebRender for a few hours
2. closed all tabs, went to about:memory, pressed CC, GC + Minimize Memory a few times
3. Memory useage remains high, in sum (firefox + Web Content processes) about 1.5 - 2 GB for 1 tab with about:memory loaded.
Flags: needinfo?(linuxhippy)
P2 for now, this bad but WebRender isn't enabled by default yet. Hopefully bug 1432708 will fix things.
Whiteboard: [MemShrink] → [MemShrink:P2]
See Also: → 1437112
Depends on: 1432708
Even with bug 1432708 fixed, I think there are memory leaks hiding

After a few hours of use, my main firefox process consumed 850MB ram (RES) with only the about:memory tab remaining, even after having pressed minimize memomory / GC / CC buttons multiple times.
(In reply to Clemens Eisserer from comment #8)
> Even with bug 1432708 fixed, I think there are memory leaks hiding
> 
> After a few hours of use, my main firefox process consumed 850MB ram (RES)
> with only the about:memory tab remaining, even after having pressed minimize
> memomory / GC / CC buttons multiple times.

That's not totally unexpected, about:memory actually takes up a fair amount of memory.
Can you re-test? We fixed some font/glyph cache leaks and this should be much better now.
Flags: needinfo?(linuxhippy)
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Flags: needinfo?(linuxhippy)
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: