Open Bug 1879521 Opened 4 months ago Updated 8 days ago

Massive memory leak and hang in Firefox GPU process

Categories

(Core :: Graphics, defect, P1)

x86_64
Windows 10
defect

Tracking

()

People

(Reporter: tdulcet, Assigned: ahale)

References

(Blocks 2 open bugs)

Details

Attachments

(3 files)

For more than a year now, I have had this issue where the Firefox GPU process occasionally hangs, which causes Firefox to become very slow and some tabs to become unresponsive. Restarting Firefox usually resolves the issue. Normally it occurs very infrequently (less than once a month), but it has occurred twice so far today. I also noticed that the GPU process was using an inordinate amount of memory (see attached screenshot)

I tried to record a profile, but the profile importer just hangs on the loading animation. The browser console also opens a blank window. I am currently using Firefox 122.0.1.

The Bugbug bot thinks this bug should belong to the 'Core::Graphics' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Graphics
Product: Firefox → Core
Attached file memory-report.json.gz

I attached the memory report, but I do not see what is using the 37 GB.

Could you upload your about:support?

Flags: needinfo?(tdulcet)
Attached file about:support

Attached is the requested about:support information.

Flags: needinfo?(tdulcet)

An integrated and a discrete gpu, I wonder if that is related.

See Also: → 1847453
See Also: → 1798074

Ashley, I think you've been looking into similar bugs as this? Do you have any thoughts on this? Does it sound familiar? Thoughts on moving it forward?

Flags: needinfo?(ahale)
OS: Unspecified → Windows 10
Hardware: Unspecified → x86_64
Assignee: nobody → ahale
Blocks: gfx-triage
Severity: -- → S2
Flags: needinfo?(ahale)

My suspicion from the about:support is that the Intel UHD 630 driver (from 2021) might not have the best interactions with the NVIDIA RTX 2060 driver (from 2023), as those are probably different feature levels in terms of WDDM, but the interesting part to me is that the Firefox Task Manager is showing the bloated GPU process memory, this is different than the other bugs I've been looking at where the memory usage only shows up in system level monitoring tools and not in the builtin about:processes (Firefox Task Manager).

I'm not sure how to move this forward at this time, I'll be thinking about it as I investigate the other memory usage bugs.

Firefox 126.0 (Build ID 20240509170740) mozilla-MSIX Windows 11
AMD Ryzen 7 PRO 6850U with Radeon Graphics

Firefox open for a while, browsing, watching videos when computer goes

"You're running low on disk space"

gpu process sitting at over 20GB reserved memory -> about:memory screenshot

(memory usage also showed in the about:processes here)

(In reply to Teal Dulcet [:tdulcet] (TB Council) from comment #2)

Created attachment 9379187 [details]
memory-report.json.gz

I attached the memory report, but I do not see what is using the 37 GB.

Yeah, it looks similar to the decoder device leak I was able to repro in https://bugzilla.mozilla.org/show_bug.cgi?id=1847453#c47 but that bug is on AMD drivers, perhaps there is a similar leak on Intel UHD 630 drivers or NVIDIA RTX 2060 drivers but it would surprise me.

There have been changes in Firefox Nightly recently to try to work around https://bugzilla.mozilla.org/show_bug.cgi?id=1847453 which might reduce the problem if it is of a similar nature.

This part of your GPU process listing is key:
8.21 MB ── d3d11-shared-textures
0.00 MB ── gfx-d2d-vram-draw-target
0.00 MB ── gfx-d2d-vram-source-surface
37,629.26 MB ── gpu-committed
0.00 MB ── gpu-dedicated
5,579.38 MB ── gpu-shared
232.11 MB ── heap-allocated
1.00 MB ── heap-chunksize
311.00 MB ── heap-mapped
38,327.88 MB ── private
18,579.29 MB ── resident
18,578.17 MB ── resident-unique
4.27 MB ── shmem-allocated
36.72 MB ── shmem-mapped
267.71 MB ── system-heap-allocated
0 ── unresolved-ipc-responses
2,140,627.40 MB ── vsize
130,618,014.06 MB ── vsize-max-contiguous

Flags: needinfo?(tdulcet)

Thanks for the information. As I noted in comment 0, the bug happens infrequently, but I can post again next time it occurs if needed.

The memory used by GPU process as listed in about:processes is always higher than I would expect (not sure if it is related to this bug). It usually starts at about 3 GB when I open Firefox and then increases up to around 7 GB over the course of the day. When combined with the leak described in bug 1834526 comment 28, this causes Firefox to use a lot memory on my system in general.

Flags: needinfo?(tdulcet)
Priority: -- → P1
Blocks: gfx-mem-leaks
No longer blocks: wr-gpu-memory
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: