Crash in [@ nsThread::Shutdown] for "MediaTrackGrph" thread
Categories
(Core :: Audio/Video: MediaStreamGraph, defect, P3)
Tracking
()
People
(Reporter: jstutte, Unassigned)
References
Details
(Keywords: crash)
Crash Data
Attachments
(2 files)
Crash report: https://crash-stats.mozilla.org/report/index/2ed3cff3-16aa-43a2-a59f-c65160211123
Reason: EXCEPTION_STACK_OVERFLOW
Top 1 frames of crashing thread:
0 xul.dll nsThread::Shutdown xpcom/threads/nsThread.cpp:860
This seems to be caused by repeated shutdown requests that cause a deep stack of SpinEventLoopUntil
, as visible from the XPCOMSpinEventLoopStack
annotation on the report.
We might want to check where we dispatch MediaTrackGraphShutdownThreadRunnable
s ?
Reporter | ||
Comment 1•3 years ago
|
||
I see crashes like this only since a few days.
Comment 2•3 years ago
|
||
Reports seem to have started on Nov 17. The only change I see in dom/media that could be related is bug 1740827. We have had similar cases of this in the past where silence gaps in an audio stream led to flip-flopping between channel counts which led to a new audio driver for each flip and each flop. And a new audio driver leads to a new fallback system driver, which creates a MediaTrackGrph thread.
I am contemplating backing that out just to see if it has an effect on these reports, and re-land if it doesn't.
Updated•3 years ago
|
Comment 3•3 years ago
|
||
Audio drivers created at a very high rate have been observed on Nightly and
correlate time-wise to this commit (Bug 1740827) landing. We back it out
tentatively to see whether it has an effect on said reports.
Comment 5•3 years ago
|
||
bugherder |
Comment 6•3 years ago
|
||
Hmm, I do see a linux crash report with a 2021-11-14 build id. That suggests bug 1740827 is not the cause of this. I'll let some more time pass before drawing final conclusions.
It's also the only report on linux, so maybe something is latent and bug 1740827 triggered something to make it worse.
Judging on the extensions enabled that linux report is from a Mozilla dev in France... And with "fx-profiler-audio-cb".., Paul could this be you? :-D
If so, any clue what you did? Any particular HW that might be able to repro?
Comment 7•3 years ago
|
||
There is no GraphRunner thread in that report, which seems weird. The windows reports I have sampled have that.
Reporter | ||
Comment 8•3 years ago
|
||
(In reply to Andreas Pehrson [:pehrsons] from comment #7)
There is no GraphRunner thread in that report, which seems weird. The windows reports I have sampled have that.
You might see a case of bug 1741131 or better bug 1742836.
Comment 9•3 years ago
|
||
(In reply to Jens Stutte [:jstutte] from comment #8)
(In reply to Andreas Pehrson [:pehrsons] from comment #7)
There is no GraphRunner thread in that report, which seems weird. The windows reports I have sampled have that.
You might see a case of bug 1741131 or better bug 1742836.
I'm not sure I understand them correctly, but if we're talking GraphRunner; that thread is just an indicator to whether the thing spawning all the MediaTrackGrph threads is alive.
Reporter | ||
Comment 10•3 years ago
|
||
Bug 1741131 discovered we may see in some cases an annotation from the parent process on the report of a child process. That could explain why you see no other signs of MediaTrackGrph in the stack traces of the threads. This would mean that the parent process was executing the SpinEventLoopUntil
in question and while doing so the child process has been killed (for whatever reason and in whatever state it was).
Comment 11•3 years ago
|
||
(In reply to Andreas Pehrson [:pehrsons] from comment #6)
Judging on the extensions enabled that linux report is from a Mozilla dev in France... And with "fx-profiler-audio-cb".., Paul could this be you? :-D
If so, any clue what you did? Any particular HW that might be able to repro?
It's clearly my Mozilla workstation. I'm using a USB DAC and a C920 as the mic. Sometimes the USB DAC somehow disappears (might just be a short circuit in the cable or something). I wouldn't trust my own setup too much, I have way too much weirdness in my audio setup.
Comment 12•3 years ago
|
||
Still happening on a Nov 29 build: https://crash-stats.mozilla.org/report/index/fdb1d525-2bcf-494c-b846-862b50211130
Comment 13•3 years ago
|
||
Comment 14•3 years ago
|
||
Comment 15•3 years ago
|
||
bugherder |
Comment 17•3 years ago
|
||
I won't have time to look into this anytime soon. And looking at the crash rate, impact seems generally low.
Comment 18•3 years ago
|
||
Closing because no crashes reported for 12 weeks.
Updated•3 years ago
|
Description
•