Closed
Bug 1398030
Opened 8 years ago
Closed 8 years ago
Intermittent /eventsource/format-field-id.htm | application crashed [@ mozilla::dom::EventSourceImpl::SetupHttpChannel] after Assertion: ((bool)(__builtin_expect(!!(!NS_FAILED_impl(rv)), 1))), at EventSource.cpp:971
Categories
(Core :: DOM: Events, defect, P2)
Core
DOM: Events
Tracking
()
RESOLVED
FIXED
mozilla58
People
(Reporter: intermittent-bug-filer, Assigned: stone)
References
Details
(Keywords: crash, intermittent-failure, Whiteboard: [stockwell unknown])
Crash Data
Attachments
(2 files, 3 obsolete files)
2.12 KB,
patch
|
baku
:
review+
|
Details | Diff | Splinter Review |
2.47 KB,
patch
|
baku
:
review+
|
Details | Diff | Splinter Review |
Updated•8 years ago
|
Component: DOM → DOM: Events
Updated•8 years ago
|
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → sshih
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment 4•8 years ago
|
||
There is an assertion some seconds before the crash:
[task 2017-09-14T08:29:13.107728Z] 08:29:13 INFO - PID 2779 | Assertion failure: ((bool)(__builtin_expect(!!(!NS_FAILED_impl(rv)), 1))), at /builds/worker/workspace/build/src/dom/base/EventSource.cpp:971
[task 2017-09-14T08:29:13.350974Z] 08:29:13 INFO - PID 2779 | #01: mozilla::dom::EventSourceImpl::SetupHttpChannel() (/builds/worker/workspace/build/application/firefox/libxul.so)
[task 2017-09-14T08:29:13.359183Z] 08:29:13 INFO - PID 2779 | #02: mozilla::dom::EventSourceImpl::InitChannelAndRequestEventSource() (/builds/worker/workspace/build/application/firefox/libxul.so)
[task 2017-09-14T08:29:13.367481Z] 08:29:13 INFO - PID 2779 | #03: mozilla::dom::EventSourceImpl::TimerCallback(nsITimer*, void*) (/builds/worker/workspace/build/application/firefox/libxul.so)
[task 2017-09-14T08:29:13.371397Z] 08:29:13 INFO - PID 2779 | #04: nsTimerImpl::Fire(int) (/builds/worker/workspace/build/application/firefox/libxul.so)
[task 2017-09-14T08:29:13.379591Z] 08:29:13 INFO - PID 2779 | #05: nsTimerEvent::Run() (/builds/worker/workspace/build/application/firefox/libxul.so)
[task 2017-09-14T08:29:13.383528Z] 08:29:13 INFO - PID 2779 | #06: nsThread::ProcessNextEvent(bool, bool*) [clone .part.256] (/builds/worker/workspace/build/application/firefox/libxul.so)
[task 2017-09-14T08:29:13.391654Z] 08:29:13 INFO - PID 2779 | #07: NS_ProcessNextEvent(nsIThread*, bool) (/builds/worker/workspace/build/application/firefox/libxul.so)
[task 2017-09-14T08:29:13.395521Z] 08:29:13 INFO - PID 2779 | #08: mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) (/builds/worker/workspace/build/application/firefox/libxul.so)
[task 2017-09-14T08:29:13.403592Z] 08:29:13 INFO - PID 2779 | #09: MessageLoop::RunInternal() (/builds/worker/workspace/build/application/firefox/libxul.so)
[task 2017-09-14T08:29:13.407486Z] 08:29:13 INFO - PID 2779 | #10: MessageLoop::Run() (/builds/worker/workspace/build/application/firefox/libxul.so)
[task 2017-09-14T08:29:13.415796Z] 08:29:13 INFO - PID 2779 | #11: nsBaseAppShell::Run() (/builds/worker/workspace/build/application/firefox/libxul.so)
[task 2017-09-14T08:29:13.423938Z] 08:29:13 INFO - PID 2779 | #12: XRE_RunAppShell() (/builds/worker/workspace/build/application/firefox/libxul.so)
[task 2017-09-14T08:29:13.431996Z] 08:29:13 INFO - PID 2779 | #13: mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) (/builds/worker/workspace/build/application/firefox/libxul.so)
[task 2017-09-14T08:29:13.432407Z] 08:29:13 INFO - PID 2779 | #14: MessageLoop::RunInternal() (/builds/worker/workspace/build/application/firefox/libxul.so)
[task 2017-09-14T08:29:13.432911Z] 08:29:13 INFO - PID 2779 | #15: MessageLoop::Run() (/builds/worker/workspace/build/application/firefox/libxul.so)
[task 2017-09-14T08:29:13.436890Z] 08:29:13 INFO - PID 2779 | #16: .L299 (/builds/worker/workspace/build/application/firefox/libxul.so)
[task 2017-09-14T08:29:13.518433Z] 08:29:13 INFO - PID 2779 | #17: content_process_main(mozilla::Bootstrap*, int, char**) (/builds/worker/workspace/build/application/firefox/firefox)
[task 2017-09-14T08:29:13.519830Z] 08:29:13 INFO - PID 2779 | #18: main (/builds/worker/workspace/build/application/firefox/firefox)
[task 2017-09-14T08:29:13.520554Z] 08:29:13 INFO - PID 2779 |
Summary: Intermittent /eventsource/format-field-id.htm | application crashed [@ mozilla::dom::EventSourceImpl::SetupHttpChannel] → Intermittent /eventsource/format-field-id.htm | application crashed [@ mozilla::dom::EventSourceImpl::SetupHttpChannel] after Assertion: ((bool)(__builtin_expect(!!(!NS_FAILED_impl(rv)), 1))), at EventSource.cpp:971
Comment hidden (Intermittent Failures Robot) |
Updated•8 years ago
|
Priority: -- → P2
Assignee | ||
Comment 7•8 years ago
|
||
(In reply to Andrew Overholt [:overholt] from comment #6)
> Stone, are you able to take a look?
Yes. It hits the assertion that calls http channel SetRequestHeader failed. It's odd that we call SetRequestHeader few lines before and it doesn't fail. Trying to figure out what's the difference.
Flags: needinfo?(sshih)
Assignee | ||
Comment 8•8 years ago
|
||
(In reply to Ming-Chou Shih [:stone] from comment #7)
> (In reply to Andrew Overholt [:overholt] from comment #6)
> > Stone, are you able to take a look?
> Yes. It hits the assertion that calls http channel SetRequestHeader failed.
> It's odd that we call SetRequestHeader few lines before and it doesn't fail.
> Trying to figure out what's the difference.
Can't reproduce it in local and on the try server. Checked the history [1] and looks like the frequency is decreasing.
[1] https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1398030&startday=2017-09-01&endday=2017-09-21&tree=all
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Assignee | ||
Comment 16•8 years ago
|
||
This is caused by a server response with id = "\n"
Spec says 'If the field value does not contain U+0000 NULL, then set the last event ID buffer to the field value. Otherwise, ignore the field.'
We follow what spec says but fails to SetRequestHeader for a http channel (checks it in [1])
[1] http://searchfox.org/mozilla-central/rev/d0448c970093f94bd986a21d3a9e8c366b316eb4/netwerk/protocol/http/nsHttp.cpp#278
Assignee | ||
Comment 17•8 years ago
|
||
hmm, might be a problem when parsing stream in EventSource
Comment hidden (Intermittent Failures Robot) |
Assignee | ||
Comment 19•8 years ago
|
||
Assignee | ||
Comment 20•8 years ago
|
||
Assignee | ||
Updated•8 years ago
|
Attachment #8920921 -
Flags: review?(amarchesini)
Assignee | ||
Updated•8 years ago
|
Attachment #8920922 -
Flags: review?(amarchesini)
Updated•8 years ago
|
Attachment #8920922 -
Flags: review?(amarchesini) → review+
Comment 21•8 years ago
|
||
Comment on attachment 8920921 [details] [diff] [review]
Add debug info when EventSource set http request header failed.
Review of attachment 8920921 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/base/EventSource.cpp
@@ +969,2 @@
> }
> + nsAutoCString eventId = NS_ConvertUTF16toUTF8(mLastEventID);
NS_ConvertUTF16toUTF8 eventId(mlastEventID);
@@ +971,5 @@
> + rv = mHttpChannel->SetRequestHeader(NS_LITERAL_CSTRING("Last-Event-ID"),
> + eventId, false);
> +#ifdef DEBUG
> + if (NS_FAILED(rv)) {
> + MOZ_CRASH_UNSAFE_PRINTF("SetupHttpChannel. rv=%x (%s)", uint32_t(rv),
Why this crash?
Attachment #8920921 -
Flags: review?(amarchesini) → review-
Assignee | ||
Comment 22•8 years ago
|
||
(In reply to Andrea Marchesini [:baku] from comment #21)
> @@ +971,5 @@
> > + rv = mHttpChannel->SetRequestHeader(NS_LITERAL_CSTRING("Last-Event-ID"),
> > + eventId, false);
> > +#ifdef DEBUG
> > + if (NS_FAILED(rv)) {
> > + MOZ_CRASH_UNSAFE_PRINTF("SetupHttpChannel. rv=%x (%s)", uint32_t(rv),
>
> Why this crash?
Just want to easily aware of the failure of setting an invalid http request header on the debug build. It's okay to me to only output some messages.
Assignee | ||
Comment 23•8 years ago
|
||
Attachment #8920921 -
Attachment is obsolete: true
Assignee | ||
Updated•8 years ago
|
Attachment #8920989 -
Flags: review?(amarchesini)
Comment 24•8 years ago
|
||
Comment on attachment 8920989 [details] [diff] [review]
Add debug info when EventSource set http request header failed.
Review of attachment 8920989 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/base/EventSource.cpp
@@ +971,5 @@
> + rv = mHttpChannel->SetRequestHeader(NS_LITERAL_CSTRING("Last-Event-ID"),
> + eventId, false);
> +#ifdef DEBUG
> + if (NS_FAILED(rv)) {
> + printf_stderr("SetupHttpChannel. rv=%x (%s)", uint32_t(rv), eventId.get());
You should use MOZ_LOG here.
Attachment #8920989 -
Flags: review?(amarchesini) → review-
Assignee | ||
Comment 25•8 years ago
|
||
Attachment #8920989 -
Attachment is obsolete: true
Assignee | ||
Comment 26•8 years ago
|
||
Attachment #8921352 -
Attachment is obsolete: true
Assignee | ||
Updated•8 years ago
|
Attachment #8921354 -
Flags: review?(amarchesini)
Comment 27•8 years ago
|
||
Comment on attachment 8921354 [details] [diff] [review]
Add debug info when EventSource set http request header failed.
Review of attachment 8921354 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks!
Attachment #8921354 -
Flags: review?(amarchesini) → review+
Assignee | ||
Comment 28•8 years ago
|
||
Comment 29•8 years ago
|
||
Pushed by sshih@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f9b2e32292a1
Part1: Add debug info when EventSource set http request header failed. r=baku.
https://hg.mozilla.org/integration/mozilla-inbound/rev/c9f228c158d7
Part2: Handle null id of the message for EventSource. r=baku.
![]() |
||
Comment 30•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f9b2e32292a1
https://hg.mozilla.org/mozilla-central/rev/c9f228c158d7
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox58:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Updated•8 years ago
|
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
You need to log in
before you can comment on or make changes to this bug.
Description
•