Closed Bug 1994039 Opened 1 year ago Closed 4 days ago

Intermittent Hit MOZ_CRASH([Parent X, Y Thread] ###!!! ASSERTION: Network cache reported memory consumption is not at 0, probably leaking?: 'Error', file /builds/worker/checkouts/gecko/netwerk/cache2/CacheStorageService.cpp:X)

Categories

(Core :: Networking: Cache, defect)

defect

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox-esr153 --- affected
firefox160 --- wontfix
firefox161 --- wontfix
firefox162 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: jesup, NeedInfo)

Details

(Keywords: assertion, intermittent-failure, Whiteboard: [necko-triaged][stockwell unknown][stockwell needswork:owner])

Attachments

(1 external file)

Filed by: kaie [at] kuix.de
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=531170700&repo=comm-central&task=duYYy6Z6S7GPEfpCwNg-mg.0
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/duYYy6Z6S7GPEfpCwNg-mg/runs/0/artifacts/public/logs/live_backing.log


Intermittent Hit MOZ_CRASH([Parent X, Y Thread] ###!!! ASSERTION: Network cache reported memory consumption is not at 0, probably leaking?: 'Error', file /builds/worker/checkouts/gecko/netwerk/cache2/CacheStorageService.cpp:X) at /builds/worker/checkouts/gecko/xpcom/base/nsDebugImpl.cpp:X

Could this be related to another failure message, which we see a log in some tests:

[Parent 1183, IPC I/O Parent] WARNING: Process 1346 hanging at shutdown; attempting crash report (fatal error).: file /builds/worker/checkouts/gecko/ipc/chromium/src/chrome/common/process_watcher_posix_sigchld.cc:240

Seen once in the above scenario, but for example seeing many times in this CCov test:
https://treeherder.mozilla.org/jobs?repo=comm-central&fromchange=9545675a66294297d6a9efa4c1b2091c22c7a260&selectedTaskRun=NpKifCu1R22sc1vxQraFJQ.0

Note this happens in a Thunderbird build.

Do we need to do anything that Firefox does, to ensure we cleanup correctly?

Randell, could you take a look at this?
It seems we're leaking when test_cache2_compression_dictionary.js fails.

Flags: needinfo?(rjesup)
Assignee: nobody → rjesup
Flags: needinfo?(rjesup)
Flags: needinfo?(rjesup)
Whiteboard: [necko-triaged]

CacheFileMetadata and memory-only CacheFileChunk objects report their memory
usage to CacheStorageService, but only CacheEntry kept the service alive. At
shutdown a CacheFile can outlive its last CacheEntry, for example when a closed
output stream or an in-flight NetUtil.asyncCopy still references it. Dropping
that entry then destroyed the service while the file's memory was still
counted, which tripped the "memory consumption is not at 0" assertion in
~MemoryPool. The file's later reports were skipped, or could race with the
service's destruction on another thread.

Each reporting CacheMemoryConsumer now holds a strong reference to the service,
so the service is destroyed only after every consumer has reported a size of 0.

Status: NEW → RESOLVED
Closed: 4 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
Flags: needinfo?(rjesup)

The patch landed in nightly and ESR is affected.

:jesup, please make an uplift decision for ESR:

  • For ESR, nominate the patch for the appropriate ESR uplift approval if the fix should be included in ESR, or set the ESR status flag(s) to wontfix if an uplift isn't needed. Each affected ESR release needs a decision.

Uplift requests can be submitted from Lando: D341821.

See Requesting an Uplift for documentation on how to request an uplift.

For more information, please visit BugBot documentation.

Flags: needinfo?(rjesup)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: