Closed Bug 17390 Opened 25 years ago Closed 24 years ago

leaking documents and webshells while running editor

Categories

(Core :: XUL, defect, P1)

All
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: warrensomebody, Assigned: dbaron)

References

Details

(Keywords: memory-leak, Whiteboard: [nsbeta3+])

Attachments

(6 files)

Akkana Peck did this:

  setenv XPCOM_MEM_BLOAT_LOG 1
  script
  apprunner -edit
  (typed a few characters, did Debug->Output HTML, then quit)
  ^D (to end the script)

and said:

   We're leaking 1023 nsCSSSelectors and 12 CSSStyleSheetImpls.

Pierre, can you investigate.

[PTD team: we don't know the extent of the memory bloat due to this yet. We
just know it's unnecessary.]
Assignee: pierre → beard
Summary: MLK: leaking nsCSSSelectors and CSSStyleSheetImpls while running editor → MLK: leaking documents and webshells while running editor
The style leaks are the result of leaks at a higher level. As you can see in the
attached Win32 console output, we are leaking the following objects:

     object               total leaked
     ------               ------------
     nsDocument              5
     DocumentViewerImpl     15
     nsWebShellWindow        3
     nsWebShell              6
     PresShell               7
     nsPresContext           7

We don't have a clear owner for nsDocument or nsWebShell so I'm humbly submitting
this to beard who's got the best tools in the Valley to do that kind of work.

Changed the summary line to "leaking documents and webshells" from "leaking
nsCSSSelectors and CSSStyleSheetImpls".
*** Bug 17389 has been marked as a duplicate of this bug. ***
Status: NEW → ASSIGNED
Summary: MLK: leaking documents and webshells while running editor → [MLK] leaking documents and webshells while running editor
Blocks: 17557
I don't see these same leaks, but I see others. Leak detection is a
moving target.
Keywords: mlk
Summary: [MLK] leaking documents and webshells while running editor → leaking documents and webshells while running editor
Style person should follow up on these leaks. They are evidently shutdown leaks, 
as they don't appear as transient leaks with the Boehm leak detector.
Assignee: beard → pierre
Status: ASSIGNED → NEW
On Mac, just starting up and shutting down leaks these, which prevent the 
nsIOService (and related services) from shutting down properly.

                       Total      Rem
CSSLoaderImpl             18        5
CSSParserImpl             90        7
CSSStyleSheetImpl         92       91
CSSStyleSheetInner        54       53

...but I don't see the same problem on WindowsNT.
Blocks: 29702
Blocks: 34663
Blocks: 33821
Status: NEW → ASSIGNED
Target Milestone: --- → M18
CCd attinasi. Gordon says that it only happens in the Mac but it may be related 
to the other XP leaks that Marc has on his list.
Really CCd attinasi...
How come this is still on my list?
Trying for the 3rd time to reassign to attinasi...
Assignee: pierre → attinasi
Status: ASSIGNED → NEW
Status: NEW → ASSIGNED
This bug has been marked "future" because the original netscape engineer working 
on this is over-burdened. If you feel this is an error, that you or another 
known resource will be working on this bug,or if it blocks your work in some way 
-- please attach your concern to the bug for reconsideration.
Target Milestone: M18 → Future
Blocks: 21650
=> TK at AOL
Assignee: attinasi → TkThyag
Status: ASSIGNED → NEW
Target Milestone: Future → M20
Status: NEW → ASSIGNED
reassigning to dbaron
Assignee: TkThyag → dbaron
Status: ASSIGNED → NEW
I believe the fix I attached yesterday to bug 24645 should fix this bug.  The 
root of the leak was the XUL keybinding document table, which was intentionally 
leaked to fix bug 27739.  However, just releasing the table was not sufficient 
because nobody was breaking the circular references between the keybinding 
documents (nsXULDocument objects) and their script objects, which would explain 
the state of this bug before.  (Note that there were 3 XULDocumentImpl leaked in 
pierre's original bloat log attached above.  This is what I saw before breaking 
the circular references.)
Status: NEW → ASSIGNED
Component: Style System → XP Toolkit/Widgets: XUL
Actually, this doesn't fix all the leaks when starting with mozilla -editor.  
I'm working on this new leak.  In fact, I'm writing a tutorial by writing down 
exactly what I do to find it.  It's going to be an interesting tutorial...
Part or all of the remaining leak has something to do with DocumentType objects
not having their script objects un-rooted when the
nsDocument::SetScriptGlobalObject(null) is called.  This function needs to call
SetDocument on all the elements in mProlog and mEpilog instead of just on
mRootContent.  Probably it needs to do the same elsewhere.

I'm not sure if that will fix the whole thing.  There may be a problem with
SetOpenerWindow too...
Keywords: nsbeta3, review
Priority: P3 → P1
Target Milestone: M20 → M18
Whiteboard: [nsbeta3+]
I checked in the keybindings table / keybindings document part of the fix.
QA Contact: jrgm
Was unable to check in due to cvs lock in layout/html/style/src.  Will try again
another time.
Keywords: review
Fix checked in, 2000-08-06 20:03 PDT.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
*** Bug 42970 has been marked as a duplicate of this bug. ***
verified that the patches are in. Marking as such.
Status: RESOLVED → VERIFIED
*** Bug 39855 has been marked as a duplicate of this bug. ***
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: