Huge memory leak from Firefox and Flash Player causes computer to slow to a halt

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

mikeymikec

Lifer
May 19, 2011
17,705
9,566
136
If the OP isn't on SP2, then what the heck are they doing, frankly. I wouldn't be surprised if earlier versions of Vista stopped receiving security updates years ago.

My parents' machine currently has 2GB RAM and a graphics card with at least 256MB RAM. I'll try out what I suggested, then we can put the topic to rest, right? They use Firefox as well.

- edit - I'll be visiting my parents this Sunday, I can leave a long YT clip running, disable sleep mode and check on it from time to time.
 
Last edited:

imagoon

Diamond Member
Feb 19, 2003
5,199
0
0
notsureifseriouscat.gif

Don't forget, Vista mirrors all video RAM in system RAM as well. This behavior was changed in SP2, as I understand it, to not require that any more (like Win7).

If the OP isn't on SP2, then 2GB is wholly inadequate. Either upgrade the RAM, or downgrade the OS, to XP or better, Linux.

Vista maps the video RAM in to the RAM address space. It only maps what the video card declares that it needs. There is no mirroring going on.

An 6GB video card would work just fine on 32 bit Vista RTM assuming drivers are there as these cards only map chunk of address space.
 

mikeymikec

Lifer
May 19, 2011
17,705
9,566
136
My parents' machine currently has 2GB RAM and a graphics card with at least 256MB RAM. I'll try out what I suggested, then we can put the topic to rest, right? They use Firefox as well.

- edit - I'll be visiting my parents this Sunday, I can leave a long YT clip running, disable sleep mode and check on it from time to time.

To recap, my parents' PC runs Vista 64 SP2 with 2GB RAM. I played a movie off YT for its full running time, checked it on several occasions, it ran absolutely fine. Task Manager reported RAM usage as between 40-50% during playback.

IMO the OP should try creating a new FF profile to see whether FF performs any better, if it does, we know it's a profile problem.
 

VirtualLarry

No Lifer
Aug 25, 2001
56,339
10,044
126
There is no mirroring going on.
https://en.wikipedia.org/wiki/Desktop_Window_Manager
DWM works in different ways depending on the operating system (Windows 7 or Windows Vista) and on the version of the graphics drivers it uses (WDDM 1.0 or 1.1). Under Windows 7 and with WDDM 1.1 drivers, DWM only writes the program's buffer to the video RAM, even if it is a graphics device interface (GDI) program. This is because Windows 7 supports (limited) hardware acceleration for GDI[2] and in doing so does not need to keep a copy of the buffer in system RAM so that the CPU can write to it.

Starting from Windows 7, Canonical Display Driver no longer renders to the system memory copy when a WDDM 1.1/DXGI 1.1 compliant video driver is present.

This is why certain video games have higher RAM requirements when running Vista, as compared to Windows 7, because of Vista's internal video RAM mirroring in system RAM.

I also know this because of communications that I've had with video-game developers about Vista and their RAM requirements. (I used to be a PC game dev myself, in a former life.)
 
Last edited:

imagoon

Diamond Member
Feb 19, 2003
5,199
0
0
https://en.wikipedia.org/wiki/Desktop_Window_Manager




This is why certain video games have higher RAM requirements when running Vista, as compared to Windows 7, because of Vista's internal video RAM mirroring in system RAM.

I also know this because of communications that I've had with video-game developers about Vista and their RAM requirements. (I used to be a PC game dev myself, in a former life.)

The DWM buffer is not the entire Video RAM space as you suggest it is. 6GB cards will work fine in Vista. Look at the entire Quadro line and you will see all of the 6GB+ cards list Vista 32bit support.
 

VirtualLarry

No Lifer
Aug 25, 2001
56,339
10,044
126
The DWM buffer is not the entire Video RAM space as you suggest it is. 6GB cards will work fine in Vista. Look at the entire Quadro line and you will see all of the 6GB+ cards list Vista 32bit support.

Sorry I was not more specific. Vista doesn't mirror the entire video card's VRAM into system RAM, but it allocates video buffers in system RAM and video RAM, for each app, for the compositing. Windows 7 and Vista SP2 allocate those buffers directly in video RAM, and eschew the system RAM buffers. The net effect, though, is that each app's video buffers end up in both system and video RAM, thus "mirrored".
 

imagoon

Diamond Member
Feb 19, 2003
5,199
0
0
You seemed pretty specific here:

notsureifseriouscat.gif

