Closed Bug 1006295 Opened 10 years ago Closed 9 years ago

Memory leak in Firefox 29 involving highslide.js

Categories

(Firefox :: Untriaged, defect)

29 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: n.nethercote, Unassigned)

References

Details

(Keywords: memory-leak, perf, Whiteboard: [MemShrink:P2])

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1005887 +++

From bug 1005887 comment 5:

You can you reproduce it quickly with highslide.js... click the first picture in album, then the "play" button.

http://www.hardwarefreak.com/web/daniel-robert-landreth/gallery/

Watch your fav memory monitor.  You can see the mem consumption jump every 3 seconds when the next image is loaded.  It takes ~5 minutes, ~180 images through the slideshow, to eat all 2GB of RAM on my two Windows XP boxen, at which point the slideshow stops displaying the images, just white, and Windows eventually complains of low memory and attempts to increase the pagefile size.  

I've been using highslide.js for photo albums for many years.  This problem did not exist with FF 28 and earlier, but for one release in the teens, IIRC.  That one introduced the same memory leak problem with highslide.  In that case it was fixed in the subsequent release which arrived pretty soon thereafter, so I never reported it.
Stan, are you able to capture and attach a memory dump via about:memory's "measure and save" button?
Attached file memory-report.json.gz
(In reply to Nicholas Nethercote [:njn] from comment #1)
> Stan, are you able to capture and attach a memory dump via about:memory's
> "measure and save" button?

Yes.  I stopped the slideshow when Task Manager showed FF using ~1.25 GB of memory and took the measurement, fearing that if I let it run until the system ran out of memory it may not work.  As the problem is cumulative, I assume it should be visible in the dump.  I just attached the memory report.
Summary: Memory leak in Firefox 29 → Memory leak in Firefox 29 involving highslide.js
The bug lists the platform as x86_64 Linux.  I'm seeing the problem on two Win XP 32 bit machines and a Win7 64 bit machine.
OS: Linux → Windows 7
Probably the same issues as bug 985193. Marking a dependency.
Depends on: 985193
I'm not sure why you changed OS:Linux--> Windows 7, as I clearly stated two WinXP machines and one Win7 machine.  WinXP is my primary FF platform and I discovered the bug there.  I simply confirmed it on two other machines, one being Win7.  Might categorizing this bug as "Platform: x86_64 Windows 7" have unintended consequences, possibly cause developers think down the wrong path(s)?  Shouldn't every confirmed affected OS platform be listed?
> Shouldn't every confirmed affected OS platform be listed?

Bugzilla only allows one selection for the platform. Don't be alarmed, it's not such an important field, and the comments make it clear that XP is affected too.
Whiteboard: [MemShrink] → [MemShrink:P2]
Thanks for the data. Here are measurements of interest:

> 129.51 MB (100.0%) -- explicit
>    94.96 MB ── heap-allocated
>   518.86 MB ── gfx-surface-win32
> 1,215.77 MB ── private
> 1,220.16 MB ── resident
> 1,399.94 MB ── vsize

Interpretation:

- "explicit" and "heap-allocated" are low, which shows that heap usage isn't
  high. 

- But "private" and "resident" are over 1 GiB, which shows that non-heap usage
  is high. 

- And "gfx-surface-win32" is 518 MiB, showing that gfx memory usage is high; I
  bet the remaining 500+ MiB that is unaccounted for is also being used in some
  fashion related to gfx.

This isn't surprising, given that it's a photo slideshow page that's triggering
the problem.

tn, any idea what be happening here?
Flags: needinfo?(tnikkel)
I think what happens is the images get layerized due to the opacity transition, and that's where things go bad. It's been on my list of things to look at but I haven't gotten to it. The image container we get from RasterImage for layerized images doesn't look like it responds to the usual Discard notifications, so it's lifetime (ie freeing it) would be left to something in layers/gfx to manage and I'm not sure if there is anything does that. So basically it needs more investigation of where the memory is going inside the layers/gfx subsystem.
Flags: needinfo?(tnikkel)
(In reply to Nicholas Nethercote [:njn] from comment #0)
> +++ This bug was initially created as a clone of Bug #1005887 +++
> 
> From bug 1005887 comment 5:
> ... This problem
> did not exist with FF 28 and earlier, but for one release in the teens,
> IIRC.  That one introduced the same memory leak problem with highslide.  In
> that case it was fixed in the subsequent release which arrived pretty soon
> thereafter, so I never reported it.

I should have stated above that I've seen the out of memory effects due to this problem only with FF 28 and one much earlier version, not when/where the bug does/does not exist, as I do not factually know that to be true.  The underlying problem may or may not have existed all along but I've only triggered the OOM problem a couple of times.  This may be due to the fact that most of my albums have lower resolution photos than the album linked in this bug report, which reproduces the OOM every time.  Lower res and/or fewer photos in those albums may simply not have eaten sufficient memory to trigger the OOM.
Depends on: 1012602
No longer depends on: 1012602
(In reply to Stan Hoeppner from comment #10)
> (In reply to Nicholas Nethercote [:njn] from comment #0)
> > +++ This bug was initially created as a clone of Bug #1005887 +++
> > 
> > From bug 1005887 comment 5:
> > ... This problem
> > did not exist with FF 28 and earlier, but for one release in the teens,
> > IIRC.  That one introduced the same memory leak problem with highslide.  In
> > that case it was fixed in the subsequent release which arrived pretty soon
> > thereafter, so I never reported it.
> 
> I should have stated above that I've seen the out of memory effects due to
> this problem only with FF 28 and one much earlier version, not when/where
> the bug does/does not exist, as I do not factually know that to be true. 
> The underlying problem may or may not have existed all along but I've only
> triggered the OOM problem a couple of times.  This may be due to the fact
> that most of my albums have lower resolution photos than the album linked in
> this bug report, which reproduces the OOM every time.  Lower res and/or
> fewer photos in those albums may simply not have eaten sufficient memory to
> trigger the OOM.

Grr, sorry for the typo--just noticed it.  The above should say "problem only with FF 29...", not 28.
I couldn't reproduce with FF34. Left the slideshow over lunch, came back and memory usage was fine. Stan do you see the same thing?
Flags: needinfo?(stan)
> I couldn't reproduce with FF34.
Correction: that test was with my Nightly build from yesterday.
I can't reproduce it with Iceweasel 34 and a 700 photo slide show with high res images.  Looks to be discarding correctly.  Did not test on Windows.
Flags: needinfo?(stan)
This one appears to be fixed and 985193 isn't, so unlinking them.
Status: NEW → RESOLVED
Closed: 9 years ago
No longer depends on: 985193
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: