If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

HTTP cache v2: Assertion failure: data.mCacheSize == mIndexStats.Size(), CacheIndex.cpp:850 with the index on win

RESOLVED DUPLICATE of bug 923016

Status

()

Core
Networking: Cache
RESOLVED DUPLICATE of bug 923016
4 years ago
4 years ago

People

(Reporter: mayhemer, Assigned: mayhemer)

Tracking

Other Branch
All
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

4 years ago
https://tbpl.mozilla.org/?tree=Gum&rev=ec2fcd5a61ae

On all win platforms.

There is also
Assertion failure: isEmpty(), at c:\builds\moz2_slave\gum-w32-d-00000000000000000000\build\obj-firefox\dist\include\mozilla/LinkedList.h:305 
https://tbpl.mozilla.org/php/getParsedLog.php?id=31701118&tree=Gum

Not sure it's related.
(Assignee)

Comment 1

4 years ago
I've just hit this locally.  Called from CacheIndex::OnFileRenamed with aSucceeded=false since aResult=NS_ERROR_FILE_IS_LOCKED.

When looking at the code...

  ApplyIndexChangesHelper data;
  data.mIndexStats = &mIndexStats;
  data.mCacheSize = 0;

  if (aSucceeded) {
    mIndex.EnumerateEntries(&CacheIndex::ApplyIndexChanges, &data);
    mIndexOnDiskIsValid = true;
  }

  MOZ_ASSERT(data.mCacheSize == mIndexStats.Size());

...should this assert be called when !aSucceeded?

Since:

data.mCacheSize = 0 (obviously)
mIndexStats.Size() = 3001 (not sure what this number means at all, no comments on the memeber or in the code..)
(Assignee)

Comment 2

4 years ago
Created attachment 8345564 [details]
log snipppet

What is the most curious is that we are renaming the index file (index.tmp).  I'm saving the whole log (until the assert has happen) if interested.
(Assignee)

Comment 3

4 years ago
Created attachment 8346179 [details] [diff] [review]
v1

According how I understand the code, it seems like the clear solution is to move this assert to a place where the tested values make sense.
Attachment #8346179 - Flags: feedback?(michal.novotny)
Comment on attachment 8346179 [details] [diff] [review]
v1

Right, the assert should check the state after enumeration. Please check the patch in.
Attachment #8346179 - Flags: review+
Attachment #8346179 - Flags: feedback?(michal.novotny)
Attachment #8346179 - Flags: feedback+
(Assignee)

Comment 5

4 years ago
Comment on attachment 8346179 [details] [diff] [review]
v1

Landed on gum: https://hg.mozilla.org/projects/gum/rev/9a67a5eb528a
Attachment #8346179 - Attachment description: v1 - WIP → v1
(Assignee)

Updated

4 years ago
No longer blocks: 923016
Depends on: 923016
This patch will be part of the final CacheIndex patch.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 923016
You need to log in before you can comment on or make changes to this bug.