nsDOMDataChannel::Send can hang content processes
Categories
(Core :: WebRTC: Networking, defect, P3)
Tracking
()
People
(Reporter: florian, Unassigned)
References
Details
Here's a profile where nsDOMDataChannel::Send blocked the main thread of a content process for 251s (which is probably the time it took me to capture the profile after the process stopped responding) https://perfht.ml/2UsHp21
I had to kill the content process.
This happened while watching a video on https://www.6play.fr/, on a Windows machine on Firefox release. I had seen a similar hang twice on my nightly on Mac while watching a video on https://www.france.tv/france-2/
I don't know why these video playing websites need a datachannel.
The stack visible in the profile is:
SleepConditionVariableCS
sctp_os_timer_stop(sctp_callout*)
sctp_chunk_output(sctp_inpcb*, sctp_tcb*, int, int)
sctp_lower_sosend(socket*, sockaddr*, uio*, mbuf*, mbuf*, int, sctp_sndrcvinfo*)
usrsctp_sendv(socket*, void const*, unsigned long long, sockaddr*, int, void*, int, unsigned int, int)
mozilla::DataChannelConnection::SendMsgInternal(mozilla::OutgoingMsg&, unsigned long long*)
mozilla::DataChannelConnection::SendMsgInternalOrBuffer(nsTArray<nsAutoPtr<mozilla::BufferedOutgoingMsg> >&, mozilla::OutgoingMsg&, bool&, unsigned long long*)
mozilla::DataChannelConnection::SendDataMsgInternalOrBuffer(mozilla::DataChannel&, unsigned char const*, unsigned long long, unsigned int)
mozilla::DataChannelConnection::SendDataMsgCommon(unsigned short, nsTSubstring<char> const&, bool)
mozilla::DataChannel::SendBinaryMsg(nsTSubstring<char> const&, mozilla::ErrorResult&)
nsDOMDataChannel::Send(mozilla::dom::TypedArray<unsigned char,&JS::UnwrapArrayBufferMaybeShared,&JS::GetArrayBufferMaybeSharedData,&JS::GetArrayBufferMaybeSharedLengthAndData,&JS::NewArrayBuffer> const&, mozilla::ErrorResult&)
mozilla::dom::RTCDataChannel_Binding::send(JSContext*, JS::Handle<JSObject *>, void*, JSJitMethodCallArgs const&)
0x1dbabac65f6
js::RunScript
EventHandlerNonNull
EventDispatcher::Dispatch
Worker runnable
XRE_InitChildProcess
(root)
Comment 1•6 years ago
|
||
There is what looks to be a deadlock in sctp we're looking at in Bug 1620871. There is also a deadlock under investigation upstream, see Bug 1613889. I'm not familiar enough with the sctp code to say whether these are all the same problem or not.
Updated•6 years ago
|
Comment 2•6 years ago
|
||
This is the stack from here: https://bugzilla.mozilla.org/show_bug.cgi?id=1620871#c36
Any idea what might be happening here?
Comment 3•6 years ago
|
||
This looks weird. Any ideas, Michael?
Comment 4•6 years ago
|
||
There was a use-after free bug related to the timer code. This was reported by Mozilla. Peter provided a fix for it and the corresponding crash was gone, as reported by Mozilla. However, Google reported, that the fix introduced a deadlock. This is being worked on in https://github.com/sctplab/usrsctp/pull/417. So I guess that this is just an incarnation of the deadlock Google was finding...
Is there a way to reproduce this issue?
Comment 5•6 years ago
|
||
I haven't encountered this in more than a year and it potentially depends on how the data channels are being used. Perhaps the reporter knows of a way to reproduce.
| Reporter | ||
Comment 6•6 years ago
|
||
(In reply to Lennart Grahl [:lgrahl] from comment #5)
I haven't encountered this in more than a year and it potentially depends on how the data channels are being used. Perhaps the reporter knows of a way to reproduce.
I don't know anything more than: "This happened while watching a video on https://www.6play.fr/, on a Windows machine on Firefox release. I had seen a similar hang twice on my nightly on Mac while watching a video on https://www.france.tv/france-2/", sorry.
| Reporter | ||
Comment 7•6 years ago
|
||
I saw this content process hang again yesterday on a Nightly from June 5th, on OS X: https://share.firefox.dev/37YxRlr
Updated•1 year ago
|
Description
•