Opened 8 years ago

Last modified 6 years ago

#66 new defect

Flash 10 leaks lower shared memory...

Reported by: ecsnl Owned by:
Priority: major Milestone: Next
Component: wrapper Version:
Severity: very low Keywords:
Cc: flash@…


I run ODIN build
Vendor: Project Odin
Revision: 0.08
Date/Time?: 7 Feb 2012 16:08:41
Build Machine: NOVATOR
File Version: 0.8.3
Description: Odin32 System DLL - Kernel32

What I see is when I goto and play a video of about 4 minutes. The tool I use is freesharedmem.exe. Its a small PM tool that displays the amount of free shared memory. A video of 4 mibutes eats up about 100 mb of shared memory. When you get around 30 to 50 MB its a matter of counting down until your systems locks up.

You can still press C-A-D. But things like the PM and other applications in general become unresponsive and freeze.

A copy of freesharedmem.exe is attached to this ticket.
I got it either from hobbes or But I can't find it back.

This is BTW a problem I have seen for quite a while with the Flash plugin that you see the cached data getting loaded into lower memory.

Attachments (1)

freeSharedMem.exe (14.0 KB) - added by ecsnl 8 years ago.

Download all attachments as: .zip

Change History (18)

Changed 8 years ago by ecsnl

Attachment: freeSharedMem.exe added

comment:1 Changed 8 years ago by abwillis

Which version of the browser are you using? Not that I think it will matter for shared memory usage but also try with Odin 0.8.5. I am not seeing anything significant, at least not on a regular basis. Occasionally I see a sudden drop in shared memory but it doesn't occur on every video and length of video doesn't seem to affect it. I think I saw more shared memory being used for webm stuff on youtube than flash stuff (at least overall). Normally I don't see even 4Mb of shared memory used for a 4 minute flash video. Also, I am using the Flash 11.2 and not 10.x, though I wouldn't expect changes in the Windows plugin to cause less shared memory usage on OS/2 (though I suppose that could be related to those sites that work with older 10.x plugins but not the newer 10.x and 11.x plugins).

comment:2 Changed 8 years ago by Silvan Scherrer

Priority: majorFeedback Pending

Roderick, please really try latest odin 0.8.5 and report back.

comment:3 Changed 8 years ago by Silvan Scherrer

Severity: very low

now is odin 0.8.6 out. please do the test again

comment:4 Changed 8 years ago by abwillis

Flash 11.5 I am seeing shared memory drop... I'll need to watch it over the next day or so to determine if it continues. Previous versions I was not seeing it but on several youtube videos it was eating 200M of lower memory (not sure if it was shared memory or just lower memory but freesharedmem was showing the memory go fast.

comment:5 Changed 8 years ago by abwillis

I shut the machine down, took it home and booted and connecting there and saw the same. Shut down and booted up on another network and again the same issue so I am now seeing freeshared memory drop fast here too.

comment:6 Changed 8 years ago by abwillis

I don't know what has changed as I have tested this regularly but now I even have the issue when I go back to 11.4 and 11.2 where I did not have it previously. Hmm, there is one change that does come to mind but I would have expected it to help and not hurt and I thought I had tested it since that change... I increased VIRTUALADDRESSLIMIT from 1536 to 1792. I'll drop it and test that later. I had increased it as I was seeing VirtualPC start using lower memory if I gave it over 835M but with the increased size I can go to 1G without the lower memory being affected (though I don't use it because I get a Trap on closing VirtualPC out when I use something over 835M). I had expected by increasing the high memory it would have more to use prior to going into the lower memory.

comment:7 Changed 8 years ago by abwillis

Changing VIRTUALADDRESSLIMIT back to 1536 did not have any effect.

comment:8 Changed 8 years ago by ecsnl

I installed ODIN 0.8.6. running Firefox 10.0.11

from about:plugins

File: npflos2.dll
Shockwave Flash 11.1 r102

Still the same problem. Add the request of Dimitri I set the virtualaddresslimit in my config.sys to 3072. Made no difference.

comment:9 Changed 8 years ago by ecsnl

I played this file:

Playtime 03:29

Freesharedmem counter starts at 210 MB.
After its finished playing shared mem is down to 137 MB. The video is 03:29 minutes.

Then when (according to the browser video player) tha song is completely downloaded.
I hit the play button again.

The memory again drops with a 17 megabyte.
Why that occurs again I don't know.

Now down to 111 MB on the sharedmem counter.

So its seems playing the video the first time eats up 73 MB of memory (not even counting the loading of flash).

If that figure is corect at a playtime of 03:29 that means that about 1300 memory of memory is needed
for an hour of Flash video. I sometimes watch documentaries on but use Windows to do that because
I know eCS will simply die off. As Andy has indicated.

Well I saved this message in a text editor and my sharedmem counter had dropped to about 45 MB. After I closed the browser.
The PMSHELL was dead (no CPU activity anymore) and I could only press C-A-D to reboot.

The question that rises from this does Windows also cache all of that content all the time in memory.
Also for example if I watch a documentairy for 1 hour. I do that on the same laptop as I use eCS on and I have 2 GB of ram.

Also when visiting about 30 to 40 MB of shared memory is eaten away. Do we have a memory allocation bug somewhere of some sort !?

I don't know. I just can hardly imagen that on Windows the memory consumption is also so extremely high.

comment:10 Changed 8 years ago by ecsnl

Steve Levine thinks its done, but just asks (to rule it out). Do you guys compile ODIN
with the GCC Zhighmemoption ?

comment:11 Changed 8 years ago by abwillis

There are some places that I have added the -Zhigh-mem option but it did not make any difference. Of course, initially I did not have this problem with or without the -Zhigh-mem option but I made sure it was there again after starting to see this issue and it did not help it.

comment:12 Changed 8 years ago by Yoda

Cc: flash@… added
Priority: Feedback Pendingmajor

I see the same problem here, flash eats up all shared mem - high and low - very quickly.

Look here:

Click on one of the papers. Go through it, and see how fast your mem is gone.
1-2 papers is enough to crash browser or system.

If you close the tab with the paper(s), mem isn't released, you need to close browser.

comment:13 Changed 8 years ago by dmik

Milestone: Enhanced0.4.1

I will *quickly* take a look at this now (since we have to re-release after fixing #77 anyway).

comment:14 Changed 8 years ago by dmik

Ok, it has locked up here at 12 MB of free shared memory (was watching a long vid on YouTube?).

This may be a bug of either Flash or the YouTube? player for instance. Like they allocate a lot of mem but never free it. It works on Windows to some extent because of the differences in virtual memory management and its size and quickly empties the OS/2 address space.

Note that you can actually make the system unusable on Windows as well if you play Flash too much there, even Mac will get eventually screwed up. I saw this many times here (I have 8 GB of memory). For this reason I even had to disable Flash content at all and only enable it on high demand. Flash is unconditional evil. Keep in mind that most (all?) YouTube? videos work great in HTML5 (which it will use if it finds out that Flash is not available). Do we have HTML5 video support at all in Firefox/2 -- if not, it seems to make much more sense to make this new clever standard work instead of flogging a dead horse.

If I'm correct with my assumptions I'm afraid there is nothing we can do here as we can't force Flash to free its memory (and we can't do it for it since we can't know which memory is still in use). What we can do in this case is to show a warning suggesting to restart Firefox when the amount of shared memory gets close to the critical number.

I will do a couple more tests.

And btw any Odin based app will use high shared memory if it allocates it with VirtualAlloc? (and if high shared memory is available), no -Zhigh-mem switch is necessary anywhere (didn't I already mention it somewhere?).

Last edited 8 years ago by dmik (previous) (diff)

comment:15 Changed 8 years ago by abwillis

It is not just youtube... and not all of youtube as I have found some that work fine while others suck the memory down very quickly. One thing I can see that could be helpful is if we get IPC working in Mozilla so that we can close down a single tab which being its own process should release the memory.
HTML5 in Firefox/2 works very well on youtube for those videos that have an HTML5 option (not all do).

comment:16 Changed 7 years ago by dmik

JFYI: ticket #100 contains some info (and a solution) for a couple of small memory leaks. I doubt it is directly related to this defect but still worth reading when working on this one.

comment:17 Changed 6 years ago by abwillis

I have had Seamonkey DLLs marked for highmem for awhile and still had this with no abatement. I also tried marking npflos2.dll to no avail. I tried also the Odin DLLs but then had problems loading the flash plugin. I found that I can mark all but two DLLs with highmem -b and get a bit of relief (does not cure the problem but does seem to slow down the failure I would get when shared memory was exhausted).
User32.dll and winmm.dll would cause failure to load when marked high but I have everything else marked at this point. I have tested a couple java apps, another app I have installed that requires Odin and Flash with only these two DLLs posing a problem at this point. I do have npflos2.dll also marked high.

Last edited 6 years ago by abwillis (previous) (diff)
Note: See TracTickets for help on using tickets.