Closed
Bug 1511692
Opened 6 years ago
Closed 6 years ago
Extremely spammy warning |WARNING: 'NS_FAILED(rv)', file [snip]/xpcom/io/NonBlockingAsyncInputStream.cpp, line 171|
Categories
(Core :: Networking, enhancement, P5)
Core
Networking
Tracking
()
RESOLVED
FIXED
mozilla65
Tracking | Status | |
---|---|---|
firefox65 | --- | fixed |
People
(Reporter: jorgk-bmo, Assigned: jorgk-bmo)
References
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file, 1 obsolete file)
1001 bytes,
patch
|
baku
:
review+
mayhemer
:
review+
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #1435899 +++ We see this warning thousands of times in our test suite: https://taskcluster-artifacts.net/byD651nKS3unzZJq4IzNHQ/0/public/logs/live_backing.log It comes from here: https://hg.mozilla.org/mozilla-central/rev/5461b62599d7#l1.14
Flags: needinfo?(amarchesini)
Comment 1•6 years ago
|
||
Thank you for filing this. I am not sure if the FF application generates this warning in the DEBUG BUILD as TB's DEBUG BUILD of TB. But I think we can discards "NS_WARN_IF()" call in the if-expression once the situtation is assessed.
Comment 2•6 years ago
|
||
It's perfectly legal to return an error (e.g. NS_BASE_STREAM_CLOSED) for Available(). It's usually not fatal, only indication of a legal state.
Comment 3•6 years ago
|
||
If it is legit to return an error, then we can safely remove the call to NS_WARN_IF(). Suggested patch attached. It compiles locally under linux.
Assignee: nobody → ishikawa
Attachment #9029366 -
Flags: review?(honzab.moz)
Assignee | ||
Comment 4•6 years ago
|
||
Comment on attachment 9029366 [details] [diff] [review] remove NS_WARN_IF() call to suppress spammy warning. Review of attachment 9029366 [details] [diff] [review]: ----------------------------------------------------------------- ::: xpcom/io/NonBlockingAsyncInputStream.cpp @@ +167,5 @@ > > NS_IMETHODIMP > NonBlockingAsyncInputStream::Available(uint64_t* aLength) { > nsresult rv = mInputStream->Available(aLength); > + if (NS_FAILED(rv)) { I don't think this will be approved since the idea is to hear about errors. I think first we need to find out what the specific error is and then ignore it.
Assignee | ||
Comment 5•6 years ago
|
||
I added some debug and the error returned is 0x80470002 which is NS_BASE_STREAM_CLOSED. Oh, that was already predicted. So I would code something like nsresult rv = mInputStream->Available(aLength); if (rv == NS_BASE_STREAM_CLOSED || NS_WARN_IF(NS_FAILED(rv)) { return rv; }
Assignee | ||
Comment 6•6 years ago
|
||
Attachment #9029389 -
Flags: review?(honzab.moz)
Comment 7•6 years ago
|
||
(In reply to Jorg K (GMT+1) from comment #5) > I added some debug and the error returned is 0x80470002 which is > NS_BASE_STREAM_CLOSED. Oh, that was already predicted. So I would code > something like > nsresult rv = mInputStream->Available(aLength); > if (rv == NS_BASE_STREAM_CLOSED || NS_WARN_IF(NS_FAILED(rv)) { > return rv; > } I see. Thank you.
Updated•6 years ago
|
Attachment #9029389 -
Flags: review?(honzab.moz) → review+
Assignee | ||
Updated•6 years ago
|
Attachment #9029366 -
Attachment is obsolete: true
Attachment #9029366 -
Flags: review?(honzab.moz)
Assignee | ||
Updated•6 years ago
|
Attachment #9029389 -
Attachment description: 1511692-suppress-warning.patch → 1511692-suppress-warning.patch - When landing, change to r=baku
Flags: needinfo?(amarchesini)
Assignee | ||
Comment 8•6 years ago
|
||
Thanks, Andrea! Dear sheriff, please change reviewer to r=baku when landing.
Pushed by ebalazs@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/e77b8931ae7a suppress warning for NS_BASE_STREAM_CLOSED from base streams Available() call. r=baku
Keywords: checkin-needed
Comment 10•6 years ago
|
||
Comment on attachment 9029389 [details] [diff] [review] 1511692-suppress-warning.patch - When landing, change to r=baku Review of attachment 9029389 [details] [diff] [review]: ----------------------------------------------------------------- Yes, that's exactly what I wanted to suggest! thanks.
Attachment #9029389 -
Flags: review+
Updated•6 years ago
|
Whiteboard: [necko-triaged]
Comment 11•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e77b8931ae7a
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox65:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in
before you can comment on or make changes to this bug.
Description
•