Closed Bug 299704 Opened 19 years ago Closed 9 years ago

Mozilla freezes and leaks memory setting ftp image source via JS

Categories

(Core Graveyard :: Networking: FTP, defect)

x86
Linux
defect
Not set
major

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: ajschult784, Unassigned)

References

Details

(Keywords: perf, testcase, Whiteboard: [necko-backlog])

Attachments

(1 file, 1 obsolete file)

This is an FTP version of bug 228233.  Current trunk builds (suite) exhibit
uncontrolled memory growth (~1MB/s) setting an image source via JS to an FTP
URL.  I'll attach a testcase.  Unfortunately, XPCOM_MEM_LEAK_LOG does not show
any substantial leak (a few hundred bytes from random objects).  valgrind shows
more leaked, but only a few KB that could be related to this bug. I also don't
think the real leak happens running under valgrind (probably too slow).  I get a
zillion of these after I hit "stop script", but only if I run under valgrind:

###!!! ASSERTION: ftp state is null.: 'Error', file
/build/andrew/moz-debug/mozilla/netwerk/protocol/ftp/src/nsFTPChannel.cpp, line 545
Attached file testcase (obsolete) —
loading this testcase grabs 1+MB/s for me with trunk suite build 2005070405
Summary: Mozilla freezes leaks memory setting ftp image source via JS → Mozilla freezes and leaks memory setting ftp image source via JS
Andrew, is that the right testcase?  It doesn't have an image or ftp:// urls in it...
Andrew, please see comment 2?
Attached file the real testcase
right.  here's the real testcase
Attachment #188281 - Attachment is obsolete: true
Hmmm... So unlike bug 228233 there's no actual leak?  Just memory growth while the testcase runs (because the channels involved can't get deallocated until the event queue gets processed and the testcase is not allowing event processing)?
Depends on: 228233
Well, no leak that XPCOM_MEM_LEAK notices.  And running under valgrind seems to avoid this bug in the first place.  But I don't see memory reclaimed after I stop the script and open / close windows to trigger garbage collection.
Oh, ok.   That I should look into.  Thanks!
mass reassigning to nobody.
Assignee: dougt → nobody
I assume this is still a problem, right?
Yes.  The slow script warning seems to help in stopping the memory growth (I still leak sometimes), but I increased the timeout to 60s and I grew from 275MB virtual to 750MB.
So I tried running with XPCOM_MEM_LEAK_LOG and calling nsTraceRefcntImpl::DumpStatistics(0, 0) after closing the testcase and triggering a GC.  The only FTP object alive at that point is the ftp protocol handler.

I wonder whether this is basically a fragmentation issue.  stuart, is there a difference here between our normal allocators and jemalloc?
(In reply to comment #11)
>  stuart, is there a difference here between our normal allocators and jemalloc?
Keywords: perf
Whiteboard: [necko-backlog]
actually, take the http bug but close ftp as deprecated
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: