firefox background gif maxing out ram while idle in the background
Categories
(Firefox :: New Tab Page, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox150 | --- | fixed |
People
(Reporter: floperatox.spam, Assigned: thecount)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:143.0) Gecko/20100101 Firefox/143.0
Steps to reproduce:
- With the new feature, put a gif as the background in my firefox home page.
- Minimize the firefox window / Put another fullscreen window on top of it.
- Watch your memory (ram) slowly being maxing out.
Actual results:
When a gif is setup as my background image, all of my ram being used as soon as firefox is hidden in background, until firefox or my computer crashs.
Expected results:
No big specifique ram usage.
Updated•7 months ago
|
Updated•7 months ago
|
| Assignee | ||
Comment 1•7 months ago
•
|
||
Trying this locally, I think I might be doing it wrong.
How large is the gif, I tried with a 20MB gif.
How long do I need to keep it minimized before I start to see issues? I watched for like 5 mins, but is this more like a few hours?
I'll keep looking around for the root cause in the meantime.
| Reporter | ||
Comment 2•7 months ago
|
||
(In reply to Scott [:thecount] Downe from comment #1)
Trying this locally, I think I might be doing it wrong.
How large is the gif, I tried with a 20MB gif.
How long do I need to keep it minimized before I start to see issues? I watched for like 5 mins, but is this more like a few hours?
I'll keep looking around for the root cause in the meantime.
Hello ! Unfortunately, I’m no longer able to reproduce the bug despite using the same gif and following the same procedure. I am confused.
The gif was about 116MB in size, and my RAM usage used to increase rapidly (around 50 MB/s, if I remember correctly) right after minimizing the browser.
Maybe as this been patched in recents updates (although I didn't notice anything related in the patch notes).
Sorry for the inconvenience.
| Reporter | ||
Comment 3•7 months ago
|
||
Ok, I managed to reproduce it again.
I’m using the Windows 10 Task Manager to monitor RAM usage, and minimizing Firefox while having a gif set as the new tab background increases my overall system RAM usage, without affecting Firefox’s own memory usage (according to Task Manager).
From my tests, the heavier the gif, the faster the RAM usage increases.
| Assignee | ||
Comment 4•7 months ago
|
||
That's what I've been trying. I am not able to reproduce as of yet. I believe you, and there have been other reports of this issue.
I assume for you the gif does not matter, and this happens almost immediately.
however, I'm going try different gifs, and leaving it on overnight, see if that helps trigger it.
| Assignee | ||
Comment 5•7 months ago
|
||
I seem to be having better luck with a 50mb gif wallpaper.
The memory usage does seem to eventually stabilize, or at least slows down.
I think though this is bad enough that I can look into this, and hopefully it's the same issue others are experiencing.
| Assignee | ||
Comment 6•7 months ago
|
||
I seem to only be able to reproduce something like this on release.
Looks like on nightly this may have been fixed.
On release I played around with a few different options, and I also think I can fix it by changing the gif background wallpaper from background-attachment: fixed; to background-attachment: scroll; (anything not fixes really), and that also seems to fix it. (but breaks the wallpaper in other ways).
But I'm not able to reproduce all that consistently, even with a 500mb gif.
If this is in fact fixed on nightly, then we shouldn't need to change anything.
| Assignee | ||
Comment 7•7 months ago
•
|
||
Managed to reproduce on nightly.
I think just sometimes it's not consistent for me.
I see some other weird things happening when I set a gif wallpaper that I can track down.
| Assignee | ||
Comment 8•7 months ago
|
||
Comment 9•6 months ago
|
||
The severity field is not set for this bug.
:thecount, could you have a look please?
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 10•6 months ago
|
||
Comment 11•6 months ago
|
||
Thanks for the details provided so far. To help reproduce this issue consistently, could you provide a bit more information?
- the exact GIF file (or a link) that causes the issue
- how long Firefox needs to be minimized before the RAM usage spikes
- whether this happens with only the new tab page open or if other tabs are also open
- any settings or extensions that might be related
If possible, could you also try reproducing this in Troubleshoot Mode and let us know if the issue still occurs?
Comment 12•5 months ago
|
||
Redirect a needinfo that is pending on an inactive user to the triage owner.
:thecount, since the bug has recent activity, could you have a look please?
For more information, please visit BugBot documentation.
Updated•3 months ago
|
Updated•3 months ago
|
Updated•3 months ago
|
Comment 13•3 months ago
|
||
Comment 14•3 months ago
|
||
Comment 15•3 months ago
|
||
Backed out for causing bc leak failures
Backout link: https://hg-edge.mozilla.org/integration/autoland/rev/3d33af4581e40955e657da820d3e7a8b73c1d8c7
Updated•2 months ago
|
Comment 16•2 months ago
|
||
Comment 17•2 months ago
|
||
Comment 18•2 months ago
|
||
Backed out for causing bc failures @ browser_animatedImageLeak.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/2f122c5242dd0b72f7815afd5415d68152635038
Failure log -> TEST-UNEXPECTED-FAIL | layout/base/tests/browser_animatedImageLeak.js
Comment 19•2 months ago
|
||
browser_animatedImageLeak.js is a test I wrote specifically for this exact problem in different situations (animated images running in various scenarios where they aren't visible like minimized and leaking memory), let me know if you need any help with the test. In fact it might be good to modify that test to test the scenario in this bug so that we don't accidentally regress it.
| Assignee | ||
Comment 20•2 months ago
•
|
||
Yeah I might need help, when I fixed up the last test failure for the last backout, I got it passing locally.
So if it's failing again, or still, it may not be happening to me locally which is going to make it harder to fix.
| Assignee | ||
Comment 21•2 months ago
|
||
Essentially the off screen pre loaded newtab needs renderLayers set to true so when we write it, it's fast and doesn't produce a noticeable flicker or load.
This also means when the page is minimized, and a gif is set as the wallpaper, the gif goes wild and causes a memory leak.
My current attempt to fix it is to set renderLayers to false if the browser is minimized of fully occluded, and it it back to true if it's visible again.
| Assignee | ||
Comment 22•2 months ago
|
||
Looking at this again today, I think I got the test to fail locally. I think the key was not using --headless. Makes a lot of sense as it's probably changing the occluded state?
| Assignee | ||
Comment 23•2 months ago
|
||
Yeah that wasn't it. I suspect I need a debug build, so trying that now.
| Assignee | ||
Comment 24•2 months ago
•
|
||
Yup, a debug build triggered the same error locally and I was able to experiment and get a fix up. That test is now passing locally.
Essentially I think I still had some references kicking around, so I made some of them weak/scoped.
@tnikkel if you get a chance, no rush, to take a look that would be great.
Comment 25•2 months ago
|
||
I don't know the browser front end code but making references weak totally makes sense as a fix. And the test itself only runs in debug mode because it depends on some code that is debug only so that explains what you observed. If the test passes when you push to try it should be good.
Comment 26•2 months ago
|
||
Comment 27•2 months ago
|
||
| bugherder | ||
Updated•1 month ago
|
Description
•