Firefox 3 memory use explodes by itself randomly

Bug #314424 reported by Wirawan Purwanto
28
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Mozilla Firefox
Invalid
Medium
firefox-3.0 (Ubuntu)
Confirmed
Undecided
Unassigned
Nominated for Hardy by Wirawan Purwanto
Nominated for Intrepid by Wirawan Purwanto

Bug Description

Hi,

I noted that the recent versions of Firefox (3.0.4 and 3.0.5) would randomly explode in terms of memory use. It happened on at least the following two machines:

* laptop, Dell Lattitude D600 (768 MB RAM, Pentium M), OS: Ubuntu 8.10 with firefox 3.0.4 and later 3.0.5
* desktop, Dell Dimension 8250 (2 GB RAM, Pentium 4), OS: Ubuntu 8.04 with firefox 3.0.5

This problem happened to me today on the desktop, in which `top' reported the following memory use:

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
10021 wirawan 20 0 109m 1684 1668 R 100 0.1 1472:19 ld-linux.so.2
 9675 wirawan 20 0 2049m 1.7g 6312 S 2 87.9 22:23.60 firefox

I typically let firefox run for many days on this machine, as this is a desktop machine in office. The computer is also never suspended. Fortunately the computer has 2G of memory so I could still manage to bring down firefox without injuring the whole system. I post the other process too; It was actually Acroread 8; `ps faux' reports:

wirawan@orbital:~$ ps faux|grep '100[2]1'
wirawan 10021 3.9 0.0 111904 1688 ? R 2008 1485:20 /lib/ld-linux.so.2 /opt/Adobe/Reader8/Reader/intellinux/bin/acroread --display :0.0 -progressPipe 3 -exitPipe 4

I suspect that it was started as a plugin by firefox. Unfortunately I already killed everything by now. I am sure that this problem would appear again, and if it does, I will post more information here.

Firefox was upgraded yesterday to version 3.0.5, so it has been running for less than 24 hours. Other than the PDF plugin, and Ubuntu standard plugins (vlc, mplayer, divx, quicktime), I don't have any other plugins. Specifically, this firefox is not equipped with Adobe Flash plugin.

The last pages that I left on, (if I am correct, based on the firefox's sessions restored), are:

* http://www.bestbuy.com/site/olspage.jsp?id=pcat17071&type=page&initialize=false&sp=-bestsellingsort+skuid&nrp=15&iht=n&list=y&sc=Global&st=under_20page&usc=All+Categories&ks=960&prids=&cp=3&qp=&_requestid=556654
* http://www.chem.ucla.edu/dept/Faculty/dxn/pages/teaching.html
* http://www.pcc.qub.ac.uk/tec/courses/f90/stu-notes/f90-stu.html
* http://support.dell.com/support/edocs/systems/dim8200/codes.htm

I don't recall how much memory this firefox uses last night, before this exploded today. Probably I should make a simple cron job to collect the stats of firefox, eh?

Usually the memory explosion happens when the computer is idling and screen saver is running. I wonder if there *is* indeed correlation between these two. In the past, I never encountered this kind of memory explosion in the past with firefox 2, if I remember it correctly. Another thing that I suspect is whether heavy-duty pages such as Yahoo mail (the new interface) is a culprit also. I cannot confirm this yet.

If anyone ever experience this kind of problem, please add your comment. It is very annoying that now firefox becomes a time bomb in my computer. What I do temporarily as a workaround in my laptop is to add the following limitations on its startup script (/usr/lib/firefox-3.0.5/firefox.sh), just before the execution of firefox binary:

# Limiting virtual address space, data segment, and resident memory
ulimit -d 500000
ulimit -v 500000
ulimit -m 250000

This is *not* without its own peril, as I observe that firefox's vmsize can grow quickly although the real rss is not that big.

Wirawan

Revision history for this message
Scott Talbert (swt-techie) wrote :

Hi Wirawan,

I recently ran across a similar problem in Intrepid. If I left Firefox running, it would eventually consume all of my memory and cause lots of problems. I spent a considerable amount of investigating this, and I recently determined that it was actually caused by leaving Firefox open with Best Buy's website. This is likely to be the cause of the your problem as well as you listed bestbuy.com as one of the websites you had open when Firefox started gobbling up memory. Also, this doesn't appear to be an Ubuntu-specific problem. I was able to reproduce this with the Windows version of Firefox as well. Thus, I plan on reporting this apparent bug to Mozilla.

Scott

Revision history for this message
In , Scott Talbert (swt-techie) wrote :

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.5) Gecko/2008121622 Ubuntu/8.10 (intrepid) Firefox/3.0.5
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.5) Gecko/2008121622 Ubuntu/8.10 (intrepid) Firefox/3.0.5

There is an apparently memory leak when viewing Best Buy's website (http://www.bestbuy.com/) in Firefox. When I load this website and then leave Firefox alone, memory usage grows indefinitely. This occurs in version 3.0.5 (both Windows and Linux versions) as well as in the latest nightly Windows build. This appears to be JavaScript related, as the memory usage does not appear to grow if I disable JavaScript and load bestbuy.com.

Reproducible: Always

Steps to Reproduce:
1. Access http://www.bestbuy.com/
2. Watch memory usage grow.
3.
Actual Results:
Memory usage grows indefinitely.

Expected Results:
Memory usage is stable.

Changed in firefox:
status: New → Confirmed
Revision history for this message
In , Highmind63 (highmind63) wrote :

Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5

Can't reproduce this. Have you tried this in safe mode http://support.mozilla.com/en-US/kb/Safe+Mode and with a new profile http://support.mozilla.com/en-US/kb/Basic+Troubleshooting#Make_a_new_profile ?

Revision history for this message
In , Scott Talbert (swt-techie) wrote :

I still appear to be able to reproduce this with the Windows trunk version in safe mode and with a new profile. I did the following:

1. Ran 'firefox.exe -ProfileManager' and created a new profile, 'NewProfile'.
2. Ran 'firefox.exe -safe-mode -P NewProfile'.
3. Entered 'http://www.bestbuy.com/' in the address bar.
4. Watched firefox.exe in task manager. It started at around 43MB and grew to approximately 78MB after 5 minutes.

Revision history for this message
In , Scott Talbert (swt-techie) wrote :

Natch, did you have JavaScript enabled when you tried to reproduce this?

Revision history for this message
In , Highmind63 (highmind63) wrote :

Yes but I didn't wait for 5 minutes :/, I'll test this again later.

Changed in firefox:
status: Unknown → New
Revision history for this message
Przemek K. (azrael) wrote :

I have the same issue on 64-bit Intrepid. Firefox memory usage rises up to 400-500MB. Especially after a few suspend/resume cycles on my laptop.
Now I'm testing the 32-bit Firefox binary from mozilla.org and it feels much better so far. I'm using it on the same profile, all extensions and data are the same.
Is there any way I can help to trace it?

Revision history for this message
Scott Talbert (swt-techie) wrote :

Przemysław,

I'm not sure if what you're seeing is the same issue. The issue that Wirawan and I have seen appears to be related to leaving Firefox open with Best Buy's website (http://www.bestbuy.com/) loaded. In this case, it will eventually consume all of the available memory.

Revision history for this message
Przemek K. (azrael) wrote :

So should I file another bug about it?
Firefox from mozilla.org doesn't have this leak.

Revision history for this message
Scott Talbert (swt-techie) wrote : Re: [Bug 314424] Re: Firefox 3 memory use explodes by itself randomly

Yes, I would recommend filing a separate bug.

Scott

Revision history for this message
Przemek K. (azrael) wrote :

Ok, bug #358753 filed.

Revision history for this message
John Vivirito (gnomefreak) wrote :

Thanks.

affects: firefox (Ubuntu) → firefox-3.0 (Ubuntu)
Revision history for this message
jambba (murphy-mbnet) wrote :

Firefox 3.0.10 uses 100% Ubuntu 9.04 resources in my IBM T41 laptop (1,6GHz, 512MB RAM, SWAP file 1GB - not really used).
I did have problems with Adobe (Macromedia) Flash, but I did install Adobe's version 10 (Debian package).. and later on, uninstall flash non-free plugins.

BR J

Revision history for this message
In , Vseerror (vseerror) wrote :

I'd say this is result of the flash image and is bascially WFM. If you instsall flashblock extension, with the one flash image running you should see memory fluctuate 30-40MB which would not be unusual. With flashblock and the flash image not running I see no fluctuation. If you agree, please close WORKSFORME

my testing was with http://www.mozilla.com/en-US/firefox/all-beta.html
and flashplayer v10

WFM Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1pre) Gecko/20090527 Shiretoko/3.5pre (.NET CLR 3.5.30729)

Revision history for this message
k c davis (kcdavis) wrote :

I'm seeing something very similar, but it -seems- related to how may sites I visit, as if Firefox was caching in RAM and not freeing when tab closes. If I let it, it will fill 4 GB RAM, then semi-hang while thrashing the swap file.

Also reported as launchpad bug # 126012.

This system is routinely suspended, and almost always has Firefox AND Thunderbird open. I mention Thunderbird because I'd just been watching RAM use climb for no apparent reason with just those two open, so closed Thunderbird and the RAM eating stopped, then did NOT resume when I re-opened Thunderbird.

Revision history for this message
k c davis (kcdavis) wrote :

Amendment:

In the aprox. 1 hour since my previous post "something" grabbed almost 2 GB of RAM, according to gnome system monitor, but it was freed when I closed Firefox. I had 5 tabs open, but they were static and I had not been WWW surfing.

Revision history for this message
In , Scott Talbert (swt-techie) wrote :

I no longer am able to re-create this problem. I suspect Best Buy changed something on their website, as I went back to Firefox 3.0.5 and was unable to re-create the problem with that version either.

Revision history for this message
In , Highmind63 (highmind63) wrote :

per comment 6:

->WORKSFORME

Changed in firefox:
status: New → Invalid
Changed in firefox:
importance: Unknown → Medium
Revision history for this message
In , Elissajane2012 (elissajane2012) wrote :
Revision history for this message
In , Elissajane2012 (elissajane2012) wrote :
Revision history for this message
In , Elissajane2012 (elissajane2012) wrote :

There is an apparently memory leak when viewing Best Buy's website (http://www.beatsheadphoneshop.com/) in Firefox. When I load this website and then leave Firefox alone, memory usage grows indefinitely. This occurs in version 3.0.5 (both Windows and Linux versions) as well as in the latest nightly Windows build. This appears to be JavaScript related, as the memory usage does not appear to grow if I disable JavaScript and load http://www.beatsheadphoneshop.com/.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.