Assertion failure on appear.in call with media.navigator.mediadatadecoder_h264_enabled set true

RESOLVED FIXED in Firefox 64

Status

()

defect
P3
normal
RESOLVED FIXED
7 months ago
7 months ago

People

(Reporter: dminor, Assigned: jya)

Tracking

63 Branch
mozilla64
x86_64
Linux
Points:
---

Firefox Tracking Flags

(firefox64 fixed)

Details

Attachments

(1 attachment)

Reporter

Description

7 months ago
This occurred while joining an appear.in call. A participant using Safari from a macbook was already present in the call.

Assertion failure: IsAtomic<bool>::value || NS_IsMainThread() (Non-atomic static pref 'media.ffmpeg.low-latency.enabled' being accessed on background thread), at /home/dminor/src/firefox/obj-x86_64-pc-linux-gnu/dist/include/mozilla/StaticPrefList.h:1121
#01: ???[/home/dminor/src/firefox/obj-x86_64-pc-linux-gnu/dist/bin/libxul.so +0x3790ba2]
#02: ???[/home/dminor/src/firefox/obj-x86_64-pc-linux-gnu/dist/bin/libxul.so +0x3746777]
#03: ???[/home/dminor/src/firefox/obj-x86_64-pc-linux-gnu/dist/bin/libxul.so +0x37476e8]
#04: ???[/home/dminor/src/firefox/obj-x86_64-pc-linux-gnu/dist/bin/libxul.so +0x374c8d6]
#05: ???[/home/dminor/src/firefox/obj-x86_64-pc-linux-gnu/dist/bin/libxul.so +0x1765ea2]
#06: ???[/home/dminor/src/firefox/obj-x86_64-pc-linux-gnu/dist/bin/libxul.so +0x176fb7d]
#07: ???[/home/dminor/src/firefox/obj-x86_64-pc-linux-gnu/dist/bin/libxul.so +0x176fc27]
#08: ???[/home/dminor/src/firefox/obj-x86_64-pc-linux-gnu/dist/bin/libxul.so +0x176caec]
#09: ???[/home/dminor/src/firefox/obj-x86_64-pc-linux-gnu/dist/bin/libxul.so +0x176e40c]
#10: ???[/home/dminor/src/firefox/obj-x86_64-pc-linux-gnu/dist/bin/libxul.so +0x1cb0701]
#11: ???[/home/dminor/src/firefox/obj-x86_64-pc-linux-gnu/dist/bin/libxul.so +0x1c55209]
#12: ???[/home/dminor/src/firefox/obj-x86_64-pc-linux-gnu/dist/bin/libxul.so +0x176acbf]
#13: ???[/home/dminor/src/firefox/obj-x86_64-pc-linux-gnu/dist/bin/libnspr4.so +0x29fb5]
#14: ???[/lib/x86_64-linux-gnu/libpthread.so.0 +0x76db]
#15: clone[/lib/x86_64-linux-gnu/libc.so.6 +0x12188f]
#16: ??? (???:???)

