Closed Bug 1814262 Opened 1 year ago Closed 6 months ago

firefox intermittently pegs all CPUs at 100% and becomes unusable (profile attached)

Categories

(Core :: Performance, defect)

Firefox 109
x86_64
Linux
defect

Tracking

()

RESOLVED INACTIVE
Performance Impact ?

People

(Reporter: github, Unassigned, NeedInfo)

Details

Attachments

(3 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36

Steps to reproduce:

Normal web browsing. I keep a few dozen tabs open for slack, discord, github, etc. Firefox will at times work fine for an hour or more and then will randomly peg all CPUs at 100% and become unresponsive. I captured a profile of this occurring and have uploaded it to here: https://share.firefox.dev/3DydPzh

Actual results:

All browser tabs become unresponsive and all CPUs are pegged at 100%.

Expected results:

Browser tabs should be responsive and CPU utilization should be normal.

Please note that I am filing this bug with chromium at the moment because firefox is not working. I'm using the standard firefox package on Ubuntu 20.04 LTS

$ dpkg -l | grep firefox
ii firefox 109.0+build2-0ubuntu0.20.04.1 amd64 Safe and easy web browser from Mozilla
$ cat /etc/issue.net
Ubuntu 20.04.5 LTS

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

Component: Untriaged → Startup and Profile System
Product: Firefox → Toolkit

correct user agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/109.0

Component: Startup and Profile System → Untriaged
Product: Toolkit → Firefox

Hello! I have tried to reproduce the issue using firefox 111.0a1 (2023-02-03) on Ubuntu 22.04 but unfortunately I wasn't able to reproduce it on my end.
Could you please answer the following questions in order to further investigate this issue?

  1. Does this issue happen with a new profile? Here is a link on how to create one: https://support.mozilla.org/en-US/kb/profile-manager-create-remove-switch-firefox-profiles
  2. Does this issue happen in the latest nightly? Here is a link from where you can download it: https://www.mozilla.org/en-US/firefox/channel/desktop/
  3. Do you have any addons installed if so can you list them?
Flags: needinfo?(github)
Performance Impact: --- → ?
Component: Untriaged → Performance
OS: Unspecified → Linux
Product: Firefox → Core
Hardware: Unspecified → x86_64

This bug was moved into the Performance component.

:github, 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 from about: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.

Flags: needinfo?(github)
Attached file about.support.json
Flags: needinfo?(github)

(In reply to Negritas Sergiu, Desktop QA from comment #3)

  1. Does this issue happen with a new profile? Here is a link on how to create one: https://support.mozilla.org/en-US/kb/profile-manager-create-remove-switch-firefox-profiles

Seems to yes.

  1. Does this issue happen in the latest nightly? Here is a link from where you can download it: https://www.mozilla.org/en-US/firefox/channel/desktop/

Sorry I'm only able to install the official firefox ubuntu package. Currently have Firefox 112.0.2:

$ dpkg -l | grep firefox
ii firefox 112.0.2+build1-0ubuntu0.20.04.1 amd64 Safe and easy web browser from Mozilla

  1. Do you have any addons installed if so can you list them?

Just adblock plus.

(In reply to Release mgmt bot [:suhaib / :marco/ :calixte] from comment #4)

In the original bug report: https://share.firefox.dev/3DydPzh

  • For memory usage issues, capture a memory dump from about:memory and attach it to this bug.

TTBOMK no memory issues; my system had free memory available at the most recent reproduction.

  • Troubleshooting information: Go to about:support, click "Copy raw data to clipboard", paste it into a file, save it, and attach the file here.

Attached a current snap of about:support; likely to be more recent than the captured profile.

The problem reproduced today on firefox 112.0.2. I've captured a profile but the profiler errors out when attempting to upload it. I also tried to attach it to this bug directly but its size (150MiB) exceeds the 10MiB attachment limit. I have instead attached a screenshot of the profiler view if that's helpful. The last firefox symbol in the callstack seems to be nsAppShell::DoProcessNextNativeEvent(). I have also downloaded it and will keep it local; if someone can provide an upload link somewhere I'd be happy to upload it. Finally, I've also attached a screenshot of htop showing that a big chunk of the CPU is being burned in the kernel when the problem manifests. Are there metrics on total number of these events captured somewhere in the profile? May be worth looking at quickly to see if there's an unexpectedly high number of events being generated/processed.

Attached image profiler_screenshot.png
Attached image htop_screenshot.png

Any updates on this? This continues to happen several times a day on one of my machines. Please let me know what additional info I can provide.

Could you try to create a new performance profile?
The initial profile hints that a possible cause for this might be session store, but that would be mostly bug 1795312, which was fixed in 112.
Though, the threads aren't too busy. A profile which captures all the threads might be useful.
If you go to the profiler's settings, there should be "Bypass selections above and record all registered threads".
And one shouldn't need to capture very long profile.

Also, that DoProcessNextNativeEvent and especially the pollwrapper underneath it means the thread is mostly idle.
Some other thread is taking the cpu time.

Flags: needinfo?(github)

(In reply to Olli Pettay [:smaug][bugs@pettay.fi] from comment #11)

Could you try to create a new performance profile?

Per comment #7 I have one but the site won't let me upload it. Can you provide an alternative upload url? I will try to grab another in the meantime.

And one shouldn't need to capture very long profile.

The system is so unresponsive to UI input when the bug manifests and the profiler is running that it's difficult to capture a smaller one.

Flags: needinfo?(github)

This bug reproduced again today on Firefox 114.0.2 and I was able to capture a shorter profile:

https://share.firefox.dev/3XEPD7g

Any chance someone could look at this profile and see what's chewing all of the CPUs?

Flags: needinfo?(fdoty)

While we investigate this issue further, one idea we've had after reviewing the available profiles is that your graphics card driver seem very out of date which could be causing system issues that are then affecting Firefox. Could you try updating your drivers and report back if the issue persists? We should have more information shortly.

Flags: needinfo?(fdoty) → needinfo?(github)

With no answer from the reporter, we don’t have enough data to reproduce and/or fix this issue. Please reopen or file a new bug with more information if you see it again. Details of our performance triage process can be found at https://wiki.mozilla.org/Performance/Triage.

Status: UNCONFIRMED → RESOLVED
Closed: 6 months ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: