GC overhead resulting 100% CPU usage and ending up freezes/hangs after each 30-60sec and occasionally panics on macOS
Categories
(Core :: Performance: General, defect)
Tracking
()
Performance Impact | pending-needinfo |
People
(Reporter: furkan.turkal, Unassigned)
Details
Attachments
(7 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/112.0
Steps to reproduce:
Firefox was working like a charm on my MacBook Pro '16 19 with Venture 13.0 macOS, without any issues. But somehow, after I did upgrade to Venture 13.2.1, Firefox started random hangs/freezes after each 30-60sec. And it takes ~5-10sec. I started to get random panics 2-3 per day.
I did not changed anything in the settings. This also happens in Private Window mode. I usually restart the computer everyday. (Eventually a new Firefox instance each new day, before Ventura 13.0 and still do after upgrade)
I have read the followings:
https://support.mozilla.org/en-US/kb/diagnose-firefox-issues-using-troubleshoot-mode
https://support.mozilla.org/en-US/kb/refresh-firefox-reset-add-ons-and-settings
But didn't help me to resolve the root cause.
I was checking out the "about:processes" page. The freeze happens when Firefox CPU exceed 100%. (During that time-window, my computer's CPU usage in between 10%-20%). I'm not sure what to problem is. But seems like garbage collector issue. I can see only the first item (which is Firefox) uses the CPU on limits (> 95%). Other processes does not even use a CPU! (Maybe max 3-5%.)
I have refreshed the Firefox (by keeping my tabs and history) and also renamed content-prefs.sqlite
to content-prefs.sqlite.old
and same problem started occurring again after one week.
mach_msg2_trap
shows 93% sample rate.
My Environment:
Firefox 110.0
macOS 13.2.1
Actual results:
- Very slow browsing experience
- Uses >95% CPU on idle (Firefox Process)
- Frequent freezes/hangs after each 30-60sec
- Occasionally panics
Expected results:
I expect no CPU usage at idle. I should understand the reason of "why" CPU usage is high and "who" actually consumes it.
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Widget: Cocoa' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•2 years ago
|
||
Uploading a saved memory report from about:memory from when you are experiencing the problem might help understand why the gc/cc is taking so long.
Reporter | ||
Comment 3•2 years ago
|
||
Reporter | ||
Comment 4•2 years ago
|
||
Uploaded memory-report.json.gz
file as requested.
Comment 5•2 years ago
|
||
Markus, do you have any thoughts here?
Comment 6•2 years ago
|
||
The long GC times in the parent process hint at a memory leak in the Firefox UI. Can you check whether any of your add-ons might be part of the triggering circumstances?
Reporter | ||
Comment 7•2 years ago
|
||
A video that demonstrates Firefox is hanging after a few hours of usage.
Reporter | ||
Comment 8•2 years ago
|
||
Sorry for the second comment; there is no edit button on the previous comment.
I attached a video that demonstrates Firefox is hanging after a few hours of usage:
- Unable to open a new tab
- Unable to close a tab
- Unable to jump any websites (even about: pages)
- Unable to open TaskManager
CPU usage is on limit, >3Gi MEM is available.
Reporter | ||
Comment 9•2 years ago
|
||
The long GC times in the parent process hint at a memory leak in the Firefox UI. Can you check whether any of your add-ons might be part of the triggering circumstances?
I check the extensions from TaskManager and during GC::collect step (when CPU exceeds >95%), extensions
still shows 0% CPU usage with 5Gi of memory. How can I do further analyze?
Comment 10•2 years ago
|
||
You can disable all your extensions and wait for the problem to re-occur. If it doesn't, you can bisect until you find the add-on which causes it.
You can also try to see where the memory usage in the parent process is, on about:memory.
Comment 11•2 years ago
|
||
This bug was moved into the Performance component.
:furkan.turkal, could you make sure the following information is on this bug?
- For slowness or high CPU usage, capture a profile with http://profiler.firefox.com/, upload it and share the link here.
✅ For memory usage issues, capture a memory dump fromabout:memory
and attach it to this bug.- Troubleshooting information: Go to
about:support
, click "Copy raw data to clipboard", paste it into a file, save it, and attach the file here.
If the requested information is already in the bug, please confirm it is recent.
Thank you.
Comment 12•2 years ago
|
||
The component has been changed since the backlog priority was decided, so we're resetting it.
For more information, please visit BugBot documentation.
Reporter | ||
Comment 13•2 years ago
|
||
Here is the video of Firefox UI is entirely broken after a while. I've disabled all the plugins but only 3 of enabled: Vimium, Symantec, uBlock, Refined GitHub
Reporter | ||
Comment 14•2 years ago
|
||
Reporter | ||
Comment 15•2 years ago
|
||
Including the Profiler URL. During the 30s of profiling, Firefox hanged almost 3 times.
Reporter | ||
Comment 16•2 years ago
|
||
Included the profiling and raw data as requested. And also a video about UI unresponsiveness.
Updated•2 years ago
|
Comment 17•2 years ago
•
|
||
Oh, looking at the video, this doesn't seem like a performance issue - the UI is just broken! I'm not sure what might be going on there. Do you see any errors on the browser console?
It's also worth checking if add-ons are involved in this, though I'd hope that add-ons wouldn't be able to cause this kind of breakage.
Reporter | ||
Comment 18•2 years ago
|
||
this doesn't seem like a performance issue
Actually I don't agree for this. It's not just about frozen-UI. Firefox is extremely slow and always hangs with over 100% CPU peaks. I also tried by disabling the plugins and issue still persists. I have to kill the main process almost every hour.
Did you able to check the performance profiler logs?
Comment 19•2 years ago
|
||
(In reply to furkan.turkal from comment #13)
I've disabled all the plugins but only 3 of enabled: Vimium, Symantec, uBlock, Refined GitHub
All of these appear to listen for tab updates, possibly with the exception of Vimium. Do you have a lot of tabs open?
The GCs in the parent process are running under this convert
function from ext-tabs-base.js, which is only used when add-ons are installed which observe the tab bar. So it would still be interesting to know if the performance problems go away if these add-ons are disabled.
Comment 20•2 years ago
|
||
Moving to the Performance component to get more insights about what happened here.
Comment 21•2 years ago
|
||
As requested by Markus we need to know whether this issue still occurs when -all add-ons- are disabled.
Please let us know if you still see the issue when not using any add-ons.
Updated•2 years ago
|
Comment 22•2 years ago
|
||
A needinfo is requested from the reporter, however, the reporter is inactive on Bugzilla. Given that the bug is still UNCONFIRMED
, closing the bug as incomplete.
For more information, please visit BugBot documentation.
Description
•