Closed Bug 661527 Opened 13 years ago Closed 13 years ago

JS/GC-heap memory usage goes up forever when firefox left idle, it stops and recovers memory when activity such as loading a new page or opening/closing tab.


(Firefox :: General, defect)

4.0 Branch
Windows 7
Not set





(Reporter: chrcoluk, Unassigned)



(Keywords: memory-leak)


(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv: Gecko/20110420 Firefox/3.6.17
Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1

I clean installed firefox 4 on to a fresh windows 7 64bit installation.  The system has a ncidia graphics card, dual core amd processor and MSE security app, uses windows 7 built in firewall.
I proceeded to load some sites into tabs, use the browser for a while and then left the system idle, because the system is a spare testing system it was actually left idle for aome days.  On returning I found firefox was using over 3 gig of memory.  This is with a clean profile and no extensions added.
I restarted the app but the behaviour was repeated.
The behaviour also occurs with my usual set of extensions loaded.
If firefox4 is left running long enough it crashes, a few days back I had left it idle for a week and when coming back to the system firefox had crashed, the crash report showed it was using 90% of system memory which was 8 gig so 7.2gig of memory been used for around 10 tabs. On startup those 10 tabs use about 240meg memory.
If I do something after it has been left idle, not only does the memory leak stop but the memory actually is recovered.  If the memory usage is many gigs then firefox will temporarily stop responding and appear to have crashed, but if leave it alone its simply recovering the memory and will eventually be responsive again.  It will fully recover the memory.
Examples to recover the memory is pretty much any activity such as refreshing focused page, opening new tab, closing tab.
about:memory shows JS/gc-heap as the culprit.
My guess is that GC routines are not running at all when idle and run when I start to use the app.
extensions accelerate the memory increase but appear to not be causing it.
Firefox5 has the same leak it seems but seems to be running periodically a GC routine as the memory keeps recovering, growing, recovering, whilst ff4 just grows.  FF3.6 doesnt have this leak at all.

I know there is many memory leak related bug reports, I have even added to one but this exact issue I havent seen worded in one.

Reproducible: Always

Steps to Reproduce:
1. Install firefox 4.0.1 on a windows 7 64bit installation into a new fresh installation directory.
2. If profile exists use new profile.
3. Load some sites in different tabs.
4. Leave it idle ideally at least for half a day, ideally the system should be completely idle so not even using other apps.
5. It is mainly been accessed over remote desktop so might be relevant.

Actual Results:  
JS/GC-heap was very high, half a day of idle is usually enough to get it over 1 gig of usage.

Expected Results:  
As it did.

Windows 7 64bit SP1
Nvidia 7600GT 275.27 drivers
Dual core amd 64 X2 5600+ with cool n quiet enabled
IDE mode for drives.
Intel 1000GT NIC
All drivers are windows default except nvidia.

Mainly been used over remote desktop over my lan from another pc.
Microsoft security essentials, default settings.
Windows 7 firewall default, so inbound only protection.
Version: unspecified → 4.0 Branch
Attached file crash report
this is crash report from when I left it idle for a week.
Does this also happen in Firefox Safe mode?
Can you see if Bug 639780 or Bug 638238 already cover your problem?
Blocks: mlk-fx4
Keywords: mlk
Depends on: 656120
I'm pretty sure bug 656120 will fix this when it'd implemented.
Closed: 13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.