Closed Bug 1163940 Opened 11 years ago Closed 11 years ago

Memory leak on Windows 7 for some time

Categories

(Firefox :: Untriaged, defect)

37 Branch
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: halfdan, Unassigned)

Details

(Whiteboard: [MemShrink])

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0 Build ID: 20150415140819 Steps to reproduce: When i leave firefox running and come back to it after a few hours it sometimes consumes 5-10% of CPU and 1-2GB of memory - while being incredibly slow. Being paitient and waiting for about:memory to load and forcing a garbage collection seems to fix it.
Attached file Memory report
I tried attaching the CC and GC logs, but they are too large for Bugzilla.
This time firefox did not free a lot of memory when i clicked the CC, GC and Minimize memory usage buttons, unfortunately. Is there a way to fix this problem, i have been experiencing it for ~6 months now but it only happens when i use firefox in my daily use, i have found no consistent pattern as to where it happens. I have tried disabling as many plugins as possible, but some of the plugins are needed from time to time, but are all set to "Ask before running" so i should be aware of any running plugins. I only have a british dictionary and "It's all text" installed as add-ons.
Whiteboard: [MemShrink]
The memory reports don't show anything that seems particularly bad, and it's not clear to me that it's a genuine leak. It sounds like it's the slowness that's causing problems more so than the memory usage. Given that, it would be extremely helpful if you could get a profile with the Gecko Profiler when the slowness occurs. Instructions are at https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Profiling_with_the_Built-in_Profiler. That page is full of intimidating details, but you only need to look at the first three sections to get a profile, which you can then upload. Thank you.
Hi Nicholas, it tried closing all but one tab and firefox still used ~750 MB of RAM according to process explorer, it just seems like it should consume a lot less memory with only one tab open and a forced garbage collection? Thanks for the information about the Gecko Profiler, i have intalled it and will try to enable it when i see the issue again - might take a few weeks, so please leave this ticket open.
I think i a profile of it now, it is on Cleopatra here: http://people.mozilla.org/~bgirard/cleopatra/#report=f89759f2d350e6f591f406d07038ebd336163db3 I saw CPU usage go to 12-15% (on an 8 core CPU) - and memory usage rose to 1.5 GB before it got to 1.0 GB again and CPU usage stabilised at a normal 1-2% for firefox after about 1-2 minutes of being almost frozen (still managed to profile using firefox though).
It looks like most of the time in the profile is being spent in the cycle collector, which isn't too surprising if there's some kind of memory leak. The first memory profile has 1 ghost window, which would cause a lot of CC problems, but there aren't any in the second one. The ghost window is Twitter, and I use Twitter fairly regularly without noticing those problems, so I'm not sure what to make of that. Unfortunately, there's not a lot to go on here.
Status: UNCONFIRMED → NEW
Ever confirmed: true
CC/GC logs might be useful to see, both concise and verbose. (Note, the logs do contain some urls of the visited pages.)
Can we get a CC/GC log? If it's to large you can use a file sharing site or attempt to email to :smaug or mccr8.
Flags: needinfo?(rasmus)
I have never used twitter, so it is surprising that it should show up as a ghost window? I will get back to you with CC/GC logs when i get back to my workstation, i am currently on maternity leave - just became a father :)
Flags: needinfo?(rasmus)
Oops, adding needinfo flag again.
Flags: needinfo?(rasmus)
(In reply to Rasmus Toftdahl Olesen from comment #11) > I have never used twitter, so it is surprising that it should show up as a > ghost window? Lots of pages have iframes showing twitter feeds, e.g. down the side. It's probably something like that.
Hi, i am now back again and trying to find out what is what in this situation. I just noticed that maps.google.com is also REALLY slow using firefox, especially when dragging/panning - in chrome it is completely smooth. As a test i just created a new empty firefox profile, and lo'-and-behold, it is also super smooth (not quite as smooth as chrome, but hey that is a google product using a google product) - so i guess something is bad in my profile, this might be related to this other issue. I have tried disabling all extensions and plugins but the slowness is still there, the only difference i can see in the settings were that "Send telemetry" was ON on the slow profile, but turning it off did not result in any change. Is there a way where we can find out what the difference is here?
Flags: needinfo?(rasmus)
Cleopatra profile while dragging/panning google maps for a few seconds. http://people.mozilla.org/~bgirard/cleopatra/#report=479b3a7cd34beda2f7016ae372c761f8729c271d
That is all about draw. Does about:support show any differences? Did you restart the FF which has all those addons and plugins after disabling them?
Hi Olli, looking at about:support did reveal that some of the values under "graphics", like "windowLayerManagerRemote" was "false" in the slow version and "true" in the other version. This lead me to about:config where i had configured layers.offmainthreadcomposition.enabled = false (because of an earlier firefox bug which forced me to turn it off, i think it had something to do with my graphics card, this seems to be fixed now). Now performance is back to normal, thanks for that hint! Hopefully this will also fix the memory issues i have been having.
Rasmus, please reopen if you see the issue again. Thanks for the help looking into this!
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: