Closed Bug 1377681 Opened 8 years ago Closed 8 years ago

Crash in mozilla::net::CacheFile::Truncate: MOZ_RELEASE_ASSERT(maxInputChunk <= newLastChunk + 1)

Categories

(Core :: Networking: Cache, defect)

Unspecified
Windows
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox-esr52 --- unaffected
firefox54 --- unaffected
firefox55 --- disabled
firefox56 --- fixed

People

(Reporter: nbp, Assigned: michal)

References

Details

(Keywords: crash, Whiteboard: [necko-active])

Crash Data

Attachments

(1 file)

This bug was filed from the Socorro interface and is report bp-4e1cdfeb-b979-4bf9-8682-1f98f0170701. ============================================================= Based on the fact that this bug started spiking on the same time frame as the bytecode cache experiment, this might likely be related to Bug 900784.
Flags: needinfo?(valentin.gosu)
It definitely is related because CacheFile::Truncate is used only by alternative streams.
Assignee: nobody → michal.novotny
Flags: needinfo?(valentin.gosu)
Whiteboard: [necko-active]
If you could reproduce the crash, having log would help a lot.
Could this bug be a duplicate of Bug 1372993?
(In reply to Nicolas B. Pierron [:nbp] from comment #3) > Could this bug be a duplicate of Bug 1372993? No, AFAICS bug 1372993 is duplicate of other 2 bugs that were already fixed.
I just hit this crash today's build on windows scrolling a twitter page. I also have a dozen pinned tabs so maybe one of them refreshed or something. Sorry no clear steps to reproduce. Will keep trying.
OS: Windows 7 → Windows
After doing some changes in the cache code to hit this code more often I was able to reproduce it. The problem is at http://searchfox.org/mozilla-central/rev/238406d4c1b3f147522ce0a45a4c6f84a8115781/netwerk/cache2/CacheFileInputStream.h#43 where -1 is casted to the same type as return value of CacheChunk::Index() which is uint32_t. So the method returns UINT32_MAX instead of -1.
Attached patch fixSplinter Review
Attachment #8884461 - Flags: review?(valentin.gosu)
Attachment #8884461 - Flags: review?(valentin.gosu) → review+
Pushed by mnovotny@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/f97eaa4aadb2 Crash in mozilla::net::CacheFile::Truncate: MOZ_RELEASE_ASSERT(maxInputChunk <= newLastChunk + 1), r=jduell
Great catch!
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
This is a topcrash in the Nightly 20170708030206 build, but is gone in the Nightly 20170709030204 build. Excellent!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: