Closed Bug 431139 Opened 17 years ago Closed 9 years ago

###!!! ASSERTION: ### mem cache leaking entries? running extension manager tests in debug with no disk cache

Categories

(Core :: Networking: Cache, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: standard8, Unassigned)

References

Details

(Keywords: memory-leak)

Attachments

(1 file)

The following tests all fail on Thunderbird and Sunbird trunk builds with the same assertion on exit:

test_bug299716.js
test_bug378216.js
test_bug394300.js

The tests themselves seem to pass, but on exit, the assertion below is raised:

###!!! ASSERTION: ### mem cache leaking entries?
: 'mEntryCount == 0', file /Users/moztest/mozilla/hg/mozilla/netwerk/cache/src/nsMemoryCacheDevice.cpp, line 130

This happens on Mac & Linux.

Both Thunderbird and Sunbird have

NECKO_DISK_CACHE=

in confvars.sh. If I remove this (at least on the Sunbird build) then the tests pass completely.

To complete the loop, if I remove the "NECKO_DISK_CACHE=" line AND specify "browser.cache.disk.enable" as false in the relevant prefs file, then the assertion occurs again.

So I don't think Thunderbird and Sunbird can get around this without a fix in core.
I have just done some further testing, this assertion only happens in debug mode. 

However, I believe it is implying a memory leak, and seeing as users can disable the disk cache (e.g. for mobile devices?) I'm leaving it open, but removing it from blocking the setting up of unit tests for Thunderbird/Sunbird.

Expanding on comment 0:

test_bug299716.js
test_bug378216.js
test_bug394300.js

these tests are all in toolkit/mozapps/extensions

test_download_manager.js

in toolkit/components/downloads also causes this assertion.
No longer blocks: 405007, 406227
Keywords: mlk
Summary: ###!!! ASSERTION: ### mem cache leaking entries? running extension manager tests with NECKO_DISK_CACHE=0 → ###!!! ASSERTION: ### mem cache leaking entries? running extension manager tests in debug with no disk cache
Version: unspecified → Trunk
I hit this occasionally on shutdown as well, in a debug 3.0a2pre TB Mac build.
Attached file both normal and full backtraces (deleted) —
Hope this helps.
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1a2pre)
Gecko/2008080202 SeaMonkey/2.0a1pre] (home, debug default) (W2Ksp4)

Usual |make check| leaks, but without assertion:
{{
test_bug299716.js.log
 => mFreeCount:           26959  --  LEAKED 436 !!!

test_bug378216.js.log
 => mFreeCount:           33597  --  LEAKED 434 !!!

test_bug394300.js.log
 => mFreeCount:           12169  --  LEAKED 434 !!!
}}
(In reply to comment #5)
> [Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1a2pre)
> Gecko/2008080202 SeaMonkey/2.0a1pre] (home, debug default) (W2Ksp4)

<test_download_manager.js> is not "built / run",
as SM does not use Toolkit D.M. (yet).
(In reply to comment #5)
> [Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1a2pre)
> Gecko/2008080202 SeaMonkey/2.0a1pre] (home, debug default) (W2Ksp4)

Serge, please read comment 0 FULLY. This bug only happens in TB & SB because NECKO_DISK_CACHE is not set (i.e. not 1).

It does NOT happen in SM or FF because they don't have that set by default.
FWIW test_bug394717.js now exhibits this assertion/failure as well (in TB/SB).
(In reply to comment #5)
>  => mFreeCount:           26959  --  LEAKED 436 !!!
>  => mFreeCount:           33597  --  LEAKED 434 !!!
>  => mFreeCount:           12169  --  LEAKED 434 !!!

These leak(s) looks like to be bug 448980 (++).


(In reply to comment #7)
> Serge, please read comment 0 FULLY. This bug only happens in TB & SB because
> NECKO_DISK_CACHE is not set (i.e. not 1).

I did.
The "missing" word in comment 0 was *only*:
I thought it wouldn't hurt to add comment 5.
new cache code
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: