Closed Bug 1620614 Opened 4 years ago Closed 3 years ago

Crash in [@ IPCError-browser | ShutDownKill | mozilla::dom::XMLHttpRequestMainThread::SendInternal]

Categories

(Core :: DOM: Core & HTML, defect, P3)

Unspecified
Windows 7
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: mccr8, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: crash, good-first-bug)

Crash Data

This bug is for crash report bp-9fbefcb1-6e62-4da0-9169-503370200306.

Top 10 frames of crashing thread:

0 ntdll.dll ZwWaitForKeyedEvent 
1 ntdll.dll RtlSleepConditionVariableSRW 
2 kernel32.dll SleepConditionVariableSRW 
3 mozglue.dll mozilla::detail::ConditionVariableImpl::wait mozglue/misc/ConditionVariable_windows.cpp:50
4 xul.dll mozilla::ThreadEventQueue<mozilla::PrioritizedEventQueue>::GetEvent xpcom/threads/ThreadEventQueue.cpp:208
5 xul.dll nsThread::ProcessNextEvent xpcom/threads/nsThread.cpp:1140
6 xul.dll NS_ProcessNextEvent xpcom/threads/nsThreadUtils.cpp:481
7 xul.dll mozilla::dom::XMLHttpRequestMainThread::SendInternal dom/xhr/XMLHttpRequestMainThread.cpp:2956
8 xul.dll mozilla::dom::XMLHttpRequestMainThread::Send dom/xhr/XMLHttpRequestMainThread.cpp
9 xul.dll mozilla::dom::XMLHttpRequest_Binding::send dom/bindings/XMLHttpRequestBinding.cpp:1303

It looks like we're spinning the event loop while waiting for a reply to a sync XHR, and this goes on for so long that we're still in the middle of it when we get a shutdown message from the parent, so we don't actually shut down. Is there some way we could cancel the sync XHR when we get the shutdown message?

We should probably check for some kind of "shutting down" flag in:
https://searchfox.org/mozilla-central/rev/557a0e222dd104c5d805ba344c45d6abc27d3db0/dom/xhr/XMLHttpRequestMainThread.cpp#2956

Do we already have a libxul-wide flag that gets set as soon as we have committed to shutting down?

Flags: needinfo?(continuation)
Priority: -- → P3

Not that I'm aware of, but that does sound like a good idea. You'd have to listen for content-child-will-shutdown in the child processes, and something else in the parent.

Flags: needinfo?(continuation)

An alternative would be to write something that pokes at ContentChild in the child and gets the shutdown flag there. Maybe there's something equivalent in ContentParent that could be done there.

Thanks. Hopefully we aren't doing sync XHR from the parent, so checking ContentChild::IsShuttingDown() should be enough.

Keywords: good-first-bug

Closing because no crashes reported for 12 weeks.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.