Closed Bug 1414068 Opened 7 years ago Closed 7 years ago

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

Categories

(MailNews Core :: Backend, defect)

defect
Not set
normal

Tracking

(firefox58 fixed)

RESOLVED FIXED
Thunderbird 58.0
Tracking Status
firefox58 --- fixed

People

(Reporter: jorgk-bmo, Assigned: baku)

Details

Attachments

(1 file)

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)
Attached patch warning.patchSplinter Review
Assignee: nobody → amarchesini
Flags: needinfo?(amarchesini)
Attachment #8925453 - Flags: review?(bugs)
Attachment #8925453 - Flags: review?(bugs) → review+
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
https://hg.mozilla.org/mozilla-central/rev/81effafd00ce
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 58.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: