Closed
Bug 1418545
Opened 7 years ago
Closed 6 years ago
ASSERTION: count of zero passed to OnDataAvailable()
Categories
(Core :: Networking: HTTP, defect, P3)
Core
Networking: HTTP
Tracking
()
RESOLVED
FIXED
mozilla64
People
(Reporter: jduell.mcbugs, Assigned: jesup)
References
Details
(Keywords: assertion, Whiteboard: [necko-triaged])
Attachments
(1 file)
1.42 KB,
patch
|
mayhemer
:
review+
|
Details | Diff | Splinter Review |
:jesup reports that he's seeing
[Parent 18513, Main Thread] ###!!! ASSERTION: count of zero passed to OnDataAvailable: 'Error', file /home/jesup/src/mozilla/inbound/netwerk/streamconv/converters/nsHTTPCompressConv.cpp, line 268
STR: Easily hittable by leaving a DEBUG build sitting on arstechnica.com or an article there. Related to ads.
Reporter | ||
Comment 1•7 years ago
|
||
:jesup: can you give us a stack trace? An NSPR log probably wouldn't hurt either.
Flags: needinfo?(rjesup)
Assignee | ||
Comment 2•7 years ago
|
||
backtrace and poking around in ondata.log; http logs in the .gz files (I stopped the logging right after it hit).
https://app.box.com/s/7etjnni7yic8ty26rq9oi8vhzh4ncvcm
ASAN Debug+opt build, linux64, inbound rev 887fa3629f46
Flags: needinfo?(rjesup)
![]() |
||
Comment 3•7 years ago
|
||
I think just adding |if (length) {}| around https://dxr.mozilla.org/mozilla-central/rev/b056526be38e96b3e381b7e90cd8254ad1d96d9d/netwerk/streamconv/converters/nsUnknownDecoder.cpp#867-872 would do. It's legal IMO to don't have any data to convert.
Assignee | ||
Comment 4•7 years ago
|
||
Attachment #8930364 -
Flags: review?(honzab.moz)
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → rjesup
Status: NEW → ASSIGNED
![]() |
||
Comment 5•7 years ago
|
||
Comment on attachment 8930364 [details] [diff] [review]
Don't fire OnDataAvailable for 0 bytes
Review of attachment 8930364 [details] [diff] [review]:
-----------------------------------------------------------------
::: netwerk/streamconv/converters/nsUnknownDecoder.cpp
@@ +863,5 @@
> do_CreateInstance(NS_STRINGINPUTSTREAM_CONTRACTID);
> if (!rawStream)
> return NS_ERROR_FAILURE;
>
> + if (length) {
apprently you don't need to create the rawStream either, the four lines above should be moved to the conditioned block as well.
otherwise good.
thanks!
Attachment #8930364 -
Flags: review?(honzab.moz) → review+
![]() |
||
Updated•7 years ago
|
Priority: -- → P3
Whiteboard: [necko-triaged]
Comment 6•6 years ago
|
||
I hit these assertion failures when loading https://www.wired.com/ home page or articles in a debug build:
[Parent 14183, Main Thread] ###!!! ASSERTION: count of zero passed to OnDataAvailable: 'Error', file /Users/chris/Code/mozilla/firefox/netwerk/streamconv/converters/nsHTTPCompressConv.cpp, line 270
[Parent 14183, Main Thread] ###!!! ASSERTION: count of zero passed to OnDataAvailable: 'Error', file /Users/chris/Code/mozilla/firefox/netwerk/streamconv/converters/nsHTTPCompressConv.cpp, line 270
[Parent 14183, Main Thread] ###!!! ASSERTION: count of zero passed to OnDataAvailable: 'Error', file /Users/chris/Code/mozilla/firefox/netwerk/streamconv/converters/nsHTTPCompressConv.cpp, line 270
This bug has an r+'d patch that just needs some nits fixed before it can land.
status-firefox64:
--- → affected
Keywords: assertion
Pushed by rjesup@wgate.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/7491e6c76312
Don't fire OnDataAvailable for 0 bytes r=mayhemer
Comment 8•6 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Comment 9•6 years ago
|
||
Honza, if rawStream->SetData() or listener->OnDataAvailable() return an error after listener->OnStartRequest(), should this code call listener->OnStopRequest() with the rv error? The current implementation returns on error without calling OnStopRequest().
https://hg.mozilla.org/mozilla-central/rev/7491e6c76312#l1.35
status-firefox62:
--- → wontfix
status-firefox63:
--- → ?
status-firefox-esr60:
--- → wontfix
status-geckoview62:
--- → wontfix
Flags: needinfo?(honzab.moz)
![]() |
||
Comment 10•6 years ago
|
||
(In reply to Chris Peterson [:cpeterson] from comment #9)
> Honza, if rawStream->SetData() or listener->OnDataAvailable() return an
> error after listener->OnStartRequest(), should this code call
> listener->OnStopRequest() with the rv error? The current implementation
> returns on error without calling OnStopRequest().
>
> https://hg.mozilla.org/mozilla-central/rev/7491e6c76312#l1.35
The contract is to call OnStartRequest once also we then MUST call OnStopRequest, once. Hence, yes, if OnData throws, we have to stop delivering data (don't call OnData any more) and call OnStop with the result of OnData:
rv = l->OnDataAvailable(..);
if (NS_FAILED(rv)) {
l->OnStopRequest(request, rv);
return ...;
}
Flags: needinfo?(honzab.moz)
Comment 11•6 years ago
|
||
Is there a user impact which justifies backport consideration here or can this fix ride the trains?
Flags: needinfo?(rjesup)
Assignee | ||
Comment 12•6 years ago
|
||
It's a debug-only issue, so I don't think it's important to uplift.
Flags: needinfo?(rjesup)
Updated•6 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•