Don't forget, Vista mirrors all video RAM in system RAM as well. This behavior was changed in SP2, as I understand it, to not require that any more (like Win7).

If the OP isn't on SP2, then 2GB is wholly inadequate. Either upgrade the RAM, or downgrade the OS, to XP or better, Linux.

That is what I am contesting. The bolded text is 100% false.
 

Revolution 11

Senior member
Jun 2, 2011
952
79
91
I agree. Except I hate how they made the menus small. But all the browsers do that now. Is there any way to get the old school words at the top of the browser?
Pale Moon = modern FF code, old FF (3.0?) UI

The recent version 25 changes a few changes in the UI and plugin behavior. If it bothers you, version 24.7.2 is the previous release to check.
 

Ketchup

Elite Member
Sep 1, 2002
14,545
236
106
I think we may have lost Thomas, but this video discussion reminded me that he didn't say anything about a video card.

If running integrated graphics, that will make it even tougher on the small amount of RAM he has.
 

l Thomas l

Senior member
Nov 29, 2005
242
0
0
Lol... Yes I have service pack 2 and I have a graphics card. I'm not using integrated graphics.

I didn't do anything. I just changed Flash to not run unless I approve it. I only approve it to watch Youtube videos. Haven't had a problem since. I don't even have to restart my browser anymore. It must be all the sites I visit that have leaky Flash ads.

I'll order some RAM and put it in when I have the time, just to show everyone I'll still have the same problem.
 

pfc

Junior Member
Dec 15, 2014
6
0
0
Hi guys :)

I've decided to write that post because user was criticized about the lack of RAM, etc.

I have a laptop & desktop. Those are:

1) Lenovo T430, Core i5 3320M, 8GB RAM
2) C2D E8400@4GHz, 8GB RAM

Both have Win7U SP1 x64 EN running on 840 EVO (500 and 250GB respectively).

Firefox will not eat. It will gobble RAM until it reaches >3,5GB of Working Set and die in a blink of an eye. Flash version doesn't seem to be a variable here - I've tested various FP's - from 11.2 to 16 - the reaction doesn't differ a bit.

It happens on various sites that contain/use flash content. Let's say we have a site with a video on it. Flash content waits for a mouse click, after that is starts to buffer the video. Okay. Nothing bad happens.

I've tested the browser and used a video that weighs approx. 50MB (mp4 format). And after you click it again (to make it play) the *magic* happens.

The memory usage is skyrocketing (from few to dozens of MB per every second when you PLAY the video) until you pause the video or Firefox graciously crashes because it runs out of 32bit app address space.

You can rewind and play first 5 seconds of video. Then pause, rewind and play it again. To be honest it doesn't matter what you do, every time the flash content is being played, your amount of free RAM will fall down like a suicide jumping from a skyscraper to meet the unavoidable death.

You can try to avoid that, monitoring the Process Explorer and closing the tab when memory usage becomes quite high (how user-friendly!), but once FF allocates about 3GB of memory, using it becomes quite risky. It's better to restart the browser than sit on a ticking bomb waiting for it to blow any minute.

Also Firefox won't release that allocated memory. EVER. Tapping "minimize memory usage" does literally nothing. I don't count few MB (imho a fluctuation) freed up as a success when browser has 1 tab open (about:home) and uses over 3GB of memory.

Plugin container (in newer flash versions) behaves normally - it uses some resources (reasonable amount - for that 50MB video it was 70-some MB). It was Firefox that "grew up" like a kid fed with Big Macs 24/7.

It IS Firefox bug. It's memory leak. Or whatever. I shouldn't even care. If it's something that developers know about for years then it's utterly shameful that they can't (or worse - aren't willing to) fix it, because it happens all the time. Babbling about "but youtube works" or "that site is coded like sh*t" is like a kid yelling "who would've thought that someone will try to divide by zero" trying to defend lack of catch of an exception for that in the code.

Am I mad? Yes I am. Moreover - you guys are arguing about some meaningless things. That poor guy with 2GB of RAM can have 40GB of swap file. What's the basic difference between that and having an a**load of RAM? None! Browser will use all available memory and will crash. You can have 128MB on XP with 10GB of swap and same thing will happen. And please let's not discuss matters like "it's stupid to use less than X RAM on Y". This is not the point here.
 

Red Squirrel

No Lifer
May 24, 2003
67,375
12,127
126
www.anyf.ca
Firefox seems to use whatever ram that is available, the more ram you have the longer you will go without it using it all, but it will still use it all. I have 12GB and after a couple weeks Firefox will be using about 10GB. This is in Linux too, so the memory leak seems to be cross platform.

