Closed Bug 44230 Opened 24 years ago Closed 24 years ago

NEEDHELP: leakage of class nsFileChannel, 5 references dangling

Categories

(Core :: Networking, defect, P3)

x86
Linux
defect

Tracking

()

VERIFIED WORKSFORME

People

(Reporter: inaky.gonzalez, Assigned: kandrot)

References

Details

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

This problem is reproducible, at least as of a build from fresh CVS code, June
28th.

Start mozilla with the about:blank page as command-line URL.
Close mozilla clickin in the window manager´s close window button.

(obviously, setting up XPCOM refcnt balancer and bloat logs)

I isolated down to the about:blank page this bug from other test case. I haven´t
been able to track exactly where the problem happens, but if I manually release
those five references, I get rid of all the leaks caused by it, namely:

[CLASSNAME NUMBER-OF-INSTANCES-FREED]
GIFDecoder -1
ImageConsumer -1
ImageNetContextImpl -1
ImageRendererImpl -1
ImageURLImpl -1
ImgDCallbk -1
NetReaderImpl -1
nsAsyncStreamListener -1
nsAsyncStreamObserver -1
nsDocLoaderImpl -1
nsDocumentOpenInfo -1
nsEventQueueImpl -1
nsEventQueueServiceImpl -1
nsFileChannel -1
nsFileTransport -1
nsHashKey -11
nsHashtable -2
nsImageGTK -1
nsLoadGroup -1
nsLocalFile -1
nsMemoryImpl -1
nsNoAuthURLParser -1
nsPipe -1
nsProxyEventClass -2
nsProxyEventObject -2
nsProxyObject -2
nsResChannel -1
nsResProtocolHandler -1
nsStdURL -11
nsStdURLParser -1
nsStr 3
nsStringKey -10
nsSupportsArray -10
nsSystemPrincipal -1
nsVoidArray -10
xptiInterfaceInfo -2

which leaves the bloat log for the about blank page to list only 8 classes, of
them most are ghost leaks, but I still have to check them.

I´m starting to consider this could be a circular reference problem, but I could
not find a place to start. If I manually released one of the leaking
nsFileTransport objects, I´d get -4 references on the leaking nsFileChannel, but
also when releasing nsFileChannel I get nsFileTransport released, so that
doesn´t look like the way to go.

In any case, it is just too confusing for me. The refcnt balancer trees show the
problems start when calling IL_GetImage(). there we setup the load operation,
which gives us 6 references. One is released from the nsLoadGroup impl, but we
still 5 which are interrelated and I cannot find where is the failure point. I´m
guessing that the problem could be not releasing on image load finish, but
again,, I am not able to find it. NEED SOME HELP PLZ! :)
Keywords: helpwanted, mlk
*** Bug 42494 has been marked as a duplicate of this bug. ***
*** Bug 42891 has been marked as a duplicate of this bug. ***
Keywords: nsbeta3
edward are you looking at something similar? should this be yours? (approving
for nsbeta3)
Whiteboard: [nsbeta3+]
to edward.
Assignee: gagan → kandrot
I saw this happen a few builds ago, but have not been able to recreate it in 
the past week, including the most current build.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → WORKSFORME
marking verified per engineers comments
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.