Crash in EnsureNextIteration() from SourceMediaTrack::AppendData() due to race with MediaTrackGraphShutDownRunnable
Categories
(Core :: Audio/Video: MediaStreamGraph, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr68 | --- | unaffected |
firefox73 | --- | disabled |
firefox74 | --- | disabled |
firefox75 | --- | disabled |
People
(Reporter: karlt, Assigned: karlt)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
This was caught with ./mach mochitest --keep-open=false --debugger=rr dom/media/tests/mochitest/test_getUserMedia_audioCapture.html
https://pernos.co/debug/TBL9mENXKG17AXYB84fcLA/index.html
I did have some patches for bug 1596655 applied, but I'm not aware of contributing effects from them.
Graph shutdown is apparently triggered on "xpcom-will-shutdown", which leads to clearing of mDriver on the main thread.
SourceMediaTrack::AppendData(), called on the MediaDecoderStateMachine
thread, acquires the track mutex and checks for GraphImpl() as well as mUpdateTrack->mEnded
.
It then acquires the graph mutex and calls graph->EnsureNextIteration()
, which crashes on null mDriver
.
Assignee | ||
Comment 1•4 years ago
|
||
This is probably triggered by https://hg.mozilla.org/integration/autoland/rev/2523464caf47#l4.36
because previously mGraphDriverAsleep
would have been false when the graph driver handed control from graph thread to main thread.
It doesn't affect release builds because their content processes don't go through XPCOM shutdown.
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
I first looked into calling End()
from SourceMediaTrack::NotifyForcedShutdown()
, but I don't know that we can rule out a new SourceMediaTrack
being added after those calls.
Assignee | ||
Comment 3•4 years ago
|
||
The driver can be safely checked and used with the monitor held, because the
driver is changed only while the monitor is held.
Comment hidden (typo) |
Assignee | ||
Comment 5•4 years ago
•
|
||
Pushed by ktomlinson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fccd2c39ce30 don't EnsureNextIteration() in AppendData() after forced shutdown r=padenot
Comment 7•4 years ago
|
||
bugherder |
Description
•