avoid racing calls to launch RDD process from multiple media playback threads
Categories
(Core :: Audio/Video: Playback, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: mjf, Assigned: mjf)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
I've seen this specifically when enabling vorbis decoding on RDD for Windows and running mochitest toolkit/content/tests. The watchdog crashes the process after we hang in RemoteDecoderManagerParent::ShutdownThreads[1]. The hang occurs because we have a RemoteDecoderManagerParent in the RDD process that will never be destroyed because it has no associated RemoteDecoderManagerChild and never gets the ActorDestroy call.
The race happens when the two media play back threads call RemoteDecoderModule::LaunchRDDProcessIfNeeded[2] at the same time. This results in a RemoteDecoderManagerChild in the content process pointing to the first RemoteDecoderManagerParent (created here[3]). The second time this code is called another RemoteDecoderManagerParent is created, but the eventual call to RemoteDecoderManagerChild::OpenForRDDProcess is basically ignored because we already have a functional RemoteDecoderManagerChild/Parent pair seen here[4].
Note, I found this during testing to enable Vorbis on RDD for Windows, but it could happen in other cases.
[1] https://searchfox.org/mozilla-central/source/dom/media/ipc/RemoteDecoderManagerParent.cpp#137-139
[2] https://searchfox.org/mozilla-central/source/dom/media/ipc/RemoteDecoderModule.cpp#60
[3] https://searchfox.org/mozilla-central/source/dom/ipc/ContentChild.cpp#1224
[4] https://searchfox.org/mozilla-central/source/dom/media/ipc/RemoteDecoderManagerChild.cpp#168-169
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 1•6 years ago
|
||
This stops a potential race when multiple media playback threads attempt to
launch the RDD process and setup the IPC connections between
RemoteDecoderManager{Child|Parent} at the same time.
Updated•6 years ago
|
Comment 2•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 3•6 years ago
|
||
(In reply to Release mgmt bot [:sylvestre / :calixte / :marco for bugbug] from comment #2)
Bugbug thinks this bug is a task, but please change it back in case of error.
This patch fixes a perma-orange when enabling vorbis decoding on RDD for Windows. It is a defect that is rare in the wild, but more common on try in certain situations (audio decoding), and very repeatable for vorbis/RDD/Win.
Comment 5•6 years ago
|
||
bugherder |
Description
•