Closed Bug 1646348 Opened 4 years ago Closed 4 years ago

Fix audio thread registration in GraphDriver.cpp

Categories

(Core :: Audio/Video: MediaStreamGraph, defect)

defect

Tracking

()

RESOLVED FIXED
mozilla79
Tracking Status
firefox79 --- fixed

People

(Reporter: padenot, Assigned: padenot)

References

Details

Attachments

(5 files)

Silly mistake that breaks everything because the thread is not registered in the profiler.

Assignee: nobody → padenot
Status: NEW → ASSIGNED
Pushed by padenot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f26dbc8340cf Fix audio thread registration in GraphDriver.cpp. r=achronop

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&revision=f26dbc8340cf87ef57bf4b34c0d19541aadd8671&selectedTaskRun=ejA07P7ITmyVt4kMGs0WJA.0

Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=306782496&repo=autoland

Backout link: https://hg.mozilla.org/integration/autoland/rev/652f7e3edae8ffb5323f0fafa56713cce2ce0ba4

[task 2020-06-18T14:01:03.520Z] 14:01:03     INFO - REFTEST TEST-START | dom/media/test/crashtests/933151.html
[task 2020-06-18T14:01:03.520Z] 14:01:03     INFO - REFTEST TEST-LOAD | file:///Users/cltbld/tasks/task_1592488572/build/tests/reftest/tests/dom/media/test/crashtests/933151.html | 618 / 3814 (16%)
[task 2020-06-18T14:01:03.564Z] 14:01:03     INFO - Assertion failure: !FindCurrentThreadRegisteredThread(aLock), at /builds/worker/checkouts/gecko/tools/profiler/core/platform.cpp:3499
[task 2020-06-18T14:01:03.564Z] 14:01:03     INFO - #01: profiler_register_thread(char const*, void*) [tools/profiler/core/platform.cpp:4644]
[task 2020-06-18T14:01:03.567Z] 14:01:03     INFO - #02: mozilla::AudioCallbackDriver::DataCallback(float const*, float*, long) [dom/media/GraphDriver.cpp:873]
[task 2020-06-18T14:01:03.568Z] 14:01:03     INFO - #03: passthrough_resampler<float>::fill(void*, long*, void*, long) [media/libcubeb/src/cubeb_resampler.cpp:108]
[task 2020-06-18T14:01:03.568Z] 14:01:03     INFO - #04: cubeb_coreaudio::backend::audiounit_output_callback [third_party/rust/cubeb-coreaudio/src/backend/mod.rs:677]
[task 2020-06-18T14:01:03.568Z] 14:01:03     INFO -  fix-stacks error: failed to read breakpad symbols dir `/Users/cltbld/tasks/task_1592488572/build/symbols/CoreAudio` for `/System/Library/Components/CoreAudio.component/Contents/MacOS/CoreAudio`
[task 2020-06-18T14:01:03.569Z] 14:01:03     INFO -  fix-stacks note:  this is expected and harmless for system libraries on debug automation runs
[task 2020-06-18T14:01:03.578Z] 14:01:03     INFO - #05: AUConverterBase::RenderBus(unsigned int&, AudioTimeStamp const&, unsigned int, unsigned int) [/System/Library/Components/CoreAudio.component/Contents/MacOS/CoreAudio + 0xca3f]
[task 2020-06-18T14:01:03.578Z] 14:01:03     INFO - #06: AUBase::DoRenderBus(unsigned int&, AudioTimeStamp const&, unsigned int, AUOutputElement*, unsigned int, AudioBufferList&) [/System/Library/Components/CoreAudio.component/Contents/MacOS/CoreAudio + 0x128587]
[task 2020-06-18T14:01:03.579Z] 14:01:03     INFO - #07: AUBase::DoRender(unsigned int&, AudioTimeStamp const&, unsigned int, unsigned int, AudioBufferList&) [/System/Library/Components/CoreAudio.component/Contents/MacOS/CoreAudio + 0x127ce7]
[task 2020-06-18T14:01:03.579Z] 14:01:03     INFO - #08: AUHAL::AUIOProc(unsigned int, AudioTimeStamp const*, AudioBufferList const*, AudioTimeStamp const*, AudioBufferList*, AudioTimeStamp const*, void*) [/System/Library/Components/CoreAudio.component/Contents/MacOS/CoreAudio + 0xebc6]
[task 2020-06-18T14:01:03.579Z] 14:01:03     INFO -  fix-stacks error: failed to read breakpad symbols dir `/Users/cltbld/tasks/task_1592488572/build/symbols/CoreAudio` for `/System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio`
[task 2020-06-18T14:01:03.580Z] 14:01:03     INFO -  fix-stacks note:  this is expected and harmless for system libraries on debug automation runs
[task 2020-06-18T14:01:03.580Z] 14:01:03     INFO - #09: HALC_ProxyIOContext::IOWorkLoop() [/System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio + 0x33ed3]
[task 2020-06-18T14:01:03.580Z] 14:01:03     INFO - #10: HALC_ProxyIOContext::IOThreadEntry(void*) [/System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio + 0x32df4]
[task 2020-06-18T14:01:03.580Z] 14:01:03     INFO - #11: HALB_IOThread::Entry(void*) [/System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio + 0x32956]
[task 2020-06-18T14:01:03.580Z] 14:01:03     INFO -  fix-stacks error: failed to read breakpad symbols dir `/Users/cltbld/tasks/task_1592488572/build/symbols/libsystem_pthread.dylib` for `/usr/lib/system/libsystem_pthread.dylib`
[task 2020-06-18T14:01:03.580Z] 14:01:03     INFO -  fix-stacks note:  this is expected and harmless for system libraries on debug automation runs
[task 2020-06-18T14:01:03.580Z] 14:01:03     INFO - #12: _pthread_body [/usr/lib/system/libsystem_pthread.dylib + 0x32eb]
[task 2020-06-18T14:01:03.581Z] 14:01:03     INFO - #13: _pthread_start [/usr/lib/system/libsystem_pthread.dylib + 0x6249]
[task 2020-06-18T14:01:03.881Z] 14:01:03     INFO - [Parent 1083, Unnamed thread 11e8a0420] WARNING: Resource acquired is being released in non-LIFO order; why?
[task 2020-06-18T14:01:03.881Z] 14:01:03     INFO - : file /builds/worker/checkouts/gecko/xpcom/threads/BlockingResourceBase.cpp, line 292
[task 2020-06-18T14:01:03.882Z] 14:01:03     INFO - --- Mutex : dumpSafetyLock (currently acquired)
[task 2020-06-18T14:01:03.882Z] 14:01:03     INFO -  calling context
[task 2020-06-18T14:01:03.888Z] 14:01:03     INFO -   [stack trace unavailable]
[task 2020-06-18T14:01:03.909Z] 14:01:03     INFO - [Parent 1083, Main Thread] WARNING: IPC message discarded: actor cannot send: file /builds/worker/checkouts/gecko/ipc/glue/ProtocolUtils.cpp, line 470
[task 2020-06-18T14:01:03.909Z] 14:01:03    ERROR - A content process crashed and MOZ_CRASHREPORTER_SHUTDOWN is set, shutting down
[task 2020-06-18T14:01:04.167Z] 14:01:04     INFO - [Child 1091, Main Thread] WARNING: nsAppShell::Exit() called redundantly: file /builds/worker/checkouts/gecko/widget/cocoa/nsAppShell.mm, line 714
[task 2020-06-18T14:01:04.169Z] 14:01:04     INFO - ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
[task 2020-06-18T14:01:04.169Z] 14:01:04     INFO - !!! error running onStopped callback: TypeError: callback is not a function
Flags: needinfo?(padenot)
Severity: -- → S3

This keeps track of how many users of an audio thread there is, and takes care
of registring or unregistring those threads to the Gecko Profiler.

Depends on D80000

This patch changes the type of mAudioThreadId because std::thread::id is
non-memovable and AudioThreadRegistry uses an nsTArray, that needs elements to
be memovable.

Depends on D80465

Depends on D80466

Flags: needinfo?(padenot)
Blocks: 1647717
Pushed by padenot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6e30d79d7bf5 Fix audio thread registration in GraphDriver.cpp. r=achronop https://hg.mozilla.org/integration/autoland/rev/26806d001927 Introduce the AudioThreadRegistry. r=achronop https://hg.mozilla.org/integration/autoland/rev/40b5b4babc73 Expose an AudioThreadRegistry in CubebUtils. r=achronop https://hg.mozilla.org/integration/autoland/rev/04aaad7734f1 Use the AudioThreadRegistry in GraphDriver.cpp. r=achronop https://hg.mozilla.org/integration/autoland/rev/bd6faee9f1c2 Fix unified compilation. r=achronop
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: