WARNING: 'NS_FAILED(rv)', file ... SlicedInputStream.cpp, line 119 cluttering our logs

RESOLVED FIXED in Firefox 58

Status

MailNews Core
Backend
RESOLVED FIXED
17 days ago
13 days ago

People

(Reporter: Jorg K [Almost not working on Thunderbird (some bustage-fix only) due to non-renewal of contract], Assigned: baku)

Tracking

Trunk
Thunderbird 58.0

Firefox Tracking Flags

(firefox58 fixed)

Details

Attachments

(1 attachment)

WARNING: 'NS_FAILED(rv)', file c:/builds/moz2_slave/tb-c-cen-w32-d-000000000000000/build/mozilla/xpcom/io/SlicedInputStream.cpp, line 119 cluttering our logs

https://archive.mozilla.org/pub/thunderbird/tinderbox-builds/comm-central-win32-debug/1509640054/comm-central_win7_ix-debug_test-mozmill-bm110-tests1-windows-build12.txt.gz

has this warning 1960 times. This is a consequence of bug 1403393 and bug 1404045 where we introduced the use of SlicedInputStream to make up for parameters withdrawn from nsIStreamTransportService::CreateInputStream and nsIInputStreamPump::Init() in bug 1402888.

In fact Andrea wrote in follow-up bug 1403771 comment #14 (quote):
  Having ::Available() returning error is correct if the original stream returns that error.

The error at line SlicedInputStream.cpp, line 119 comes from:
NS_IMETHODIMP
SlicedInputStream::Available(uint64_t* aLength)
{
...
  nsresult rv = mInputStream->Available(aLength);
  if (NS_WARN_IF(NS_FAILED(rv))) {  <=== 119
    return rv;
  }

I debugged it a bit and all the errors are cause by nsPipeInputStream::Available() which returns NS_BASE_STREAM_CLOSED from Status(mon).

Andrea, is there anything we can do about this warning? 2000 of them is just too much and it doesn't buy us anything.
Flags: needinfo?(amarchesini)
(Assignee)

Comment 1

14 days ago
Created attachment 8925453 [details] [diff] [review]
warning.patch
Assignee: nobody → amarchesini
Flags: needinfo?(amarchesini)
Attachment #8925453 - Flags: review?(bugs)

Updated

14 days ago
Attachment #8925453 - Flags: review?(bugs) → review+

Comment 2

13 days ago
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/81effafd00ce
SlicedInputStream should be marked as closed when the underyling stream returns NS_BASE_STREAM_CLOSED, r=smaug

Comment 3

13 days ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/81effafd00ce
Status: NEW → RESOLVED
Last Resolved: 13 days ago
status-firefox58: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 58.0
You need to log in before you can comment on or make changes to this bug.