Closed Bug 651695 Opened 14 years ago Closed 13 years ago

Massive memory leak running CubicVR demo

Categories

(Core :: Graphics: CanvasWebGL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: humph, Assigned: jrmuizel)

References

()

Details

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

CJ has a new WebGL/Audio demo out, and when playing it in the nightly, my whole machine eventually falls over, with the binary taking 8 gigs of RAM.  I end up with:

11-04-20 7:44:07 PM	kernel	(default pager): [KERNEL]: Switching ON Emergency paging segment
11-04-20 7:45:13 PM	kernel	(default pager): [KERNEL]: System is out of paging space.
11-04-20 7:45:13 PM	kernel	(default pager): [KERNEL]: Failed to recover emergency paging segment
...

The demo plays well for me until 70.379s, at which point the audio effects on the 3D shapes stops working, then it starts doing what looks like GC pauses, then it just collapses.  It doesn't crash, or at least I haven't been able to make it crash yet.
Blocks: mlk-fx5+
Keywords: mlk
Keywords: mlk
Keywords: mlk
Sound similar to bug 637449.    Benoit, can you take a look?
OK; I will first valgrind the example in bug 637449 comment 21 as it's smaller.

Anyone interested in valgrinding: use OSMesa (set webgl.libosmesa=libOSMesa.so.6 and webgl.force_osmesa=true); procedure and suppression files given on bug 588918.
David: can I get a local copy of this demo?
Ahoy,

I've added an additional version that uses a simpler non-audio PJS script for the generative texture and removes the audio code from the html: 

http://cubicvr.org/CubicVR.js/BeatDetektor-NMG/index-noaudio.html

And you can grab an offline copy of the whole thing here:

http://cubicvr.org/CubicVR.js/BeatDetektor-NMG/bd-mapgen-test.zip
Thanks. Unfortunately this hits the glGenerateMipmap crash in Mesa, so I'm valgrinding in NVIDIA driver.
On another note I get weird rendering artifacts on Mac ATI, but more importantly:

http://cubicvr.org/CubicVR.js/BeatDetektor-NMG/index-noaudio-8light.html

This version with one additional light crashes firefox4 release here on my Macbook Pro (10.6) /w Nvidia 320M
Depends on: 638549
No longer blocks: mlk-fx5+
Whiteboard: [MemShrink:P1]
Assignee: nobody → jmuizelaar
OS: Mac OS X → All
Hardware: x86 → All
Thanks for the information, Charles. I created bug 664278 based off of your comment.

(In reply to comment #6)
> On another note I get weird rendering artifacts on Mac ATI, but more
> importantly:
> 
> http://cubicvr.org/CubicVR.js/BeatDetektor-NMG/index-noaudio-8light.html
> 
> This version with one additional light crashes firefox4 release here on my
> Macbook Pro (10.6) /w Nvidia 320M
Can you still reproduce this? I'm able to play both the original and the noaudio demo for a while without any noticeable leak in memory. I'm on a 10.6.7 Mac with ATI hardware. "Real Mem" in activity monitor never goes above 300MB for me.
Also, does anyone see the leak on platforms other than OS X?
(In reply to comment #8)
> Can you still reproduce this? I'm able to play both the original and the
> noaudio demo for a while without any noticeable leak in memory. I'm on a
> 10.6.7 Mac with ATI hardware. "Real Mem" in activity monitor never goes
> above 300MB for me.

Tested on Aurora and Nightly on OS X 10.6, and I can't reproduce this anymore.  Something has been fixed elsewhere for sure.  My memory usage is pretty stable now at ~291M (344M virtual) on Aurora, ~209M (250M virtual) on Nightly.

I also don't have the same rendering artifacts I had previously.  I think this can get closed
Status: NEW → ASSIGNED
It'd be nice to know what fixed this.  David, are you willing to do some bisecting with Nightly builds to try to find out when it was fixed?
QA, this needs help with bisecting (unless David's already doing that?).
Keywords: qawanted
I'm trying, somewhat unsuccessfully, to do some vacation.  I'll be back in action in a few weeks.  If someone in QA could do this in the meantime, that would be great.
Whiteboard: [MemShrink:P1] → [MemShrink:P2]
I can live without the bisecting.  Keeping this bug open isn't helping anyone, so I'll close it.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.