Closed
Bug 1401224
Opened 8 years ago
Closed 8 years ago
Assertion failure: aLength > 0 (Writing a zero-sized chunk), at image/SourceBuffer.cpp:348
Categories
(Core :: Networking: Cache, defect)
Tracking
()
RESOLVED
FIXED
mozilla58
People
(Reporter: bc, Assigned: michal)
References
()
Details
(Keywords: assertion)
Attachments
(3 files)
1. https://nhiemvu.lienminh.garena.vn/tanthu
2. Assertion failure: aLength > 0 (Writing a zero-sized chunk), at z:/build/build/src/image/SourceBuffer.cpp:348
#01: mozilla::image::SourceBuffer::Append(char const *,unsigned int) [image/SourceBuffer.cpp:347]
#02: mozilla::image::AppendToSourceBuffer [image/SourceBuffer.cpp:454]
#03: mozilla::net::CacheFileInputStream::ReadSegments(nsresult (*)(nsIInputStream *,void *,char const *,unsigned int,unsigned int,unsigned int *),void *,unsigned int,unsigned int *) [netwerk/cache2/CacheFileInputStream.cpp:186]
#04: mozilla::image::SourceBuffer::AppendFromInputStream(nsIInputStream *,unsigned int) [image/SourceBuffer.cpp:469]
#05: mozilla::image::RasterImage::OnImageDataAvailable(nsIRequest *,nsISupports *,nsIInputStream *,unsigned __int64,unsigned int) [image/RasterImage.cpp:1045]
#06: imgRequest::OnDataAvailable(nsIRequest *,nsISupports *,nsIInputStream *,unsigned __int64,unsigned int) [image/imgRequest.cpp:1191]
#07: ProxyListener::OnDataAvailable(nsIRequest *,nsISupports *,nsIInputStream *,unsigned __int64,unsigned int) [image/imgLoader.cpp:2789]
#08: mozilla::net::nsHttpChannel::OnDataAvailable(nsIRequest *,nsISupports *,nsIInputStream *,unsigned __int64,unsigned int) [netwerk/protocol/http/nsHttpChannel.cpp:7794]
Windows, Linux - Nightly 57.
This assertion is not very reproducible though it keeps appearing. I've been able to reproduce occasionally manually especially on Windows. I reproduced on Windows 10 32bit using https://www.charchinet.com/ this morning but was not able to reproduce again after the first time.
I am going to file this anyway in the hope that it will be clear as to what the issue is even if it is not easily reproducible.
| Reporter | ||
Comment 1•8 years ago
|
||
This includes most of the urls where this has been reproduced at least once. I've scrubbed some urls which may contain pii.
Comment 2•8 years ago
|
||
As far as I can tell the length argument (which we are asserting about) comes from the networking code.
Updated•8 years ago
|
Component: ImageLib → Networking
Patrick, thoughts about comment 2?
Flags: needinfo?(mcmanus)
Comment 4•8 years ago
|
||
you've got the cache on the stack so I'll redirect to michal..
but in general, this has been a common enough problem (especially with addons in the past!) that its worth handling it at runtime - so many things get their hooks into stream processing. see nshttpconnection.cpp:1685
Flags: needinfo?(mcmanus) → needinfo?(michal.novotny)
| Assignee | ||
Comment 5•8 years ago
|
||
CacheFileInputStream::ReadSegments was called with aCount=0
Flags: needinfo?(michal.novotny)
| Assignee | ||
Comment 6•8 years ago
|
||
Other possibility is that we call the writer after aCount bytes were already written because we don't break the loop at http://searchfox.org/mozilla-central/rev/15ce5cb2db0c85abbabe39a962b0e697c9ef098f/netwerk/cache2/CacheFileInputStream.cpp#201.
Assignee: nobody → michal.novotny
Component: Networking → Networking: Cache
| Assignee | ||
Comment 7•8 years ago
|
||
Attachment #8914519 -
Flags: review?(valentin.gosu)
Updated•8 years ago
|
Attachment #8914519 -
Flags: review?(valentin.gosu) → review+
Pushed by mnovotny@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/01c08db62e0f
Do not call aWriter with no data in CacheFileInputStream::ReadSegments, r=valentin
Comment 9•8 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox58:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Comment 10•8 years ago
|
||
Is there a user impact here that justified backport to Beta or can this ride the 58 train?
Blocks: 1279246
status-firefox56:
--- → wontfix
status-firefox-esr52:
--- → wontfix
Flags: needinfo?(michal.novotny)
Version: 57 Branch → 49 Branch
| Assignee | ||
Comment 11•8 years ago
|
||
AFAICS, calling SourceBuffer::Append() with aLength=0 should be no-op if it's not a first call. There should be no problem in release build.
Flags: needinfo?(michal.novotny)
Updated•8 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•