shutdown leak: nsIOService and nsProtocolProxyService via cycle

VERIFIED FIXED in mozilla1.3alpha

Status

()

Core
Networking
P2
normal
VERIFIED FIXED
16 years ago
10 years ago

People

(Reporter: dbaron, Assigned: dbaron)

Tracking

({memory-leak})

Trunk
mozilla1.3alpha
x86
Linux
memory-leak
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [patch])

Attachments

(1 attachment)

(Assignee)

Description

16 years ago
The nsIOService and nsProtocolProxyService have a reference cycle, so they, and
a whole bunch of objects that they own, leak at XPCOM shutdown.  I'll attach a
patch that breaks this cycle in the Observe method of the IO service (observing
XPCOM shutdown).  I also add a null check before the use of mProxyService. 
Should this just be an assertion instead?

In any case, this cleans up a lot of the shutdown leak noise (along with bug
174131) that I see, and should make it a good bit easier to debug leaks.
(Assignee)

Updated

16 years ago
Status: NEW → ASSIGNED
Keywords: mlk
Priority: -- → P2
Whiteboard: [patch]
Target Milestone: --- → mozilla1.3alpha
(Assignee)

Comment 1

16 years ago
Created attachment 102685 [details] [diff] [review]
patch

The first change is a little bit of cleanup that I think I actually did when
noticing that the function it's in was taking a lot of time in a profile.

Comment 2

16 years ago
Comment on attachment 102685 [details] [diff] [review]
patch

sr=darin (thanks for catching this!)
Attachment #102685 - Flags: superreview+
Comment on attachment 102685 [details] [diff] [review]
patch

r=bbaetz
Attachment #102685 - Flags: review+
(Assignee)

Comment 4

16 years ago
Fix checked in to trunk, 2002-11-06 05:03 PDT.
Status: ASSIGNED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED

Comment 5

16 years ago
*** Bug 179094 has been marked as a duplicate of this bug. ***

Comment 6

16 years ago
Will this fix be in the 1.2 branch?
(Assignee)

Comment 7

16 years ago
No.

Comment 8

15 years ago
is there any output that could verify this problem is solved in 1.3a?
Keywords: verifyme

Comment 9

15 years ago
VERIFIED/lxr.

http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&file=nsIOService.cpp&root=/cvsroot&subdir=mozilla/netwerk/base/src&command=DIFF_FRAMESET&rev1=1.157&rev2=1.158

It sounds like type of problem that can only be seen via debug builds.
Status: RESOLVED → VERIFIED

Updated

10 years ago
Keywords: verifyme
You need to log in before you can comment on or make changes to this bug.