Closed Bug 319262 Opened 19 years ago Closed 18 years ago

significant memory leak

Categories

(Firefox :: Tabbed Browser, defect)

1.5.0.x Branch
x86
All
defect
Not set
critical

Tracking

()

VERIFIED INVALID

People

(Reporter: towsonu2003, Unassigned)

References

Details

(Whiteboard: DUPEME)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051111 Firefox/1.5
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051111 Firefox/1.5

Memory leak... If opened for 2.5 hours, memory usage (which already is high) goes up from about 100MB to 210MB or so... Performance of the system is affected very badly. Loading pages gets slower and slower, system starts hanging. When uncaught, memory leak leads to hard reboot (power off - power on) leading to data corruption and loss). I have to restart fx every 2 hours (unacceptable workaround) to avoid any 'accidents'... 

Reproducible: Always

Steps to Reproduce:
see details



Expected Results:  
minimal and effective memory usage. 

system is ubuntu 5.10; installed using tar file. Marked security issue as bad memory handling is a very 'nice' door for exploitation...
Version: unspecified → 1.5 Branch
Was there any particular page or pages you were viewing at the time? Was it idle for the couple of hours, or was that under active use? Do you have any extensions installed?

Did you get the tar from us or from Ubuntu?

Having to restart Firefox every couple of hours is *not* normal.
> Was there any particular page or pages you were viewing at the time? 
No, this happens with most web pages. My most visited web sites though are mail.yahoo.com, slashdot.org, and ubuntuforums.org. 

> Was it idle for the couple of hours, or was that under active use? 
It was under active use

> Do you have any extensions installed?
Yes, google toolbar (newly installed, bug was there before installing), flashblock, adblock, noscripting, DOM (not removable), talkback (not removable). Tried uninstalling these, but did not help w/ leak...

Did you get the tar from us or from Ubuntu?
from you (http://www.mozilla.com/firefox/)
installed using this document: https://wiki.ubuntu.com/FirefoxNewVersion

Clearing security flag: no explicit exploit described, and several people seem to be experiencing this in 1.5
Group: security
Whiteboard: DUPEME
After reading some Mozilla Firefox forum topics about memory issues, I removed the adblock extension all toghether (instead of removing adblock and installing adblock plus) but it did not help at all. Also, I am observing that the memory leak is somehow related to extensive CPU usage and program hanging (for couples of seconds) from time to time, but I have no idea how they are related... PS. As memory leak increases, CPU usage increases and performance decreases as a result. 
When open for a few hours, memory usage goes up to 200MB of physical memory and 100MB of virtual memory, bringing to a total memory usage of 300MB, which is equilvalent to a normal-end game.
Hello, I'm having similar problems (also with Ubuntu 5.10 and installed Firefox 1.5 from Mozilla tarball). It seems to happen at the fastest rate when you are browsing image intensive websites (kde-look.org, etc). When browsing a lot of images, memory usages climbs to 200+ in 30 minutes or so. Otherwise, memory climbs to this level after around 4-5 hours of use. At this point the system begins swapping and becomes very hard to use.

I never had this problem with the Firefox 1.07 that came with Ubuntu. I began to suspect that this memory usage had something to do with Firefox's new FastBack feature rather than a memory leak. From what I have read, FastBack stores a cache of the previous website, and I assume this cache is being stored in memory. Therefore, if Firefox is caching everything (include images) it would explain the memory growth.

When I launch Firefox (which opens with around 20 tabs since I have the Session Saver extension) memory usage is only at 50 mb. It then starts to climb as described.

I have tried the steps from here: http://www.freerepublic.com/focus/f-bloggers/1327586/posts but they have done absolutely nothing.

As a side note, I noticed that as Firefox's memory climbs, as does xorgs. I read here: http://primates.ximian.com/~federico/news-2005-11.html#moz-images about how Firefox stores _uncompressed_ images in X server. Therefore, even though Firefox takes up half of my RAM (I have 512), xorg takes up the rest and my system starts swapping. Not sure if this applies here though.
(In reply to comment #6)
> It seems to happen at the fastest rate when you are
> browsing image intensive websites (kde-look.org, etc). When browsing a lot of
> images, memory usages climbs to 200+ in 30 minutes or so. Otherwise, memory
> climbs to this level after around 4-5 hours of use. At this point the system
> begins swapping and becomes very hard to use.

I made a mistake here. When browsing image intensive websites, Firefox's memory stays at 50 mb but xorgs memory usage climbs to 300 mb +. I am sure that this has to do with how images are stored in the X server. Nevertheless, after about 4-5 hours of active browsing, Firefox's memory usage gets to 200+.
Same issue under Windows NT 5.1 (XP)  On my system, it was occupying about 118,000 K of Memory.
Is there a way to turn off the new Fastback feature? Or, better yet, limit the amount of memory it takes up?
Confirming based on "me toos" unless an appropriate dupe is found.

(In reply to comment #9)
> Is there a way to turn off the new Fastback feature? Or, better yet, limit the
> amount of memory it takes up?

play with the browser.sessionhistory prefs max_total_viewers = 0 is off; there is also an entry limit.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Blocks: mlk1.8
townsonu: please comment here if turning off bfcache as described in my last comment helps any.
(In reply to comment #11)
> townsonu: please comment here if turning off bfcache as described in my last
> comment helps any.
> 

I will report back once I am sure whether it works or not. 
(In reply to comment #11)
> townsonu: please comment here if turning off bfcache as described in my last
> comment helps any.
> 

leak is now much smaller (no longer a significant bug in my 1GB RAM system) and thus acceptable to me (but should not be good enough for other users). 

after about 3,5 hours of operation, fx memory went up from 100MG to 125MB (total memory reported in System Monitor in Ubuntu Linux Gnome). So leak is there but at least does not double in size now...

PS. I found out that ubuntu launches fx with %u option everytime. I removed that at the same time I changed the option you mentioned, so I am not sure which one was effective. 

PPS. I am more than willing to try out other steps to fix this for good. 
Is Bug 319259 a duplicate of this bug (see my comment there)?
Yes, I met the same problem on my Windows 2000.
The physical memory climb up to 200 MB and the virtual is more than 200 MB too.
I browse the many web pages, open it and close it, but the memory usage do not decrease at all.
It's the most problem that make me to stop using the firfox, it let the system become very slow...
I have tried turning max_total_viewers off (setting it to 0) but still have the same memory consumption.
Confirmation under Windows NT 4.0 SP6a:  open a large number of tabs (for instance, 33) and look at memory usage in Task Manager.  Windows NT 4.0 Task Manager lists FIREFOX.EXE as using around 35M, but lists system memory usage as ~155M (even though it was between 30M and 40M before starting Firefox 1.5).  The memory is not returned even if you close all but 1 tab.  It is not returned at all until FIREFOX.EXE terminates, which may take many minutes after closing the last Firefox window.

Some of the following set of bugs seem to be duplicates of each other:  311807, 314411, 314706, 317889, 319259, 319262 (this one), 321017 (maybe -- could be a related but different problem), 321252, and 322632.
Same on WinXP (Running for ~6 hours => Consumes ~380 MB of RAM, ends at 400-500 MB at the end of the day (8-10 hours)).

Reproducable, no special stuff. JavaScript, Flash and other active contents are disabled so no special stuff expected from that side.

Someone please change OS to "all"
OS: Linux → All
I also think there's a memory handling problem. I run Mac OS X 10.3.9 with 768mb ram, and Firefox 1.5. After a while with several tabs open the performance of the whole machine slows down noticeably. When I check "tops" to see system processes, it shows Firefox gobbling 800 - 900 mb ram, ie. using virtual memory. No wonder it slows things down! 

Also, don't know if this is related - I can never shut down Firefox 1.5 normally, I have to force-quit every single time!!
(In reply to comment #18)
> Reproducable, no special stuff. JavaScript, Flash and other active contents are
> disabled so no special stuff expected from that side.

Could you provide some steps to reproduce?
To bug opener and comment posters who say "memory leak" or "high memory usage" or "me too" :
   See Bug 320915 and read Bug 320915 comment #28,
   and read all documents linked by Bug 320915 comment #28,
   then install leak-gauge tool.
   What the tool says?
(In reply to comment #21)
> To bug opener and comment posters who say "memory leak" or "high memory usage"
> or "me too" :
>    See Bug 320915 and read Bug 320915 comment #28,
>    and read all documents linked by Bug 320915 comment #28,
>    then install leak-gauge tool.
>    What the tool says?
> 

Sorry, but I get a server not found for the server in question for the memory gauge tool. It may as well be bc. of my isp which is blocking a number of ports. 

Also, this tool needs to go to a mozilla.org page. I cannot install a tool in a foreign (as in "not-mozilla-provided") server due to understandable security concerns. I don't think others should do so either unless the tool is hosted by mozilla, which will provide better legitimacy for the tool. 

Thanks for your efforts. 
(In reply to comment #23)
> Check the URLs. The tools *are* on mozilla.org pages:
> http://lxr.mozilla.org/mozilla/source/tools/footprint/leak-gauge.pl?raw=1
> http://lxr.mozilla.org/mozilla/source/tools/footprint/leak-gauge.html?raw=1
> 

thanks. these, I can access. but being a linux newbie, I am stuck at how to run this thing. I knwo I shoudl copy and paste it to a document, but than what? any link that shows a howto for an idiot -in linux-? help might be available from the link given in bug #320915 comment #28, but that server is unaccessible to me. 
thanks.
(In reply to comment #24)
> (In reply to comment #23)
> > Check the URLs. The tools *are* on mozilla.org pages:
> > http://lxr.mozilla.org/mozilla/source/tools/footprint/leak-gauge.pl?raw=1
> > http://lxr.mozilla.org/mozilla/source/tools/footprint/leak-gauge.html?raw=1

> help might be available from the link given in bug #320915 comment #28, but that server is unaccessible to me. 

Sorry for my lack of care on environment where access is controled.
1. How to install 
   - "Save Link As" at above link(leak-gauge.html?raw=1), 
     then save it in your local hard disk.
2. How to reach help
   - Open the saved HTML, then read the page.
3. How to run the tool.
   - Open the saved HTML and click link of "enter the filename",
     then specify file name of NSPR log.
*** Bug 319259 has been marked as a duplicate of this bug. ***
(In reply to comment #25)
> (In reply to comment #24)
> > (In reply to comment #23)
> > > Check the URLs. The tools *are* on mozilla.org pages:
> > > http://lxr.mozilla.org/mozilla/source/tools/footprint/leak-gauge.pl?raw=1
> > > http://lxr.mozilla.org/mozilla/source/tools/footprint/leak-gauge.html?raw=1
> 
> > help might be available from the link given in bug #320915 comment #28, but that server is unaccessible to me. 
> 
> Sorry for my lack of care on environment where access is controled.
> 1. How to install 
>    - "Save Link As" at above link(leak-gauge.html?raw=1), 
>      then save it in your local hard disk.
> 2. How to reach help
>    - Open the saved HTML, then read the page.
> 3. How to run the tool.
>    - Open the saved HTML and click link of "enter the filename",
>      then specify file name of NSPR log.
> 

sorry, can't get it to work. I'm too newbie to make this thing work... is it possible to make this an extension with GUI interface? -> easier use... thanks.
(In reply to comment #27)
> I'm too newbie to make this thing work...
Bugzilla.mozilla.org is not a support forum nor customer help center.
If you need help, you'd better to ask at forum such as MozillaZine forum.
http://forums.mozillazine.org/ 
(In reply to comment #28)
> Bugzilla.mozilla.org is not a support forum nor customer help center.
> If you need help, you'd better to ask at forum such as MozillaZine forum.
> http://forums.mozillazine.org/ 
> 

Absolutely true. This is the place where end users try to help developers fix their bugs. Mine was a suggestion, nothing else. I am not able to use the tool, so I'm not able to further help you fix this.
sorry for the hassle
I have a similar problem on Mac OSX 10.4.5:

(00:45:57) philipp1@jigen ~ 1$ uname -a
Darwin jigen.local 8.5.0 Darwin Kernel Version 8.5.0: Sun Jan 22 10:38:46 PST 2006; root:xnu-792.6.61.obj~1/RELEASE_PPC Power Macintosh powerpc

I also have adblock installed along with talkback and DOM inspector. I have also set this:

browser.sessionhistory.max_total_viewers = 0 

Instead of the default value of -1. It seems to have slowed the climb of memory usage, but there is still most definitely a memory leak. I also know it is not a cacheing thing since I have that set to 50MB and the memory usage grows to far larger than that. 

I also agree with who ever said this should be changed to all OSes, it doesn't seem to be OS specific.
Maybe another (easier to reproduce?) example:

Fresh start of Firefox on www.map24.de (redirects to http://www.de.map24.com)
Entering a city in the search field and wait(do nothing).
Memory usage       52MB
after 5 minutes:   73MB
after 10 minutes: 100MB


W2K
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1 
Flashplayer 8.0.24.0
(In reply to comment #31)
> Fresh start of Firefox on www.map24.de (redirects to http://www.de.map24.com)
> Entering a city in the search field and wait(do nothing).

I tried going to www.map24.de and entering a city in the search field using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060404 Firefox/1.6a1. After four hours, memory usage had fluctuated by several megabytes, but was below its highest level. Can you reproduce this with a recent trunk nightly? Maybe MozillaZine is the best place for discussing memory leak problems.
(In reply to comment #32)
> I tried going to www.map24.de and entering a city in the search field using
> Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060404
> Firefox/1.6a1. 

Mozilla/5.0 (WIndows; U; Windows NT 5.0; en-US; rev:1.9a1) Gecko/20060404 Firefox/1.6a1)

After 10 minutes only 1-2 MB more with them same example as in #31.
Well done :-)

FYI:(may be important?)
Mouse gestures are disabled with this thrunk and some adv with flashplayer are not displayed. Flashplayer works.
hmmm.
So is there actually a single specific problem here, or is this just "Firefox 1.5 had lots of leaks"? Because if it's the second, it should probably be duped to bug 320915, or just marked invalid...
(In reply to comment #34)
> So is there actually a single specific problem here, or is this just "Firefox
> 1.5 had lots of leaks"? Because if it's the second, it should probably be duped
> to bug 320915, or just marked invalid...
> 

sure, let's mark all memory leak bugs as dupe of # 320915, than close that one because it is "Firefox 1.5 had lots of leaks" as well... 

as the reporter, I'm just waiting for someone to come up with a frontend to the memory leak tool that I can understand. Until than, there is no further input I can offer. rest is up to the devels. 
Without steps to reproduce or a leak log, this is not a useful bug report.  Using the leak tool is how we detect and fix leaks, just like talkback stacks are how we fix crash bugs.  If you can't use that tool, that's unfortunate, since it means there's no way of identifying which leak, if any, you're experiencing.

Marking this INVALID, if someone has a valid leak that can be captured in the leak tool, please file a new bug with that information.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → INVALID
Status: RESOLVED → VERIFIED
No longer blocks: mlk1.8
Hello,
I've just had a similar experience. My FF (1.5.0.5) was running for some five hours and went from some 100MB to ~280MB. The most of the time, the browser was just idle, but the last two pages I visited (had some more tabs open) were www.3ware.com and de.wikipedia.org. At ~280 megs, the machine was nigh unusable, and I had to kill FF hard.
I'm using Windows 2000 at work and Windows XP at home, and the problem is quite the same!

I never sgut down my Windows, I allways use Hybernate, and for the 3th or 4th day that I use Firefox... there is the problem! ARGH!
I'm using Windows 2000 at work and Windows XP at home, and the problem is quite the same!

I never sgut down my Windows, I allways use Hybernate, and for the 3th or 4th day that I use Firefox... there is the problem! ARGH!
http://www.livedeviant.com/tips-tricks/optimizing-memory-firefox-memory-leak-problem.html

HERE is the fix for those people suffering..

cheers :)
You need to log in before you can comment on or make changes to this bug.