Thread 114 "MediaPD~oder #4" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffb3d7e700 (LWP 10424)]
0x00007fffe5a8be9b in mozilla::StaticPrefs::MediaFfmpegLowLatencyEnabled () at /home/dminor/src/firefox/obj-x86_64-pc-linux-gnu/dist/include/mozilla/StaticPrefList.h:1117
1117	VARCACHE_PREF(
(gdb) bt
#0  0x00007fffe5a8be9b in mozilla::StaticPrefs::MediaFfmpegLowLatencyEnabled() ()
    at /home/dminor/src/firefox/obj-x86_64-pc-linux-gnu/dist/include/mozilla/StaticPrefList.h:1117
#1  0x00007fffe7a69ba2 in mozilla::FFmpegDecoderModule<57>::CreateVideoDecoder(mozilla::CreateDecoderParams const&) (this=0x7fffb5210380, aParams=...)
    at /home/dminor/src/firefox/dom/media/platforms/ffmpeg/FFmpegDecoderModule.h:45
#2  0x00007fffe7a1f777 in mozilla::H264Converter::CreateDecoder(mozilla::VideoInfo const&, mozilla::DecoderDoctorDiagnostics*) (this=0x7fffa87d5400, aConfig=..., aDiagnostics=<optimized out>) at /home/dminor/src/firefox/dom/media/platforms/wrappers/H264Converter.cpp:310
#3  0x00007fffe7a206e8 in mozilla::H264Converter::CreateDecoderAndInit(mozilla::MediaRawData*) (this=0x7fffa87d5400, aSample=0x7fffa8602100)
    at /home/dminor/src/firefox/dom/media/platforms/wrappers/H264Converter.cpp:359
#4  0x00007fffe7a258d6 in mozilla::H264Converter::Decode(mozilla::MediaRawData*)::$_24::operator()() const (this=<optimized out>)
    at /home/dminor/src/firefox/dom/media/platforms/wrappers/H264Converter.cpp:100
#5  0x00007fffe7a258d6 in mozilla::detail::ProxyFunctionRunnable<mozilla::H264Converter::Decode(mozilla::MediaRawData*)::$_24(mozilla::MozPromise<nsTArray<RefPtr<mozilla::MediaData> >, mozilla::MediaResult, true>)>::Run() (this=0x7fffa8631140) at /home/dminor/src/firefox/obj-x86_64-pc-linux-gnu/dist/include/mozilla/MozPromise.h:1517
#6  0x00007fffe5a3eea2 in mozilla::TaskQueue::Runner::Run() (this=0x7fffa86586d0) at /home/dminor/src/firefox/xpcom/threads/TaskQueue.cpp:235
#7  0x00007fffe5a48b7d in nsThreadPool::Run() (this=0x7fffb40c3670) at /home/dminor/src/firefox/xpcom/threads/nsThreadPool.cpp:242
#8  0x00007fffe5a48c27 in non-virtual thunk to nsThreadPool::Run() () at /home/dminor/src/firefox/obj-x86_64-pc-linux-gnu/dist/include/mozilla/SynchronizedEventQueue.h:37
#9  0x00007fffe5a45aec in nsThread::ProcessNextEvent(bool, bool*) (this=0x7fffb3fcb920, aMayWait=<optimized out>, aResult=0x7fffb3d7dd9f)
    at /home/dminor/src/firefox/xpcom/threads/nsThread.cpp:1231
#10 0x00007fffe5a4740c in NS_ProcessNextEvent(nsIThread*, bool) (aThread=0x7ffff7069680 <_IO_2_1_stderr_>, aMayWait=false)
    at /home/dminor/src/firefox/xpcom/threads/nsThreadUtils.cpp:530
#11 0x00007fffe5f89701 in mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) (this=0x7fffb3eeacc0, aDelegate=0x7fffb3f83e40)
    at /home/dminor/src/firefox/ipc/glue/MessagePump.cpp:334
#12 0x00007fffe5f2e209 in MessageLoop::RunHandler() (this=0x7fffb3f83e40) at /home/dminor/src/firefox/ipc/chromium/src/base/message_loop.cc:318
#13 0x00007fffe5f2e209 in MessageLoop::Run() (this=0x7fffb3f83e40) at /home/dminor/src/firefox/ipc/chromium/src/base/message_loop.cc:298
#14 0x00007fffe5a43cbf in nsThread::ThreadFunc(void*) (aArg=<optimized out>) at /home/dminor/src/firefox/xpcom/threads/nsThread.cpp:502
#15 0x00007ffff7fb6fb5 in _pt_root (arg=0x7fffb3ed83a0) at /home/dminor/src/firefox/nsprpub/pr/src/pthreads/ptthread.c:201
#16 0x00007ffff7bbd6db in start_thread (arg=0x7fffb3d7e700) at pthread_create.c:463
#17 0x00007ffff6d9e88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Reporter

Comment 1

7 months ago
15:13 < jya> dminor: change that line 
15:13 < jya> https://searchfox.org/mozilla-central/source/modules/libpref/init/StaticPrefList.h#1120
15:14 < jya> from bool to RelaxedAtomicBool

Resulted in a working call (using openh264, since ffmpeg support is not done yet)
Sounds like this is related to some functionality that isn't finalized and is preffed off? P3 as it sounds like this won't bite general users. Please adjust if I'm mistaken.
Priority: -- → P3
Assignee

Comment 4

7 months ago
glad to hear that the OpenH264 GMP is still working using the MediaDataDecoder interface.

If you had set that preference to true, it should have used the local ffmpeg instead. Interested to hear on how that works for you.
Assignee

Updated

7 months ago
Assignee: nobody → jyavenard
Reporter

Comment 5

7 months ago
(In reply to Jean-Yves Avenard [:jya] from comment #4)
> glad to hear that the OpenH264 GMP is still working using the
> MediaDataDecoder interface.
> 
> If you had set that preference to true, it should have used the local ffmpeg
> instead. Interested to hear on how that works for you.

I think I misunderstood you on irc yesterday. I set both:
media.navigator.mediadatadecoder_enabled
media.navigator.mediadatadecoder_h264_enabled

to true. I didn't get video from Safari, so I assumed it was still using openh264. It sounds like instead it might have been trying ffmpeg and not succeeding. I'll have another look.

Comment 6

7 months ago
Pushed by jyavenard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/07b8305bb7d4
Allow pref to be read of the main thread. r=dminor

Comment 7

7 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/07b8305bb7d4
Status: NEW → RESOLVED
Last Resolved: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.