I think part of the issue is Firefox does not cleanup after itself when it loads a web page that is badly designed.
 

pfc

Junior Member
Dec 15, 2014
6
0
0
Oh, I see. I've read:
This is in Linux too
as a "in Windows, and in Linux too" - as if your Firefox could use that much memory under Windows. Little misunderstanding.

Ok, a little edit...

I had been bored so I did some research. Waterfox (x64) is susceptible to memory leak whereas Firefox x64 (taken from http://www.mozilla64bit.com ) seems to be unaffected. While FF x64 has 500MB Working Set at start (1 empty tab, may gods have mercy), after the site has been loaded, plugin container grows up slowly to 300-something MB and it stops. Nor FF x64, nor the plugin want to eat up more memory. I'll make some more tests to verify what I've just seen, but for now it seems that there's a slight difference between Water/Firefox and Firefox x64 regarding the memory leak on certain flash sites.
 
Last edited:

pfc

Junior Member
Dec 15, 2014
6
0
0
That's a scam-ish site. All it is is the Mozilla Firefox 64-bit nightlies. Probably bundled with a crapware installer too, judging by the site.
I don't care if it's nightly or not, as I am using nightly right now (to be precise: "Firefox Developer Edition"; 36.0a2).
Also, I didn't find any weird "bonuses" in the package, so your assumption seems to be a little bit unjust.
 

Danzilla

Platinum Member
Dec 30, 2000
2,747
0
76
I have the same problem on my desktop. For all the people yapping about FF just using a lot of memory, read the first post again. It's the flash player (flashplayerplugin process(es)) that gets bigger and bigger. Often larger than the Firefox process at 500MB and sometimes a lot larger at near 1GB or even more. It has a noticeable effect on the browser (laggy / sluggish)... and that's only when it's not stalled. Then the browser is complete unresponsive and a window pops up... "Warning: Unresponsive plugin. Shockwave Flash may be busy, or may have stopped responding. You can stop..." with the option to stop the plugin or wait. I usually just stop it to keep working, but waiting a minute or two usually finishes whatever was holding it up and I can continue then (so just stalled, not frozen).

Tried to find a cure a couples times and tried some different things, but never found a fix and no one's been able to figure if it's Adobe or Firefox that's the problem.

I've gone through a number of Firefox and Flash versions and updates over the past couple of years, but it keeps happening. I usually just manually kill the Flash process in the task manager whenever I notice the browser starts getting sluggish and firefox picks right back up again after I do.

Running win7 64bit, 8GB, i5 3750k, Z77 MB, 128GB SSD, 1TB HDD.
 
Last edited:

pfc

Junior Member
Dec 15, 2014
6
0
0
For all the people yapping about FF just using a lot of memory, read the first post again.
Unfortunately it seems to be (also) related to how FF handles animated images (GIFs especially). Even if you eradicate FP (and I've gone back to 11.2 since v.16 started to hang FF after some nightly upgrade), and sit on some site that uses GIFs in a sh*tty way (as devs are blaming web developers), it will request more ram until it uses up all 32-bit address space and will hang, crash or cease to function and you would have to kill it manually.

What's the most interesting part is that devs are whining it's not FF fault and to f**k off and stop viewing c*appy pages. Great, but how in the world an average user can determine if the webpage viewed at the moment is "buggy" or not?

Moreover - if someone's creating a calculator in some programming language, let it be "C", and forgot to implement divide by zero exception catch, I just can't imagine they would try to say "it's not our fault, it's the user's fault, who tried to divide by zero!". How dumb is that?
 

ninaholic37

Golden Member
Apr 13, 2012
1,883
31
91
I don't use Firefox Nightly. Firefox regular works great for me with 1GB RAM.

You should mention that you use Nightly in the OP, or post about it in some Firefox Nightly forum where other people are using it instead of here where most aren't.
 

Red Squirrel

No Lifer
May 24, 2003
67,375
12,127
126
www.anyf.ca
Unfortunately, not everything uses HTML5.

This.

Most things use flash, unfortunately. Even Youtube. Only some of the videos are html5. Not sure if it's an option the uploader has to tick, or if it depends on age of video, but not all of them are html5. Facebook also uses only flash video...

...in b4 "facebook sucks!" Like it or not it's still widely used and people share videos and stuff through it, and you need flash to use it.
 

ninaholic37

Golden Member
Apr 13, 2012
1,883
31
91
Last edited: