Closed Bug 978223 Opened 10 years ago Closed 9 years ago

Firefox uses excessive amounts of kernel_task memory and causes the system to pause until firefox is shut down.

Categories

(Firefox :: Untriaged, defect)

27 Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: fiveNinePlusR, Unassigned)

Details

(Whiteboard: [MemShrink])

Attachments

(10 files)

Attached image problem.png
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1707.0 Safari/537.36

Steps to reproduce:

just use the browser for a while.


Actual results:

firefox itself uses ~1.5-2.5GB of ram. kernel_task uses up to 9GB of ram and pauses the firefox executable until you shut it down. After the firefox process is shut down the kernel memory usage goes down to 1.5GB.


Expected results:

much lower memory usage in the kernel is expected. not pausing the system due to memory leaks is expected.
I took a snapshot of the memory usage when kernel_task is at 8.44GB. The system is reporting 40GB of memory in use by firefox. this only recently started happening after upgrading to FF27.
Firefox 35.0.1, OS X Mavericks, Macbook Pro i7, Intel 320 SSD.

Firefox uses up to 6.0 GB of RAM (yes, gigabytes) and kernel_task uses up to 600 MG of ram. "Quit" does not work, and so I have to force-quit.

The symptoms are slowdown, minifreezes, freezes, and the mac heating up. The problem led to overheating and the mac died. The screen went black. So I took it to the apple store and got some repairs on it. 

But the problem came back again in about one month. I took it into the mac store again and I then learned that Firefox was using over 6 gb of memory. The Genius bar ran Apple diagnostics and determined that the hard drive, an Intel 320 SSD, had also incurred damage.

The problem seems to be related to Firefox possibly one or more of the Firefox extensions I am running. The problem gets worse when I run trading view and especially multiple tabs of tradingview. But 

It seems to be the case that the combination of Firefox, the extensions, and Tradingview has caused a massive memory leak, and that this has damaged my hard drive.

I have, however, noticed that Google Chrome Helper has the same issue, but this is only after installing plugins:

Privacy Badger
Google Analytics opt-out
Cookie Monster

I also have Privacy Badger in Firefox, so I did a bugzilla.mozilla.org search for Privacy Badger, but I could not find a matching result.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached image firefox.png
Firefox using over 3.0 Gigabytes of memory. It was frozen and I could not quit. Had to eventually force quit after minutes of spinning beach ball.
mapish, do you still see this problem?(



In reply to Garrett Smith from comment #2)
> Firefox 35.0.1, OS X Mavericks, Macbook Pro i7, Intel 320 SSD.
> 
> Firefox uses up to 6.0 GB of RAM (yes, gigabytes) and kernel_task uses up to
> 600 MG of ram. "Quit" does not work, and so I have to force-quit.

Confirmation of a bug is based only on high memory and high kernel CPU seems a rather tenuous approach
Flags: needinfo?(mapish)
Whiteboard: [closeme 2015-04-10]
No, the memory issue is not as bad as it was. I don't think that the memory issue is fixed but it's not as bad as before. there is still very high kernel mem of aroudn 6gigs and a somewhat reduced firefox memory profile of around 1.2 gigs. I have had to modify my routine to restart firefox every few days and it's helped a bit but not what I'd call a solution.
Flags: needinfo?(mapish)
You will want to narrow down to a tiny number, or one, which pages or addons are causing most of the memory usage.  The about:memory tool may help you
Flags: needinfo?(mapish)
How useful are the anonymous memory stats if I upload them?
Flags: needinfo?(vseerror)
(In reply to mapish from comment #8)
> How useful are the anonymous memory stats if I upload them?

better than none :)
any you can also look at the real one yourself, they are ordered by size so you can see for  yourself what's the most
Flags: needinfo?(vseerror)
Resolved per whiteboard
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(mapish)
Resolution: --- → INCOMPLETE
Whiteboard: [closeme 2015-04-10]
It still happens. I have a mem dump to upload but I can't figure out how to do it now.
Status: RESOLVED → REOPENED
Flags: needinfo?(pppx)
Resolution: INCOMPLETE → ---
Use "Add an attachment" at top of this page
Flags: needinfo?(pppx)
Flags: needinfo?(pppx)
You have some heavy pages, but gc-heap [465] points to some leak.
Usual question: is it reproducible in Safe Mode?
Flags: needinfo?(pppx) → needinfo?(mapish)
I just saved a memory report where the kernel memory is 5.42GB and Firefox is using 4.91GB of ram. After shutting down Firefox the kernel memory immediately drops to 1.42GB. What causes this kind of crazy kernel memory use? I will also upload the memory use from before restarting Firefox. 

using Firefox without addons is not really something that I really want to do. the only ones that I use are basically ad blockers and privacy protectors.
Flags: needinfo?(mapish) → needinfo?(pppx)
(In reply to mapish from comment #15)
> using Firefox without addons is not really something that I really want to
> do.
Then you wouldn't find a reason of your problem. The choice is yours
Flags: needinfo?(pppx)
also .5gb in images.
Is there really need to be concerned about showing which websites are currently open?

There's nothing actionable here without a test of safe mode, and list of addons.
And how many tabs are open.
(In reply to Wayne Mery (:wsmwk, use Needinfo for questions) from comment #5)
> mapish, do you still see this problem?(
> 
> 
> 
> In reply to Garrett Smith from comment #2)
> > Firefox 35.0.1, OS X Mavericks, Macbook Pro i7, Intel 320 SSD.
> > 
> > Firefox uses up to 6.0 GB of RAM (yes, gigabytes) and kernel_task uses up to
> > 600 MG of ram. "Quit" does not work, and so I have to force-quit.
> 
> Confirmation of a bug is based only on high memory and high kernel CPU seems
> a rather tenuous approach


I was confirming that the symptoms actually happen. How could I better help you profile this problem?

My SSD was destroyed so I got a new HD. My logic board, too. I went through 2 logic boards and 1 hard drive. I stopped using Firefox, and had to replace the logic board 1 time, and this was after heavy quicktime usage. 

I started using it again, and Firefox today was using 2 GB memory, fan on, battery going from 40% to 0 in a matter of minutes. So the symptoms persist. It always seems to have to do with video.
Attached is the memory report from a session in which Activity Monitor was reporting Firefox to have around 1.5GB of memory usage and the kernel_task to have about 5GB of memory usage. 

After restarting Firefox the usage fell to 725MB for FF and 1.4GB for the kernel_task Memory column. Firefox is much faster after this restart.

I also attached a picture of the current addons that are running.
Flags: needinfo?(vladan.bugzilla)
Attached image current addons
Flags: needinfo?(vladan.bugzilla)
Attached file my4oiFFp.dms.zip
profiler data
memory report
Regarding comment 23 and 24 firefox is using ~6GB of ram and the kernel is using ~5.5GB of ram. Moderate use. 2 Windows and 8 tabs total.
Whiteboard: [MemShrink]
So this is *really* unusual:

> ├──4,373.15 MB (75.63%) ── heap-unclassified

And this is suspicious too:

├────489.94 MB (08.47%) -- window-objects
│    ├──369.59 MB (06.39%) -- top(none)
│    │  ├──333.61 MB (05.77%) -- detached
│    │  │  ├──238.33 MB (04.12%) -- window(chrome://browser/content/browser.xul)

Typically in situations like this it's an add-on that's the cause. That's the reason Wayne asked for measurements in safe mode -- that disables add-ons. The idea is not that you should disable all add-ons forever, but rather disable them temporarily to see if you can identify one of them as the problem.
The detached/window part of things looks like bug 1224577.
As per discussion in IRC the reporter is no longer seeing this on nightly after disabling and re-enabling their add-ons.

Their use case was a very long running session, frequently opening a new window for certain tasks and then closing it when done. So, as mccr8 noted, this would map pretty well to bug 1224577.

mapish, I'm going to close this for now but if you see similar symptoms again please feel free to reopen. If you notice other leaks a new bug report would be much appreciated.
Status: REOPENED → RESOLVED
Closed: 9 years ago9 years ago
Resolution: --- → WORKSFORME
The way to prevent Firefox from gobbling up all my memory is to not use it. I'm done with Firefox, at least for now. Maybe I'll try it again next year.
The way to prevent Firefox from gobbling up all my memory is to not use it. I'm done with Firefox, at least for now. Maybe I'll try it again next year.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: