Closed Bug 1724106 Opened 3 years ago Closed 2 years ago

Media debug data APIs are not thread safe when getting data

Categories

(Core :: Audio/Video: Playback, defect, P2)

defect

Tracking

()

RESOLVED FIXED
100 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox-esr91 --- unaffected
firefox90 --- unaffected
firefox91 --- unaffected
firefox92 --- wontfix
firefox93 --- wontfix
firefox94 --- wontfix
firefox99 --- wontfix
firefox100 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: bryce)

References

(Regression)

Details

(Keywords: intermittent-failure, regression)

Attachments

(3 files)

Filed by: smolnar [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=347443082&repo=autoland
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/cPZqZReGTR6w8TXZ9CQdZA/runs/0/artifacts/public/logs/live_backing.log


INFO - TEST-START | dom/media/test/test_cloneElementVisually_no_suspend.html
[task 2021-08-04T22:53:00.643Z] 22:53:00     INFO - GECKO(2619) | ==================
[task 2021-08-04T22:53:00.644Z] 22:53:00     INFO - GECKO(2619) | WARNING: ThreadSanitizer: data race (pid=2708)
[task 2021-08-04T22:53:00.645Z] 22:53:00     INFO - GECKO(2619) |   Read of size 4 at 0x7b7800136de8 by main thread:
[task 2021-08-04T22:53:00.645Z] 22:53:00     INFO - GECKO(2619) |     #0 Mean /builds/worker/checkouts/gecko/dom/media/MediaFormatReader.h:592:35 (libxul.so+0x3da407a)
[task 2021-08-04T22:53:00.650Z] 22:53:00     INFO - GECKO(2619) |     #1 mozilla::MediaFormatReader::GetDebugInfo(mozilla::dom::MediaFormatReaderDebugInfo&) /builds/worker/checkouts/gecko/dom/media/MediaFormatReader.cpp:3072:39 (libxul.so+0x3da407a)
[task 2021-08-04T22:53:00.651Z] 22:53:00     INFO - GECKO(2619) |     #2 mozilla::MediaDecoder::GetDebugInfo(mozilla::dom::MediaDecoderDebugInfo&) /builds/worker/checkouts/gecko/dom/media/MediaDecoder.cpp:1371:12 (libxul.so+0x3da365e)
[task 2021-08-04T22:53:00.651Z] 22:53:00     INFO - GECKO(2619) |     #3 mozilla::MediaDecoder::RequestDebugInfo(mozilla::dom::MediaDecoderDebugInfo&) /builds/worker/checkouts/gecko/dom/media/MediaDecoder.cpp:1377:3 (libxul.so+0x3da47ef)
[task 2021-08-04T22:53:00.653Z] 22:53:00     INFO - GECKO(2619) |     #4 mozilla::dom::HTMLMediaElement::MozRequestDebugInfo(mozilla::ErrorResult&) /builds/worker/checkouts/gecko/dom/html/HTMLMediaElement.cpp:2036:15 (libxul.so+0x3c40daa)
[task 2021-08-04T22:53:00.653Z] 22:53:00     INFO - GECKO(2619) |     #5 mozRequestDebugInfo /builds/worker/workspace/obj-build/dom/bindings/HTMLMediaElementBinding.cpp:1898:60 (libxul.so+0x35bcedc)
<...>
 INFO - GECKO(2619) |     #24 RunHandler /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:324:3 (libxul.so+0x15287cc)
[task 2021-08-04T22:53:00.799Z] 22:53:00     INFO - GECKO(2619) |     #25 MessageLoop::Run() /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:306:3 (libxul.so+0x15287cc)
[task 2021-08-04T22:53:00.799Z] 22:53:00     INFO - GECKO(2619) |     #26 nsBaseAppShell::Run() /builds/worker/checkouts/gecko/widget/nsBaseAppShell.cpp:137:27 (libxul.so+0x4cc1076)
[task 2021-08-04T22:53:00.799Z] 22:53:00     INFO - GECKO(2619) |     #27 XRE_RunAppShell() /builds/worker/checkouts/gecko/toolkit/xre/nsEmbedFunctions.cpp:923:20 (libxul.so+0x6b2dbc9)
[task 2021-08-04T22:53:00.799Z] 22:53:00     INFO - GECKO(2619) |     #28 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/checkouts/gecko/ipc/glue/MessagePump.cpp:235:9 (libxul.so+0x15af28d)
[task 2021-08-04T22:53:00.800Z] 22:53:00     INFO - GECKO(2619) |     #29 RunInternal /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:331:10 (libxul.so+0x15287cc)
[task 2021-08-04T22:53:00.800Z] 22:53:00     INFO - GECKO(2619) |     #30 RunHandler /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:324:3 (libxul.so+0x15287cc)
[task 2021-08-04T22:53:00.800Z] 22:53:00     INFO - GECKO(2619) |     #31 MessageLoop::Run() /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:306:3 (libxul.so+0x15287cc)
[task 2021-08-04T22:53:00.801Z] 22:53:00     INFO - GECKO(2619) |     #32 XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/checkouts/gecko/toolkit/xre/nsEmbedFunctions.cpp:755:34 (libxul.so+0x6b2d949)
[task 2021-08-04T22:53:00.802Z] 22:53:00     INFO - GECKO(2619) |     #33 mozilla::BootstrapImpl::XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/checkouts/gecko/toolkit/xre/Bootstrap.cpp:67:12 (libxul.so+0x6b35962)
[task 2021-08-04T22:53:00.802Z] 22:53:00     INFO - GECKO(2619) |     #34 content_process_main /builds/worker/checkouts/gecko/browser/app/../../ipc/contentproc/plugin-container.cpp:57:28 (firefox+0xc9fd1)
[task 2021-08-04T22:53:00.802Z] 22:53:00     INFO - GECKO(2619) |     #35 main /builds/worker/checkouts/gecko/browser/app/nsBrowserApp.cpp:327:18 (firefox+0xc9fd1)
[task 2021-08-04T22:53:00.802Z] 22:53:00     INFO - GECKO(2619) | SUMMARY: ThreadSanitizer: data race /builds/worker/checkouts/gecko/dom/media/MediaFormatReader.h:592:35 in Mean
[task 2021-08-04T22:53:00.802Z] 22:53:00     INFO - GECKO(2619) | ==================
[task 2021-08-04T22:53:01.016Z] 22:53:01    ERROR - GECKO(2619) | A content process crashed and MOZ_CRASHREPORTER_SHUTDOWN is set, shutting down
[task 2021-08-04T22:53:01.445Z] 22:53:01     INFO - GECKO(2619) | 1628117581444	Marionette	TRACE	Received observer notification quit-application
[task 2021-08-04T22:53:01.446Z] 22:53:01     INFO - GECKO(2619) | 1628117581445	Marionette	INFO	Stopped listening on port 2828
[task 2021-08-04T22:53:01.448Z] 22:53:01     INFO - GECKO(2619) | 1628117581447	Marionette	DEBUG	Marionette stopped listening
[task 2021-08-04T22:53:01.720Z] 22:53:01     INFO - GECKO(2619) | ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
[task 2021-08-04T22:53:01.724Z] 22:53:01     INFO - GECKO(2619) | JavaScript error: resource:///modules/Interactions.jsm, line 230: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIUserIdleService.removeIdleObserver]
[task 2021-08-04T22:53:02.728Z] 22:53:02     INFO - GECKO(2619) | ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
[task 2021-08-04T22:53:06.933Z] 22:53:06     INFO - TEST-INFO | Main app process: exit 0
[task 2021-08-04T22:53:06.933Z] 22:53:06     INFO - runtests.py | Application ran for: 0:09:04.789955
[task 2021-08-04T22:53:06.934Z] 22:53:06     INFO - zombiecheck | Reading PID log: /tmp/tmp1k1ad5bcpidlog

Fixed by backout of bug 1721899.

Status: NEW → RESOLVED
Closed: 3 years ago
Keywords: regression
Regressed by: 1721899
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch

Hey bryce, I'm not sure what to make of this. It looks like there's some kind of data-race in HTMLMediaElement.mozRequestDebugInfo, which is thankfully a privileged-only API. At any rate, here's the salient stuff from the log:

[task 2021-08-04T22:53:00.644Z] 22:53:00     INFO - GECKO(2619) | WARNING: ThreadSanitizer: data race (pid=2708)
[task 2021-08-04T22:53:00.645Z] 22:53:00     INFO - GECKO(2619) |   Read of size 4 at 0x7b7800136de8 by main thread:
[task 2021-08-04T22:53:00.645Z] 22:53:00     INFO - GECKO(2619) |     #0 Mean /builds/worker/checkouts/gecko/dom/media/MediaFormatReader.h:592:35 (libxul.so+0x3da407a)
[task 2021-08-04T22:53:00.650Z] 22:53:00     INFO - GECKO(2619) |     #1 mozilla::MediaFormatReader::GetDebugInfo(mozilla::dom::MediaFormatReaderDebugInfo&) /builds/worker/checkouts/gecko/dom/media/MediaFormatReader.cpp:3072:39 (libxul.so+0x3da407a)
[task 2021-08-04T22:53:00.651Z] 22:53:00     INFO - GECKO(2619) |     #2 mozilla::MediaDecoder::GetDebugInfo(mozilla::dom::MediaDecoderDebugInfo&) /builds/worker/checkouts/gecko/dom/media/MediaDecoder.cpp:1371:12 (libxul.so+0x3da365e)
[task 2021-08-04T22:53:00.651Z] 22:53:00     INFO - GECKO(2619) |     #3 mozilla::MediaDecoder::RequestDebugInfo(mozilla::dom::MediaDecoderDebugInfo&) /builds/worker/checkouts/gecko/dom/media/MediaDecoder.cpp:1377:3 (libxul.so+0x3da47ef)
[task 2021-08-04T22:53:00.653Z] 22:53:00     INFO - GECKO(2619) |     #4 mozilla::dom::HTMLMediaElement::MozRequestDebugInfo(mozilla::ErrorResult&) /builds/worker/checkouts/gecko/dom/html/HTMLMediaElement.cpp:2036:15 (libxul.so+0x3c40daa)
[task 2021-08-04T22:53:00.653Z] 22:53:00     INFO - GECKO(2619) |     #5 mozRequestDebugInfo /builds/worker/workspace/obj-build/dom/bindings/HTMLMediaElementBinding.cpp:1898:60 (libxul.so+0x35bcedc)
[task 2021-08-04T22:53:00.653Z] 22:53:00     INFO - GECKO(2619) |     #6 mozilla::dom::HTMLMediaElement_Binding::mozRequestDebugInfo_promiseWrapper(JSContext*, JS::Handle<JSObject*>, void*, JSJitMethodCallArgs const&) /builds/worker/workspace/obj-build/dom/bindings/HTMLMediaElementBinding.cpp:1914:13 (libxul.so+0x35bcedc)
[task 2021-08-04T22:53:00.653Z] 22:53:00     INFO - GECKO(2619) |     #7 bool mozilla::dom::binding_detail::GenericMethod<mozilla::dom::binding_detail::NormalThisPolicy, mozilla::dom::binding_detail::ConvertExceptionsToPromises>(JSContext*, unsigned int, JS::Value*) /builds/worker/checkouts/gecko/dom/bindings/BindingUtils.cpp:3299:13 (libxul.so+0x3673e3e)
[task 2021-08-04T22:53:00.654Z] 22:53:00     INFO - GECKO(2619) |     #8 <null> <null> (0x7fe55f1cf9c1)
[task 2021-08-04T22:53:00.654Z] 22:53:00     INFO - GECKO(2619) |     #9 js::RunScript(JSContext*, js::RunState&) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:361:32 (libxul.so+0x6c4c6eb)
[task 2021-08-04T22:53:00.655Z] 22:53:00     INFO - GECKO(2619) |     #10 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:519:13 (libxul.so+0x6c638f1)
[task 2021-08-04T22:53:00.656Z] 22:53:00     INFO - GECKO(2619) |     #11 InternalCall /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:547:10 (libxul.so+0x6c641cf)
[task 2021-08-04T22:53:00.658Z] 22:53:00     INFO - GECKO(2619) |     #12 js::CallFromStack(JSContext*, JS::CallArgs const&) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:551:10 (libxul.so+0x6c641cf)
[task 2021-08-04T22:53:00.658Z] 22:53:00     INFO - GECKO(2619) |     #13 js::jit::DoCallFallback(JSContext*, js::jit::BaselineFrame*, js::jit::ICFallbackStub*, unsigned int, JS::Value*, JS::MutableHandle<JS::Value>) /builds/worker/checkouts/gecko/js/src/jit/BaselineIC.cpp:1606:10 (libxul.so+0x7443a22)
[task 2021-08-04T22:53:00.658Z] 22:53:00     INFO - GECKO(2619) |     #14 <null> <null> (0x7fe55f03ae48)
[task 2021-08-04T22:53:00.658Z] 22:53:00     INFO - GECKO(2619) |     #15 js::RunScript(JSContext*, js::RunState&) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:361:32 (libxul.so+0x6c4c6eb)
[task 2021-08-04T22:53:00.658Z] 22:53:00     INFO - GECKO(2619) |     #16 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:519:13 (libxul.so+0x6c638f1)
[task 2021-08-04T22:53:00.658Z] 22:53:00     INFO - GECKO(2619) |     #17 InternalCall /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:547:10 (libxul.so+0x6c64383)
[task 2021-08-04T22:53:00.658Z] 22:53:00     INFO - GECKO(2619) |     #18 js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:564:8 (libxul.so+0x6c64383)
[task 2021-08-04T22:53:00.660Z] 22:53:00     INFO - GECKO(2619) |     #19 JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) /builds/worker/checkouts/gecko/js/src/vm/CallAndConstruct.cpp:117:10 (libxul.so+0x6da2871)
[task 2021-08-04T22:53:00.661Z] 22:53:00     INFO - GECKO(2619) |     #20 xpc::FunctionForwarder(JSContext*, unsigned int, JS::Value*) /builds/worker/checkouts/gecko/js/xpconnect/src/ExportHelpers.cpp:382:12 (libxul.so+0x1b6488e)
[task 2021-08-04T22:53:00.662Z] 22:53:00     INFO - GECKO(2619) |     #21 CallJSNative /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:402:13 (libxul.so+0x6c63094)
[task 2021-08-04T22:53:00.666Z] 22:53:00     INFO - GECKO(2619) |     #22 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:487:12 (libxul.so+0x6c63094)
[task 2021-08-04T22:53:00.667Z] 22:53:00     INFO - GECKO(2619) |     #23 InternalCall /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:547:10 (libxul.so+0x6c64383)
[task 2021-08-04T22:53:00.669Z] 22:53:00     INFO - GECKO(2619) |     #24 js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:564:8 (libxul.so+0x6c64383)
[task 2021-08-04T22:53:00.670Z] 22:53:00     INFO - GECKO(2619) |     #25 js::ScriptedProxyHandler::call(JSContext*, JS::Handle<JSObject*>, JS::CallArgs const&) const /builds/worker/checkouts/gecko/js/src/proxy/ScriptedProxyHandler.cpp:1322:10 (libxul.so+0x6d599e6)
[task 2021-08-04T22:53:00.672Z] 22:53:00     INFO - GECKO(2619) |     #26 js::Proxy::call(JSContext*, JS::Handle<JSObject*>, JS::CallArgs const&) /builds/worker/checkouts/gecko/js/src/proxy/Proxy.cpp:656:19 (libxul.so+0x6d517cf)
[task 2021-08-04T22:53:00.673Z] 22:53:00     INFO - GECKO(2619) |     #27 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:467:14 (libxul.so+0x6c6363d)
[task 2021-08-04T22:53:00.675Z] 22:53:00     INFO - GECKO(2619) |     #28 InternalCall /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:547:10 (libxul.so+0x6c5a1c6)
[task 2021-08-04T22:53:00.677Z] 22:53:00     INFO - GECKO(2619) |     #29 CallFromStack /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:551:10 (libxul.so+0x6c5a1c6)
[task 2021-08-04T22:53:00.679Z] 22:53:00     INFO - GECKO(2619) |     #30 Interpret(JSContext*, js::RunState&) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:3240:16 (libxul.so+0x6c5a1c6)
[task 2021-08-04T22:53:00.680Z] 22:53:00     INFO - GECKO(2619) |     #31 js::RunScript(JSContext*, js::RunState&) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:371:13 (libxul.so+0x6c4c7b6)
[task 2021-08-04T22:53:00.683Z] 22:53:00     INFO - GECKO(2619) |     #32 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:519:13 (libxul.so+0x6c638f1)
[task 2021-08-04T22:53:00.683Z] 22:53:00     INFO - GECKO(2619) |     #33 InternalCall /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:547:10 (libxul.so+0x6c64383)
[task 2021-08-04T22:53:00.684Z] 22:53:00     INFO - GECKO(2619) |     #34 js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:564:8 (libxul.so+0x6c64383)
[task 2021-08-04T22:53:00.684Z] 22:53:00     INFO - GECKO(2619) |     #35 js::CallSelfHostedFunction(JSContext*, JS::Handle<js::PropertyName*>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>) /builds/worker/checkouts/gecko/js/src/vm/SelfHosting.cpp:1546:10 (libxul.so+0x6f824b0)
[task 2021-08-04T22:53:00.685Z] 22:53:00     INFO - GECKO(2619) |     #36 AsyncFunctionResume(JSContext*, JS::Handle<js::AsyncFunctionGeneratorObject*>, ResumeKind, JS::Handle<JS::Value>) /builds/worker/checkouts/gecko/js/src/vm/AsyncFunction.cpp:127:8 (libxul.so+0x6d7bec9)
[task 2021-08-04T22:53:00.685Z] 22:53:00     INFO - GECKO(2619) |     #37 js::AsyncFunctionAwaitedFulfilled(JSContext*, JS::Handle<js::AsyncFunctionGeneratorObject*>, JS::Handle<JS::Value>) /builds/worker/checkouts/gecko/js/src/vm/AsyncFunction.cpp:158:10 (libxul.so+0x6d7bc27)
[task 2021-08-04T22:53:00.686Z] 22:53:00     INFO - GECKO(2619) |     #38 AsyncFunctionPromiseReactionJob /builds/worker/checkouts/gecko/js/src/builtin/Promise.cpp:1700:12 (libxul.so+0x6e19eb5)
[task 2021-08-04T22:53:00.686Z] 22:53:00     INFO - GECKO(2619) |     #39 PromiseReactionJob(JSContext*, unsigned int, JS::Value*) /builds/worker/checkouts/gecko/js/src/builtin/Promise.cpp:1856:12 (libxul.so+0x6e19eb5)
[task 2021-08-04T22:53:00.687Z] 22:53:00     INFO - GECKO(2619) |     #40 CallJSNative /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:402:13 (libxul.so+0x6c63094)
[task 2021-08-04T22:53:00.687Z] 22:53:00     INFO - GECKO(2619) |     #41 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:487:12 (libxul.so+0x6c63094)
[task 2021-08-04T22:53:00.687Z] 22:53:00     INFO - GECKO(2619) |     #42 InternalCall /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:547:10 (libxul.so+0x6c64383)
[task 2021-08-04T22:53:00.688Z] 22:53:00     INFO - GECKO(2619) |     #43 js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:564:8 (libxul.so+0x6c64383)
[task 2021-08-04T22:53:00.689Z] 22:53:00     INFO - GECKO(2619) |     #44 JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) /builds/worker/checkouts/gecko/js/src/vm/CallAndConstruct.cpp:117:10 (libxul.so+0x6da2871)
[task 2021-08-04T22:53:00.689Z] 22:53:00     INFO - GECKO(2619) |     #45 mozilla::dom::PromiseJobCallback::Call(mozilla::dom::BindingCallContext&, JS::Handle<JS::Value>, mozilla::ErrorResult&) /builds/worker/workspace/obj-build/dom/bindings/PromiseBinding.cpp:34:8 (libxul.so+0x2c420fb)
[task 2021-08-04T22:53:00.689Z] 22:53:00     INFO - GECKO(2619) |     #46 Call /builds/worker/workspace/obj-build/dist/include/mozilla/dom/PromiseBinding.h:89:12 (libxul.so+0xba15de)
[task 2021-08-04T22:53:00.690Z] 22:53:00     INFO - GECKO(2619) |     #47 Call /builds/worker/workspace/obj-build/dist/include/mozilla/dom/PromiseBinding.h:102:12 (libxul.so+0xba15de)
[task 2021-08-04T22:53:00.690Z] 22:53:00     INFO - GECKO(2619) |     #48 mozilla::PromiseJobRunnable::Run(mozilla::AutoSlowOperation&) /builds/worker/checkouts/gecko/xpcom/base/CycleCollectedJSContext.cpp:212:18 (libxul.so+0xba15de)
[task 2021-08-04T22:53:00.690Z] 22:53:00     INFO - GECKO(2619) |     #49 mozilla::CycleCollectedJSContext::PerformMicroTaskCheckPoint(bool) /builds/worker/checkouts/gecko/xpcom/base/CycleCollectedJSContext.cpp:647:17 (libxul.so+0xb8df4a)
[task 2021-08-04T22:53:00.691Z] 22:53:00     INFO - GECKO(2619) |     #50 LeaveMicroTask /builds/worker/workspace/obj-build/dist/include/mozilla/CycleCollectedJSContext.h:233:7 (libxul.so+0x36841b8)
[task 2021-08-04T22:53:00.691Z] 22:53:00     INFO - GECKO(2619) |     #51 mozilla::dom::CallbackObject::CallSetup::~CallSetup() /builds/worker/checkouts/gecko/dom/bindings/CallbackObject.cpp:393:11 (libxul.so+0x36841b8)
[task 2021-08-04T22:53:00.692Z] 22:53:00     INFO - GECKO(2619) |     #52 void mozilla::dom::Function::Call<nsCOMPtr<nsIGlobalObject> >(nsCOMPtr<nsIGlobalObject> const&, nsTArray<JS::Value> const&, JS::MutableHandle<JS::Value>, mozilla::ErrorResult&, char const*, mozilla::dom::CallbackObject::ExceptionHandling, JS::Realm*) /builds/worker/workspace/obj-build/dist/include/mozilla/dom/FunctionBinding.h:72:3 (libxul.so+0x273f2e9)
[task 2021-08-04T22:53:00.693Z] 22:53:00     INFO - GECKO(2619) |     #53 mozilla::dom::CallbackTimeoutHandler::Call(char const*) /builds/worker/checkouts/gecko/dom/base/TimeoutHandler.cpp:167:29 (libxul.so+0x273f086)
[task 2021-08-04T22:53:00.693Z] 22:53:00     INFO - GECKO(2619) |     #54 nsGlobalWindowInner::RunTimeoutHandler(mozilla::dom::Timeout*, nsIScriptContext*) /builds/worker/checkouts/gecko/dom/base/nsGlobalWindowInner.cpp:6249:38 (libxul.so+0x2556c16)
[task 2021-08-04T22:53:00.694Z] 22:53:00     INFO - GECKO(2619) |     #55 mozilla::dom::TimeoutManager::RunTimeout(mozilla::TimeStamp const&, mozilla::TimeStamp const&, bool) /builds/worker/checkouts/gecko/dom/base/TimeoutManager.cpp:893:44 (libxul.so+0x273c87e)
[task 2021-08-04T22:53:00.694Z] 22:53:00     INFO - GECKO(2619) |     #56 mozilla::dom::TimeoutExecutor::MaybeExecute() /builds/worker/checkouts/gecko/dom/base/TimeoutExecutor.cpp:179:11 (libxul.so+0x273bd45)
[task 2021-08-04T22:53:00.694Z] 22:53:00     INFO - GECKO(2619) |     #57 Notify /builds/worker/checkouts/gecko/dom/base/TimeoutExecutor.cpp:246:5 (libxul.so+0x273d9e8)
[task 2021-08-04T22:53:00.695Z] 22:53:00     INFO - GECKO(2619) |     #58 non-virtual thunk to mozilla::dom::TimeoutExecutor::Notify(nsITimer*) /builds/worker/checkouts/gecko/dom/base/TimeoutExecutor.cpp (libxul.so+0x273d9e8)
[task 2021-08-04T22:53:00.696Z] 22:53:00     INFO - GECKO(2619) |     #59 operator() /builds/worker/checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:620:44 (libxul.so+0xcbd554)
[task 2021-08-04T22:53:00.697Z] 22:53:00     INFO - GECKO(2619) |     #60 matchN<mozilla::Variant<nsTimerImpl::UnknownCallback, nsCOMPtr<nsITimerCallback>, nsCOMPtr<nsIObserver>, nsTimerImpl::FuncCallback, nsTimerImpl::ClosureCallback> &, (lambda at /builds/worker/checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:620:7), (lambda at /builds/worker/checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:621:7), (lambda at /builds/worker/checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:624:7), (lambda at /builds/worker/checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:625:7)> /builds/worker/workspace/obj-build/dist/include/mozilla/Variant.h:309:16 (libxul.so+0xcbd554)
[task 2021-08-04T22:53:00.697Z] 22:53:00     INFO - GECKO(2619) |     #61 matchN<mozilla::Variant<nsTimerImpl::UnknownCallback, nsCOMPtr<nsITimerCallback>, nsCOMPtr<nsIObserver>, nsTimerImpl::FuncCallback, nsTimerImpl::ClosureCallback> &, (lambda at /builds/worker/checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:619:7), (lambda at /builds/worker/checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:620:7), (lambda at /builds/worker/checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:621:7), (lambda at /builds/worker/checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:624:7), (lambda at /builds/worker/checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:625:7)> /builds/worker/workspace/obj-build/dist/include/mozilla/Variant.h:318:14 (libxul.so+0xcbd554)
[task 2021-08-04T22:53:00.697Z] 22:53:00     INFO - GECKO(2619) |     #62 matchN<mozilla::Variant<nsTimerImpl::UnknownCallback, nsCOMPtr<nsITimerCallback>, nsCOMPtr<nsIObserver>, nsTimerImpl::FuncCallback, nsTimerImpl::ClosureCallback> &, (lambda at /builds/worker/checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:619:7), (lambda at /builds/worker/checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:620:7), (lambda at /builds/worker/checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:621:7), (lambda at /builds/worker/checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:624:7), (lambda at /builds/worker/checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:625:7)> /builds/worker/workspace/obj-build/dist/include/mozilla/Variant.h:902:12 (libxul.so+0xcbd554)
[task 2021-08-04T22:53:00.698Z] 22:53:00     INFO - GECKO(2619) |     #63 match<(lambda at /builds/worker/checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:619:7), (lambda at /builds/worker/checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:620:7), (lambda at /builds/worker/checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:621:7), (lambda at /builds/worker/checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:624:7), (lambda at /builds/worker/checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:625:7)> /builds/worker/workspace/obj-build/dist/include/mozilla/Variant.h:857:12 (libxul.so+0xcbd554)
[task 2021-08-04T22:53:00.698Z] 22:53:00     INFO - GECKO(2619) |     #64 nsTimerImpl::Fire(int) /builds/worker/checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:618:22 (libxul.so+0xcbd554)
[task 2021-08-04T22:53:00.699Z] 22:53:00     INFO - GECKO(2619) |     #65 nsTimerEvent::Run() /builds/worker/checkouts/gecko/xpcom/threads/TimerThread.cpp:248:11 (libxul.so+0xc90240)
[task 2021-08-04T22:53:00.699Z] 22:53:00     INFO - GECKO(2619) |     #66 mozilla::ThrottledEventQueue::Inner::ExecuteRunnable() /builds/worker/checkouts/gecko/xpcom/threads/ThrottledEventQueue.cpp:254:22 (libxul.so+0xcae854)
[task 2021-08-04T22:53:00.700Z] 22:53:00     INFO - GECKO(2619) |     #67 mozilla::ThrottledEventQueue::Inner::Executor::Run() /builds/worker/checkouts/gecko/xpcom/threads/ThrottledEventQueue.cpp:81:15 (libxul.so+0xca9fbf)
[task 2021-08-04T22:53:00.701Z] 22:53:00     INFO - GECKO(2619) |     #68 mozilla::RunnableTask::Run() /builds/worker/checkouts/gecko/xpcom/threads/TaskController.cpp:502:16 (libxul.so+0xcabae7)
[task 2021-08-04T22:53:00.702Z] 22:53:00     INFO - GECKO(2619) |     #69 mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /builds/worker/checkouts/gecko/xpcom/threads/TaskController.cpp:805:26 (libxul.so+0xc88af4)
[task 2021-08-04T22:53:00.702Z] 22:53:00     INFO - GECKO(2619) |     #70 mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /builds/worker/checkouts/gecko/xpcom/threads/TaskController.cpp:641:15 (libxul.so+0xc87126)
[task 2021-08-04T22:53:00.703Z] 22:53:00     INFO - GECKO(2619) |     #71 mozilla::TaskController::ProcessPendingMTTask(bool) /builds/worker/checkouts/gecko/xpcom/threads/TaskController.cpp:425:36 (libxul.so+0xc873f4)
[task 2021-08-04T22:53:00.703Z] 22:53:00     INFO - GECKO(2619) |     #72 operator() /builds/worker/checkouts/gecko/xpcom/threads/TaskController.cpp:135:37 (libxul.so+0xcaf9d7)
[task 2021-08-04T22:53:00.704Z] 22:53:00     INFO - GECKO(2619) |     #73 mozilla::detail::RunnableFunction<mozilla::TaskController::InitializeInternal()::$_0>::Run() /builds/worker/checkouts/gecko/xpcom/threads/nsThreadUtils.h:532:5 (libxul.so+0xcaf9d7)
[task 2021-08-04T22:53:00.705Z] 22:53:00     INFO - GECKO(2619) |     #74 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/checkouts/gecko/xpcom/threads/nsThread.cpp:1148:16 (libxul.so+0xc995b5)
[task 2021-08-04T22:53:00.706Z] 22:53:00     INFO - GECKO(2619) |     #75 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:466:10 (libxul.so+0xca0622)
[task 2021-08-04T22:53:00.707Z] 22:53:00     INFO - GECKO(2619) |     #76 mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /builds/worker/checkouts/gecko/ipc/glue/MessagePump.cpp:85:21 (libxul.so+0x15ae83d)
[task 2021-08-04T22:53:00.708Z] 22:53:00     INFO - GECKO(2619) |     #77 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/checkouts/gecko/ipc/glue/MessagePump.cpp:268:30 (libxul.so+0x15af2db)
[task 2021-08-04T22:53:00.710Z] 22:53:00     INFO - GECKO(2619) |     #78 RunInternal /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:331:10 (libxul.so+0x15287cc)
[task 2021-08-04T22:53:00.711Z] 22:53:00     INFO - GECKO(2619) |     #79 RunHandler /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:324:3 (libxul.so+0x15287cc)
[task 2021-08-04T22:53:00.719Z] 22:53:00     INFO - GECKO(2619) |     #80 MessageLoop::Run() /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:306:3 (libxul.so+0x15287cc)
[task 2021-08-04T22:53:00.720Z] 22:53:00     INFO - GECKO(2619) |     #81 nsBaseAppShell::Run() /builds/worker/checkouts/gecko/widget/nsBaseAppShell.cpp:137:27 (libxul.so+0x4cc1076)
[task 2021-08-04T22:53:00.721Z] 22:53:00     INFO - GECKO(2619) |     #82 XRE_RunAppShell() /builds/worker/checkouts/gecko/toolkit/xre/nsEmbedFunctions.cpp:923:20 (libxul.so+0x6b2dbc9)
[task 2021-08-04T22:53:00.722Z] 22:53:00     INFO - GECKO(2619) |     #83 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/checkouts/gecko/ipc/glue/MessagePump.cpp:235:9 (libxul.so+0x15af28d)
[task 2021-08-04T22:53:00.728Z] 22:53:00     INFO - GECKO(2619) |     #84 RunInternal /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:331:10 (libxul.so+0x15287cc)
[task 2021-08-04T22:53:00.734Z] 22:53:00     INFO - GECKO(2619) |     #85 RunHandler /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:324:3 (libxul.so+0x15287cc)
[task 2021-08-04T22:53:00.734Z] 22:53:00     INFO - GECKO(2619) |     #86 MessageLoop::Run() /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:306:3 (libxul.so+0x15287cc)
[task 2021-08-04T22:53:00.735Z] 22:53:00     INFO - GECKO(2619) |     #87 XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/checkouts/gecko/toolkit/xre/nsEmbedFunctions.cpp:755:34 (libxul.so+0x6b2d949)
[task 2021-08-04T22:53:00.735Z] 22:53:00     INFO - GECKO(2619) |     #88 mozilla::BootstrapImpl::XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/checkouts/gecko/toolkit/xre/Bootstrap.cpp:67:12 (libxul.so+0x6b35962)
[task 2021-08-04T22:53:00.736Z] 22:53:00     INFO - GECKO(2619) |     #89 content_process_main /builds/worker/checkouts/gecko/browser/app/../../ipc/contentproc/plugin-container.cpp:57:28 (firefox+0xc9fd1)
[task 2021-08-04T22:53:00.736Z] 22:53:00     INFO - GECKO(2619) |     #90 main /builds/worker/checkouts/gecko/browser/app/nsBrowserApp.cpp:327:18 (firefox+0xc9fd1)
[task 2021-08-04T22:53:00.736Z] 22:53:00     INFO - GECKO(2619) |   Previous write of size 4 at 0x7b7800136de8 by thread T29:
[task 2021-08-04T22:53:00.737Z] 22:53:00     INFO - GECKO(2619) |     #0 Update /builds/worker/checkouts/gecko/dom/media/MediaFormatReader.h:598:15 (libxul.so+0x3de2355)
[task 2021-08-04T22:53:00.737Z] 22:53:00     INFO - GECKO(2619) |     #1 mozilla::MediaFormatReader::HandleDemuxedSamples(mozilla::TrackInfo::TrackType, mozilla::FrameStatistics::AutoNotifyDecoded&) /builds/worker/checkouts/gecko/dom/media/MediaFormatReader.cpp:1976:21 (libxul.so+0x3de2355)
[task 2021-08-04T22:53:00.738Z] 22:53:00     INFO - GECKO(2619) |     #2 mozilla::MediaFormatReader::Update(mozilla::TrackInfo::TrackType) /builds/worker/checkouts/gecko/dom/media/MediaFormatReader.cpp:2390:3 (libxul.so+0x3ddf27f)
[task 2021-08-04T22:53:00.738Z] 22:53:00     INFO - GECKO(2619) |     #3 applyImpl<mozilla::MediaFormatReader, void (mozilla::MediaFormatReader::*)(mozilla::TrackInfo::TrackType), StoreCopyPassByConstLRef<mozilla::TrackInfo::TrackType> , 0> /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1148:12 (libxul.so+0x3ec2838)
[task 2021-08-04T22:53:00.739Z] 22:53:00     INFO - GECKO(2619) |     #4 apply<mozilla::MediaFormatReader, void (mozilla::MediaFormatReader::*)(mozilla::TrackInfo::TrackType)> /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1154:12 (libxul.so+0x3ec2838)
[task 2021-08-04T22:53:00.739Z] 22:53:00     INFO - GECKO(2619) |     #5 mozilla::detail::RunnableMethodImpl<mozilla::MediaFormatReader*, void (mozilla::MediaFormatReader::*)(mozilla::TrackInfo::TrackType), true, (mozilla::RunnableKind)0, mozilla::TrackInfo::TrackType>::Run() /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1201:13 (libxul.so+0x3ec2838)
[task 2021-08-04T22:53:00.740Z] 22:53:00     INFO - GECKO(2619) |     #6 mozilla::AutoTaskDispatcher::TaskGroupRunnable::Run() /builds/worker/workspace/obj-build/dist/include/mozilla/TaskDispatcher.h:227:35 (libxul.so+0xc8442b)
[task 2021-08-04T22:53:00.740Z] 22:53:00     INFO - GECKO(2619) |     #7 mozilla::TaskQueue::Runner::Run() /builds/worker/checkouts/gecko/xpcom/threads/TaskQueue.cpp:208:20 (libxul.so+0xc8ba70)
[task 2021-08-04T22:53:00.741Z] 22:53:00     INFO - GECKO(2619) |     #8 nsThreadPool::Run() /builds/worker/checkouts/gecko/xpcom/threads/nsThreadPool.cpp:303:14 (libxul.so+0xca2f10)
[task 2021-08-04T22:53:00.741Z] 22:53:00     INFO - GECKO(2619) |     #9 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/checkouts/gecko/xpcom/threads/nsThread.cpp:1142:16 (libxul.so+0xc9989a)
[task 2021-08-04T22:53:00.742Z] 22:53:00     INFO - GECKO(2619) |     #10 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:466:10 (libxul.so+0xca0622)
[task 2021-08-04T22:53:00.743Z] 22:53:00     INFO - GECKO(2619) |     #11 mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) /builds/worker/checkouts/gecko/ipc/glue/MessagePump.cpp:300:20 (libxul.so+0x15af3ce)
[task 2021-08-04T22:53:00.744Z] 22:53:00     INFO - GECKO(2619) |     #12 RunInternal /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:331:10 (libxul.so+0x15287cc)
[task 2021-08-04T22:53:00.744Z] 22:53:00     INFO - GECKO(2619) |     #13 RunHandler /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:324:3 (libxul.so+0x15287cc)
[task 2021-08-04T22:53:00.745Z] 22:53:00     INFO - GECKO(2619) |     #14 MessageLoop::Run() /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:306:3 (libxul.so+0x15287cc)
[task 2021-08-04T22:53:00.745Z] 22:53:00     INFO - GECKO(2619) |     #15 nsThread::ThreadFunc(void*) /builds/worker/checkouts/gecko/xpcom/threads/nsThread.cpp:390:10 (libxul.so+0xc95fe8)
[task 2021-08-04T22:53:00.746Z] 22:53:00     INFO - GECKO(2619) |     #16 _pt_root /builds/worker/checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:201:5 (libnspr4.so+0x44cd6)
[task 2021-08-04T22:53:00.747Z] 22:53:00     INFO - GECKO(2619) |   Location is heap block of size 2720 at 0x7b7800136800 allocated by main thread:
[task 2021-08-04T22:53:00.748Z] 22:53:00     INFO - GECKO(2619) |     #0 malloc /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:651:5 (firefox+0x55fbb)
[task 2021-08-04T22:53:00.749Z] 22:53:00     INFO - GECKO(2619) |     #1 moz_xmalloc /builds/worker/checkouts/gecko/memory/mozalloc/mozalloc.cpp:52:15 (firefox+0xcc44b)
[task 2021-08-04T22:53:00.750Z] 22:53:00     INFO - GECKO(2619) |     #2 operator new /builds/worker/workspace/obj-build/dist/include/mozilla/cxxalloc.h:33:10 (libxul.so+0x3d0e104)
[task 2021-08-04T22:53:00.760Z] 22:53:00     INFO - GECKO(2619) |     #3 mozilla::DecoderTraits::CreateReader(mozilla::MediaContainerType const&, mozilla::MediaFormatReaderInit&) /builds/worker/checkouts/gecko/dom/media/DecoderTraits.cpp:273:38 (libxul.so+0x3d0e104)
[task 2021-08-04T22:53:00.761Z] 22:53:00     INFO - GECKO(2619) |     #4 mozilla::ChannelMediaDecoder::CreateStateMachine() /builds/worker/checkouts/gecko/dom/media/ChannelMediaDecoder.cpp:213:13 (libxul.so+0x3d44d39)
[task 2021-08-04T22:53:00.761Z] 22:53:00     INFO - GECKO(2619) |     #5 mozilla::ChannelMediaDecoder::Load(nsIChannel*, bool, nsIStreamListener**) /builds/worker/checkouts/gecko/dom/media/ChannelMediaDecoder.cpp:263:19 (libxul.so+0x3d452e1)
[task 2021-08-04T22:53:00.761Z] 22:53:00     INFO - GECKO(2619) |     #6 nsresult mozilla::dom::HTMLMediaElement::SetupDecoder<mozilla::ChannelMediaDecoder, nsIChannel*&, bool&, nsIStreamListener**&>(mozilla::ChannelMediaDecoder*, nsIChannel*&, bool&, nsIStreamListener**&) /builds/worker/checkouts/gecko/dom/html/HTMLMediaElement.cpp:4922:27 (libxul.so+0x3c5cbf8)
[task 2021-08-04T22:53:00.762Z] 22:53:00     INFO - GECKO(2619) |     #7 mozilla::dom::HTMLMediaElement::InitializeDecoderForChannel(nsIChannel*, nsIStreamListener**) /builds/worker/checkouts/gecko/dom/html/HTMLMediaElement.cpp:5005:10 (libxul.so+0x3c3e1ae)
[task 2021-08-04T22:53:00.762Z] 22:53:00     INFO - GECKO(2619) |     #8 mozilla::dom::HTMLMediaElement::MediaLoadListener::OnStartRequest(nsIRequest*) /builds/worker/checkouts/gecko/dom/html/HTMLMediaElement.cpp:1329:7 (libxul.so+0x3c3d587)
[task 2021-08-04T22:53:00.762Z] 22:53:00     INFO - GECKO(2619) |     #9 mozilla::net::HttpChannelChild::DoOnStartRequest(nsIRequest*, nsISupports*) /builds/worker/checkouts/gecko/netwerk/protocol/http/HttpChannelChild.cpp:564:20 (libxul.so+0x12a9606)
[task 2021-08-04T22:53:00.762Z] 22:53:00     INFO - GECKO(2619) |     #10 mozilla::net::HttpChannelChild::OnStartRequest(mozilla::net::nsHttpResponseHead const&, bool const&, mozilla::net::nsHttpHeaderArray const&, mozilla::net::HttpChannelOnStartRequestArgs const&) /builds/worker/checkouts/gecko/netwerk/protocol/http/HttpChannelChild.cpp:495:3 (libxul.so+0x12a9313)
[task 2021-08-04T22:53:00.762Z] 22:53:00     INFO - GECKO(2619) |     #11 operator() /builds/worker/checkouts/gecko/netwerk/protocol/http/HttpChannelChild.cpp:365:15 (libxul.so+0x12c8738)
[task 2021-08-04T22:53:00.763Z] 22:53:00     INFO - GECKO(2619) |     #12 std::_Function_handler<void (), mozilla::net::HttpChannelChild::ProcessOnStartRequest(mozilla::net::nsHttpResponseHead const&, bool const&, mozilla::net::nsHttpHeaderArray const&, mozilla::net::HttpChannelOnStartRequestArgs const&)::$_18>::_M_invoke(std::_Any_data const&) /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/std_function.h:316:2 (libxul.so+0x12c8738)
[task 2021-08-04T22:53:00.763Z] 22:53:00     INFO - GECKO(2619) |     #13 operator() /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/std_function.h:706:14 (libxul.so+0x12009c6)
[task 2021-08-04T22:53:00.763Z] 22:53:00     INFO - GECKO(2619) |     #14 mozilla::net::ChannelFunctionEvent::Run() /builds/worker/workspace/obj-build/dist/include/mozilla/net/ChannelEventQueue.h:55:25 (libxul.so+0x12009c6)
[task 2021-08-04T22:53:00.763Z] 22:53:00     INFO - GECKO(2619) |     #15 mozilla::net::ChannelEventQueue::FlushQueue() /builds/worker/checkouts/gecko/netwerk/ipc/ChannelEventQueue.cpp:90:12 (libxul.so+0x1418511)
[task 2021-08-04T22:53:00.763Z] 22:53:00     INFO - GECKO(2619) |     #16 MaybeFlushQueue /builds/worker/workspace/obj-build/dist/include/mozilla/net/ChannelEventQueue.h:330:5 (libxul.so+0x143a25e)
[task 2021-08-04T22:53:00.763Z] 22:53:00     INFO - GECKO(2619) |     #17 CompleteResume /builds/worker/workspace/obj-build/dist/include/mozilla/net/ChannelEventQueue.h:309:5 (libxul.so+0x143a25e)
[task 2021-08-04T22:53:00.763Z] 22:53:00     INFO - GECKO(2619) |     #18 mozilla::net::ChannelEventQueue::ResumeInternal()::CompleteResumeRunnable::Run() /builds/worker/checkouts/gecko/netwerk/ipc/ChannelEventQueue.cpp:148:17 (libxul.so+0x143a25e)
[task 2021-08-04T22:53:00.763Z] 22:53:00     INFO - GECKO(2619) |     #19 mozilla::SchedulerGroup::Runnable::Run() /builds/worker/checkouts/gecko/xpcom/threads/SchedulerGroup.cpp:144:20 (libxul.so+0xc805bf)
[task 2021-08-04T22:53:00.765Z] 22:53:00     INFO - GECKO(2619) |     #20 mozilla::RunnableTask::Run() /builds/worker/checkouts/gecko/xpcom/threads/TaskController.cpp:502:16 (libxul.so+0xcabae7)
[task 2021-08-04T22:53:00.765Z] 22:53:00     INFO - GECKO(2619) |     #21 mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /builds/worker/checkouts/gecko/xpcom/threads/TaskController.cpp:805:26 (libxul.so+0xc88af4)
[task 2021-08-04T22:53:00.766Z] 22:53:00     INFO - GECKO(2619) |     #22 mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /builds/worker/checkouts/gecko/xpcom/threads/TaskController.cpp:641:15 (libxul.so+0xc87126)
[task 2021-08-04T22:53:00.767Z] 22:53:00     INFO - GECKO(2619) |     #23 mozilla::TaskController::ProcessPendingMTTask(bool) /builds/worker/checkouts/gecko/xpcom/threads/TaskController.cpp:425:36 (libxul.so+0xc873f4)
[task 2021-08-04T22:53:00.767Z] 22:53:00     INFO - GECKO(2619) |     #24 operator() /builds/worker/checkouts/gecko/xpcom/threads/TaskController.cpp:138:37 (libxul.so+0xcafa3a)
[task 2021-08-04T22:53:00.768Z] 22:53:00     INFO - GECKO(2619) |     #25 mozilla::detail::RunnableFunction<mozilla::TaskController::InitializeInternal()::$_1>::Run() /builds/worker/checkouts/gecko/xpcom/threads/nsThreadUtils.h:532:5 (libxul.so+0xcafa3a)
[task 2021-08-04T22:53:00.769Z] 22:53:00     INFO - GECKO(2619) |     #26 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/checkouts/gecko/xpcom/threads/nsThread.cpp:1148:16 (libxul.so+0xc995b5)
[task 2021-08-04T22:53:00.769Z] 22:53:00     INFO - GECKO(2619) |     #27 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:466:10 (libxul.so+0xca0622)
[task 2021-08-04T22:53:00.770Z] 22:53:00     INFO - GECKO(2619) |     #28 mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /builds/worker/checkouts/gecko/ipc/glue/MessagePump.cpp:107:5 (libxul.so+0x15ae8b0)
[task 2021-08-04T22:53:00.771Z] 22:53:00     INFO - GECKO(2619) |     #29 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/checkouts/gecko/ipc/glue/MessagePump.cpp:268:30 (libxul.so+0x15af2db)
[task 2021-08-04T22:53:00.772Z] 22:53:00     INFO - GECKO(2619) |     #30 RunInternal /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:331:10 (libxul.so+0x15287cc)
[task 2021-08-04T22:53:00.773Z] 22:53:00     INFO - GECKO(2619) |     #31 RunHandler /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:324:3 (libxul.so+0x15287cc)
[task 2021-08-04T22:53:00.774Z] 22:53:00     INFO - GECKO(2619) |     #32 MessageLoop::Run() /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:306:3 (libxul.so+0x15287cc)
[task 2021-08-04T22:53:00.774Z] 22:53:00     INFO - GECKO(2619) |     #33 nsBaseAppShell::Run() /builds/worker/checkouts/gecko/widget/nsBaseAppShell.cpp:137:27 (libxul.so+0x4cc1076)
[task 2021-08-04T22:53:00.775Z] 22:53:00     INFO - GECKO(2619) |     #34 XRE_RunAppShell() /builds/worker/checkouts/gecko/toolkit/xre/nsEmbedFunctions.cpp:923:20 (libxul.so+0x6b2dbc9)
[task 2021-08-04T22:53:00.776Z] 22:53:00     INFO - GECKO(2619) |     #35 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/checkouts/gecko/ipc/glue/MessagePump.cpp:235:9 (libxul.so+0x15af28d)
[task 2021-08-04T22:53:00.777Z] 22:53:00     INFO - GECKO(2619) |     #36 RunInternal /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:331:10 (libxul.so+0x15287cc)
[task 2021-08-04T22:53:00.778Z] 22:53:00     INFO - GECKO(2619) |     #37 RunHandler /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:324:3 (libxul.so+0x15287cc)
[task 2021-08-04T22:53:00.778Z] 22:53:00     INFO - GECKO(2619) |     #38 MessageLoop::Run() /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:306:3 (libxul.so+0x15287cc)
[task 2021-08-04T22:53:00.779Z] 22:53:00     INFO - GECKO(2619) |     #39 XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/checkouts/gecko/toolkit/xre/nsEmbedFunctions.cpp:755:34 (libxul.so+0x6b2d949)
[task 2021-08-04T22:53:00.780Z] 22:53:00     INFO - GECKO(2619) |     #40 mozilla::BootstrapImpl::XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/checkouts/gecko/toolkit/xre/Bootstrap.cpp:67:12 (libxul.so+0x6b35962)
[task 2021-08-04T22:53:00.781Z] 22:53:00     INFO - GECKO(2619) |     #41 content_process_main /builds/worker/checkouts/gecko/browser/app/../../ipc/contentproc/plugin-container.cpp:57:28 (firefox+0xc9fd1)
[task 2021-08-04T22:53:00.781Z] 22:53:00     INFO - GECKO(2619) |     #42 main /builds/worker/checkouts/gecko/browser/app/nsBrowserApp.cpp:327:18 (firefox+0xc9fd1)
[task 2021-08-04T22:53:00.782Z] 22:53:00     INFO - GECKO(2619) |   Thread T29 'MediaSu~isor #1' (tid=4048, running) created by main thread at:
[task 2021-08-04T22:53:00.783Z] 22:53:00     INFO - GECKO(2619) |     #0 pthread_create /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:965:3 (firefox+0x577eb)
[task 2021-08-04T22:53:00.783Z] 22:53:00     INFO - GECKO(2619) |     #1 _PR_CreateThread /builds/worker/checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:458:14 (libnspr4.so+0x3be33)
[task 2021-08-04T22:53:00.784Z] 22:53:00     INFO - GECKO(2619) |     #2 PR_CreateThread /builds/worker/checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:533:12 (libnspr4.so+0x30915)
[task 2021-08-04T22:53:00.784Z] 22:53:00     INFO - GECKO(2619) |     #3 nsThread::Init(nsTSubstring<char> const&) /builds/worker/checkouts/gecko/xpcom/threads/nsThread.cpp:602:18 (libxul.so+0xc97352)
[task 2021-08-04T22:53:00.785Z] 22:53:00     INFO - GECKO(2619) |     #4 nsThreadManager::NewNamedThread(nsTSubstring<char> const&, unsigned int, nsIThread**) /builds/worker/checkouts/gecko/xpcom/threads/nsThreadManager.cpp:574:12 (libxul.so+0xc9f4aa)
[task 2021-08-04T22:53:00.786Z] 22:53:00     INFO - GECKO(2619) |     #5 NS_NewNamedThread(nsTSubstring<char> const&, nsIThread**, already_AddRefed<nsIRunnable>, unsigned int) /builds/worker/checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:162:57 (libxul.so+0xca7364)
[task 2021-08-04T22:53:00.786Z] 22:53:00     INFO - GECKO(2619) |     #6 NS_NewNamedThread /builds/worker/checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:154:10 (libxul.so+0xca22ec)
[task 2021-08-04T22:53:00.787Z] 22:53:00     INFO - GECKO(2619) |     #7 nsThreadPool::PutEvent(already_AddRefed<nsIRunnable>, unsigned int) /builds/worker/checkouts/gecko/xpcom/threads/nsThreadPool.cpp:118:17 (libxul.so+0xca22ec)
[task 2021-08-04T22:53:00.788Z] 22:53:00     INFO - GECKO(2619) |     #8 nsThreadPool::Dispatch(already_AddRefed<nsIRunnable>, unsigned int) /builds/worker/checkouts/gecko/xpcom/threads/nsThreadPool.cpp:354:5 (libxul.so+0xca384f)
[task 2021-08-04T22:53:00.792Z] 22:53:00     INFO - GECKO(2619) |     #9 non-virtual thunk to nsThreadPool::Dispatch(already_AddRefed<nsIRunnable>, unsigned int) /builds/worker/checkouts/gecko/xpcom/threads/nsThreadPool.cpp (libxul.so+0xca3d78)
[task 2021-08-04T22:53:00.793Z] 22:53:00     INFO - GECKO(2619) |     #10 mozilla::SharedThreadPool::Dispatch(already_AddRefed<nsIRunnable>, unsigned int) /builds/worker/workspace/obj-build/dist/include/mozilla/SharedThreadPool.h:74:42 (libxul.so+0xc82c00)
[task 2021-08-04T22:53:00.794Z] 22:53:00     INFO - GECKO(2619) |     #11 mozilla::TaskQueue::DispatchLocked(nsCOMPtr<nsIRunnable>&, unsigned int, mozilla::AbstractThread::DispatchReason) /builds/worker/checkouts/gecko/xpcom/threads/TaskQueue.cpp:68:26 (libxul.so+0xc8a546)
[task 2021-08-04T22:53:00.794Z] 22:53:00     INFO - GECKO(2619) |     #12 mozilla::TaskQueue::Dispatch(already_AddRefed<nsIRunnable>, mozilla::AbstractThread::DispatchReason) /builds/worker/workspace/obj-build/dist/include/mozilla/TaskQueue.h:88:14 (libxul.so+0xca9f38)
[task 2021-08-04T22:53:00.795Z] 22:53:00     INFO - GECKO(2619) |     #13 DispatchTaskGroup /builds/worker/workspace/obj-build/dist/include/mozilla/TaskDispatcher.h:275:20 (libxul.so+0xc8395b)
[task 2021-08-04T22:53:00.795Z] 22:53:00     INFO - GECKO(2619) |     #14 mozilla::AutoTaskDispatcher::~AutoTaskDispatcher() /builds/worker/workspace/obj-build/dist/include/mozilla/TaskDispatcher.h:121:7 (libxul.so+0xc8395b)
[task 2021-08-04T22:53:00.796Z] 22:53:00     INFO - GECKO(2619) |     #15 reset /builds/worker/workspace/obj-build/dist/include/mozilla/Maybe.h:639:19 (libxul.so+0xc84b40)
[task 2021-08-04T22:53:00.797Z] 22:53:00     INFO - GECKO(2619) |     #16 mozilla::XPCOMThreadWrapper::MaybeFireTailDispatcher() /builds/worker/checkouts/gecko/xpcom/threads/AbstractThread.cpp:195:23 (libxul.so+0xc84b40)
[task 2021-08-04T22:53:00.797Z] 22:53:00     INFO - GECKO(2619) |     #17 AfterProcessNextEvent /builds/worker/checkouts/gecko/xpcom/threads/AbstractThread.cpp:133:5 (libxul.so+0xc82379)
[task 2021-08-04T22:53:00.797Z] 22:53:00     INFO - GECKO(2619) |     #18 non-virtual thunk to mozilla::XPCOMThreadWrapper::AfterProcessNextEvent(nsIThreadInternal*, bool) /builds/worker/checkouts/gecko/xpcom/threads/AbstractThread.cpp (libxul.so+0xc82379)
[task 2021-08-04T22:53:00.798Z] 22:53:00     INFO - GECKO(2619) |     #19 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/checkouts/gecko/xpcom/threads/nsThread.cpp:1172:3 (libxul.so+0xc99aad)
[task 2021-08-04T22:53:00.798Z] 22:53:00     INFO - GECKO(2619) |     #20 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:466:10 (libxul.so+0xca0622)
[task 2021-08-04T22:53:00.798Z] 22:53:00     INFO - GECKO(2619) |     #21 mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /builds/worker/checkouts/gecko/ipc/glue/MessagePump.cpp:107:5 (libxul.so+0x15ae8b0)
[task 2021-08-04T22:53:00.798Z] 22:53:00     INFO - GECKO(2619) |     #22 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/checkouts/gecko/ipc/glue/MessagePump.cpp:268:30 (libxul.so+0x15af2db)
[task 2021-08-04T22:53:00.798Z] 22:53:00     INFO - GECKO(2619) |     #23 RunInternal /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:331:10 (libxul.so+0x15287cc)
[task 2021-08-04T22:53:00.799Z] 22:53:00     INFO - GECKO(2619) |     #24 RunHandler /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:324:3 (libxul.so+0x15287cc)
[task 2021-08-04T22:53:00.799Z] 22:53:00     INFO - GECKO(2619) |     #25 MessageLoop::Run() /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:306:3 (libxul.so+0x15287cc)
[task 2021-08-04T22:53:00.799Z] 22:53:00     INFO - GECKO(2619) |     #26 nsBaseAppShell::Run() /builds/worker/checkouts/gecko/widget/nsBaseAppShell.cpp:137:27 (libxul.so+0x4cc1076)
[task 2021-08-04T22:53:00.799Z] 22:53:00     INFO - GECKO(2619) |     #27 XRE_RunAppShell() /builds/worker/checkouts/gecko/toolkit/xre/nsEmbedFunctions.cpp:923:20 (libxul.so+0x6b2dbc9)
[task 2021-08-04T22:53:00.799Z] 22:53:00     INFO - GECKO(2619) |     #28 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/checkouts/gecko/ipc/glue/MessagePump.cpp:235:9 (libxul.so+0x15af28d)
[task 2021-08-04T22:53:00.800Z] 22:53:00     INFO - GECKO(2619) |     #29 RunInternal /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:331:10 (libxul.so+0x15287cc)
[task 2021-08-04T22:53:00.800Z] 22:53:00     INFO - GECKO(2619) |     #30 RunHandler /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:324:3 (libxul.so+0x15287cc)
[task 2021-08-04T22:53:00.800Z] 22:53:00     INFO - GECKO(2619) |     #31 MessageLoop::Run() /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:306:3 (libxul.so+0x15287cc)
[task 2021-08-04T22:53:00.801Z] 22:53:00     INFO - GECKO(2619) |     #32 XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/checkouts/gecko/toolkit/xre/nsEmbedFunctions.cpp:755:34 (libxul.so+0x6b2d949)
[task 2021-08-04T22:53:00.802Z] 22:53:00     INFO - GECKO(2619) |     #33 mozilla::BootstrapImpl::XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/checkouts/gecko/toolkit/xre/Bootstrap.cpp:67:12 (libxul.so+0x6b35962)
[task 2021-08-04T22:53:00.802Z] 22:53:00     INFO - GECKO(2619) |     #34 content_process_main /builds/worker/checkouts/gecko/browser/app/../../ipc/contentproc/plugin-container.cpp:57:28 (firefox+0xc9fd1)
[task 2021-08-04T22:53:00.802Z] 22:53:00     INFO - GECKO(2619) |     #35 main /builds/worker/checkouts/gecko/browser/app/nsBrowserApp.cpp:327:18 (firefox+0xc9fd1)
[task 2021-08-04T22:53:00.802Z] 22:53:00     INFO - GECKO(2619) | SUMMARY: ThreadSanitizer: data race /builds/worker/checkouts/gecko/dom/media/MediaFormatReader.h:592:35 in Mean

So it looks like the main thread and the "MediaSupervisor" thread (I assume, based on Thread T29 'MediaSu~isor #1' (tid=4048, running) created by main thread) are racing.

Main thread is reading here, and MediaSupervisor thread is writing here.

I guess we need some kind of mutex here? This code is... very unfamiliar to me, so perhaps you have a suggestion bryce?

Flags: needinfo?(bvandyk)

Ack. Thanks for investigating the issue and linking the relevant code. It does indeed seem like we need some syncing here. There's a lot of different things being touched by moz debug info, I hope we don't have a general problem with it grabbing a lot of data in a unsafe way.

I'll carve out some time later today to look further.

Assignee: nobody → mconley
Group: core-security → core-security-release

I guess we don't run this code in automation, so haven't caught this until now, but this looks quite racy. It could also benefit from some asserts to clarify the threading model.

I can take this if desired (feel free to assign to me), but it may take me a day or two to close out other work. Can try and turn around faster if this is blocking urgent work, or I can review a patch.

My gut read is that we need to extend a how long we're holding our video and audio locks to cover all of the access to those objects. May also be worth auditing that the locks are covering all the access that's happening.

Flags: needinfo?(bvandyk)

This is not blocking urgent work. And thanks - I think you're much more equipped to solve this than I am.

Assignee: mconley → bvandyk

Returning to look at this now. This looks more complicated than I initially thought. Notes for myself and whoever

  • Bug 1542674 was fairly extensive in terms of changes, following that (and maybe even prior) there are some threading safety concerns.
  • The GetDebugInfo paths we're dealing with are often recursive -- an object may need to call GetDebugInfo on a member as part of figuring out its own debug info.
  • We have a mix of sync methods and async methods to do this. Bug 1542674 appears to use RequestDebugInfo for async methods, and GetDebugInfo for the sync ones.
    • The async methods don't resolve to debug info, but rather use promises as a sync mechanism where it's only safe to access the mutable debug info arg once the promise resolves.
  • There's a mix of assumptions about access to data throughout the objects involved. Some expect access only on certain threads, some use locking, some use atomics. This means we need to handle data on a cases by case basis to ensure safety.
  • There's many functions here that don't document or assert their expected threading model -- i.e. a lot of functions (and data) require usage to take place on a specific thread to ensure safety, but this is implicit and not enforced or documented.

I find these last two points make the code hard for me to reason about.

I am less confident in my original plan of holding locks over further access. I'm going to take a some time to assess if a broader rework can fix both this issue and help reduce and/or document the complexities here.

Reopening, will land fix against this bug.

Blocks: 1721899
Status: RESOLVED → REOPENED
No longer regressed by: 1721899
Resolution: FIXED → ---

Rework incoming. I don't think this code is particularly dangerous, because it's behind flags, but I'm going to keep my verbose comments off the patches just in case I paint a target.

  • I'm going to force usage of RequestDebugInfo for some classes. This method will then ensure that debug info is fetched on the correct thread via an internal GetDebugInfo. This removes the footgun that we currently have where the caller of debug info methods needs know which thread to call the function on.
  • I'm going to add some tests.

That should fix the data race, and give us test coverage for the paths.

Has Regression Range: --- → yes

Comment on attachment 9238762 [details]
Bug 1724106 - Clarify threading usage when getting media debug info. r?alwu

Security Approval Request

  • How easily could an exploit be constructed based on the patch?: I believe it would be very hard, but would appreciate having my working checked. Access to the vulnerable APIs is gated behind ChromeOnly and other checks. My understanding is because of this we don't a have a vulnerability from general JS -- though a malicious addon with the right access could trigger the race.

Commit messages and code can be made even more vague if there's concern.

  • Do comments in the patch, the check-in comment, or tests included in the patch paint a bulls-eye on the security problem?: No
  • Which older supported branches are affected by this flaw?: All
  • If not all supported branches, which bug introduced the flaw?: All are affected.
  • Do you have backports for the affected branches?: No
  • If not, how different, hard to create, and risky will they be?: I expect the code will graft cleanly if needed, but haven't verified as such.
  • How likely is this patch to cause regressions; how much testing does it need?: Unlikely to cause real world issues because the APIs are guarded. I would expect automated testing to catch if I haven't fixed all the data races. I've added some tests here to cover the APIs. I don't think further testing is needed given these are debug APIs.
Attachment #9238762 - Flags: sec-approval?
Component: Audio/Video → Audio/Video: Playback
Summary: Intermittent SUMMARY: ThreadSanitizer: data race /builds/worker/checkouts/gecko/dom/media/MediaFormatReader.h:592:35 in Mean → Media debug data APIs are not thread safe when getting data

Given the nature of the APIs this isn't a security vuln for Firefox users and we're going to unhide the bug. You don't need sec-approval

Group: core-security-release
Pushed by bvandyk@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8ed4675541c6
Clarify threading usage when getting media debug info. r=alwu
https://hg.mozilla.org/integration/autoland/rev/81d1db229eea
Add tests to exercise debug data getters. r=alwu
Attachment #9238762 - Flags: sec-approval?
Attachment #9238763 - Flags: sec-approval?
Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → FIXED

Races still exist here, tsan is showing some intermittents post landing. I've requested backout and will continue working on this when I have a moment (and will be more aggressive with my testing prior to landing).

Priority: P5 → P2
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Flags: needinfo?(bvandyk)

Notes for myself when I revisit:

There are some r+ patches which didn't land and no activity in this bug for 2 weeks.
:bryce, could you have a look please?
For more information, please visit auto_nag documentation.

Flags: needinfo?(bvandyk)
Flags: needinfo?(alwu)

I do plan on coming back to this, but have some higher priority stuff stealing my attention at the moment.

Flags: needinfo?(bvandyk)
Flags: needinfo?(alwu)
Status: REOPENED → ASSIGNED

TrackBuffersManager doesn't expect access to various members from outside of its
TaskQueue. However, GetDebugInfo will violate this depending on the calling
thread. This patch prevents that from happening by moving GetDebugInfo from
the public interface and instead providing a method that will call
GetDebugInfo on the appropriate thread.

This also updates call sites to appropriately handle the change.

Depends on D124104

Flags: needinfo?(bvandyk)

Patches updated to further enforce access only on expected task queues. I didn't mess with further locking here for a couple of reasons

  1. Conflicting with the work now in progress to add annotations.
  2. My understanding is that some of the classes involved do not have existing locks for certain data. I.e. access to data is expected to happen on a specific event target and only on that target. IMO, I wouldn't mind having locks around such data, but think retrofitting locks here may be a larger task than I want to tackle here.
Pushed by bvandyk@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/22b3f02970f9
Clarify threading usage when getting media debug info. r=alwu
https://hg.mozilla.org/integration/autoland/rev/47ad0fac6d04
Update TrackBuffersManager's get debug path to run on its TaskQueue. r=alwu
https://hg.mozilla.org/integration/autoland/rev/9c577f0cf772
Add tests to exercise debug data getters. r=alwu
Status: ASSIGNED → RESOLVED
Closed: 3 years ago2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 100 Branch
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.