Closed Bug 1556263 Opened 5 years ago Closed 3 years ago

Abnormally high CPU usage on Firefox 67 running on MacOS 10.14

Categories

(Core :: Performance, defect)

67 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1420699

People

(Reporter: jess.aleksander, Unassigned)

Details

(Keywords: perf)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Firefox/60.0

Steps to reproduce:

I was having udemy open, along with reddit, openclassrooms, remix icons, unDraw, flawlessapp.io, youtube, and few others, though none of these pages were utilizing a lot of resources.

I also have a probe from MacOS activity manager, should it be needed. Right now it's at 180% of CPU usage.

Actual results:

Firefox suddenly started behaving like crazy. Right now it even lags as I type text here.

Expected results:

I would expect my browser to not try to melt my computer.

Component: Untriaged → Performance
Product: Firefox → Core
Whiteboard: [qf]

Hi Jess! Thanks for the report and the profile. We've loaded it into our profiler UI here: https://perfht.ml/2IRyAKt

Unfortunately, that profile is missing data for most of the time that it captured. Would you mind reprofiling the issue, perhaps with a higher "Buffer Size" in the Firefox profiler settings? Hopefully that'll generate a profile with more useful data and help identify the issue.

Flags: needinfo?(jess.aleksander)

Hi Jess, another thing that would help us out would be an Activity Monitor report. Could you also check whether this problem happens in Firefox Nightly? You can download it here, it will use a separate Firefox profile: https://www.mozilla.org/en-US/firefox/channel/desktop/#nightly
If the problem does occur in Firefox Nightly, please capture a report as follows: In Activity Monitor, select the Firefox Nightly process that takes up too much CPU, and then select "Sample Process" from the gear icon's dropdown. Then save the result as a text file and attach it here.
Ideally you could do this while Nightly is in a state where there's not much going on on the screen, i.e. a state where it really should not have a reason to use much CPU.

Thanks!

(Not enough information to triage this.)

Whiteboard: [qf] → [qf:investigate]

It happened again. 98% CPU used. I am done with Firefox; I can't worry whether this stuff will happen or not. I need a stable browser that doesn't require my computer to do unnecessary heavy lifting, even if it happens only once a month. I saved another profile .json. https://send.firefox.com/download/99d0f94ec3ab52b0/#EvYfUWmeV9kdFAVJ_z2kkg (100 downloads or 7 days)

It is the worse one; the better one taken after few hours didn't save.

Flags: needinfo?(jess.aleksander)

I'm sorry for the bad experience there - I hope we can get to the bottom of this.

Thanks for capturing that profile. I was able to download it, and I imported it into our profiler viewer here (some tracks hidden to start out, haven't done any analysis yet): https://perfht.ml/2XO3PdG

Here's the profile with all tracks visible: https://perfht.ml/2XOtWRt

The main thing that jumps out at me there is:
(1) there are quite a lot of threads altogether -- maybe some of the problem here is just contention between many threads/processes?

(2) there are large red bars (which typically indicate jank/failure-to-yield-in-a-reasonable-time) in "ImageDecoder" threads in various processes. The most severe of them seem to be in the WebExtensions process, actually. Here's the profile with just that process's red-bar-jank threads visible:
https://perfht.ml/2XRClDG
However, the samples are all in __psynch_cvwait which I think means the threads aren't actually doing anything (not occupying CPU) -- they're just blocked. But I'm not sure why we choose to show red bars for some of that time & not for the whole time.

mstange, do you know what's going on with the red jank bars here? And can you see any hints about the reporter's observed 98% cpu usage during this profile?

Flags: needinfo?(mstange)

What is the status on this?
I am stilling see the same pattern with Firefox 76.0.1 64 bit.

./Lars

Hi,

I am the person who experienced this bug and reported it a year ago.

Has the bug been solved yet? Are you all close? Can I finally use FF on a Mac?

Flags: needinfo?(plawless)

Hi Jess,

unfortunately we were not able to determine the cause of the problems Firefox had on your machine from the profiles. And I cannot say whether the problem is fixed now - for most of us, Firefox was working fine all along. It would be great if you could test again and report whether the problem is fixed for you now.

If the high CPU usage during idleness still occurs, there are two things worth trying out:

  1. It seems like there was a large number of add-ons installed. It would be good to confirm whether the problem still occurs if you disable all add-ons.
  2. I'm still interested in an Activity Monitor sample, as described in comment 2. The Firefox profiler is not optimized for debugging problems with idle CPU usage.

(In reply to Daniel Holbert [:dholbert] from comment #6)

mstange, do you know what's going on with the red jank bars here? And can you see any hints about the reporter's observed 98% cpu usage during this profile?

I actually don't understand those jank bars. Maybe it means that the threads didn't get scheduled for a while.

Flags: needinfo?(plawless)
Flags: needinfo?(mstange)

We did however make large improvements to GPU usage in Firefox 70, so it's worth giving Firefox another try just for that.

Hi.. have been having the same CPU issues on MacOS. They seemed to get slightly better in recent releases, but then 77.0.1 (and perhaps 77.0) is far worse. Hoping the attached activity monitor sample of the ff process (at 110% CPU as I type this) will be of help. Please let me know if you need any additional data collected.

Looks like a duplicate of bug 1420699.

Performance Impact: --- → ?
Whiteboard: [qf:investigate]

We'll continue investigation over on bug 1420699.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
Performance Impact: ? → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: