Closed Bug 689011 Opened 13 years ago Closed 12 years ago

Leak with frames, adoptNode, carefully timed cycle collection

Categories

(Core :: DOM: Core & HTML, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jruderman, Unassigned)

Details

(Keywords: memory-leak, testcase, Whiteboard: [MemShrink:P2][fuzzblocker:multi-document-leaks])

Attachments

(3 files)

Attached file testcase
Prep:
1. Install https://www.squarefree.com/extensions/domFuzzLite2.xpi
2. Save a local copy of the testcase as "b.html"
3. Build a debug build of Firefox.

Repro:
4. XPCOM_MEM_LEAK_LOG=2 firefox b.html
5. Quit Firefox

Result: about half the time, Firefox leaks an nsDocument.
I can take a look at what the cycle collector logs look like for this.
Assignee: nobody → continuation
For my convenience, this is the heart of the test case:

>function b1()
>{
>  var f = document.getElementById("f");
>  var g = f.contentDocument.documentElement;
>  document.body.removeChild(f);
>  document.adoptNode(g);
>  fuzzPriv.CC();
>  setTimeout(function() { fuzzPriv.CC(); }, 0);
>  //setTimeout(function() { fuzzPriv.quitApplication() }, 200);
>}
>
>// Fragile timing!
>setTimeout(b1, 50);
Whiteboard: [MemShrink] → [MemShrink:P2]
What all do we leak? Document, but what else? DocShell?
Attached file log
No docshells or windows, just a document.
I only see the bug on Windows, but that might have more to do with fragile timing than real OS differences.
Hmm.  Okay. I'll see if I can get some kind of timing to work on OSX.
Attached file testcase 2
Less fragile timing, but stranger ingredients. You might have to set dom.disable_window_status_change to false.
And yet I still can't reproduce on Mac.
mccr8, any progress here?
No, I guess I should break out my Windows machine and run this with a custom build.
Whiteboard: [MemShrink:P2] → [MemShrink:P2][fuzzblocker:multi-document-leaks]
I don't have a Windows dev machine set up, so I don't think I'll look at this any time soon.
Assignee: continuation → nobody
Bug 764111 is reproducible on Mac, and the testcase has some similarities. Let's see if it helps here.
Bug 764111 is WFM.  So is this.

I'll instruct my DOM fuzzer to look for leaks involving frames again.  Let's see what happens :)
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: