Closed Bug 1337805 Opened 3 years ago Closed 3 years ago

Update cubeb from upstream to 21e96ac

Categories

(Core :: Audio/Video: cubeb, defect, P1)

53 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: achronop, Assigned: achronop)

References

Details

Attachments

(2 files)

Update cubeb from upstream to 21e96ac
Rank: 15
Priority: -- → P1
Assignee: nobody → achronop
Blocks: 1338012
Comment on attachment 8834950 [details]
Bug 1337805 - Update cubeb from upstream 21e96ac.

https://reviewboard.mozilla.org/r/110696/#review112346
Attachment #8834950 - Flags: review?(padenot) → review+
Pushed by achronop@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/a3faba8c3991
Update cubeb from upstream 21e96ac. r=padenot
chunmin:
This patch in combination with the code from Bug 1321502 deadlocks inside audiounit_get_channel_layout. Can you please take a look? I can support tomorrow morning. My guess is something locking during stream DecodedAudioDataSink::InitializeAudioStream and AudioStream::DataCallback (did not look at it carefully).

https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=a3faba8c399138e0f90ab561ee1dc533ebbffa23&selectedJob=75944851

gl2/3 tests

Callstack of the frozen is the following:

06:44:11     INFO - Thread 40
06:44:11     INFO -  0  libsystem_kernel.dylib!__psynch_mutexwait + 0xa
06:44:11     INFO -     rax = 0x000000000200012d   rdx = 0x0000000000002800
06:44:11     INFO -     rcx = 0x00000001468804e8   rbx = 0x0000000000002a03
06:44:11     INFO -     rsi = 0x0000000000002a03   rdi = 0x000000011e870740
06:44:11     INFO -     rbp = 0x0000000146880570   rsp = 0x00000001468804e8
06:44:11     INFO -      r8 = 0x0000000000002060    r9 = 0x0000000124fc1d60
06:44:11     INFO -     r10 = 0x00000000000021f8   r11 = 0x0000000000000246
06:44:11     INFO -     r12 = 0x000000011e870758   r13 = 0x0000000000002a03
06:44:11     INFO -     r14 = 0x0000000000002800   r15 = 0x000000011e870740
06:44:11     INFO -     rip = 0x00007fff9986e166
06:44:11     INFO -     Found by: given as instruction pointer in context
06:44:11     INFO -  1  libnss3.dylib!<name omitted> [ptsynch.c:a3faba8c3991 : 177 + 0x5]
06:44:11     INFO -     rbp = 0x0000000146880590   rsp = 0x0000000146880580
06:44:11     INFO -     rip = 0x000000010ca35c3e
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO -  2  XUL!mozilla::AudioStream::DataCallback(void*, long) [Mutex.h:a3faba8c3991 : 164 + 0xf]
06:44:11     INFO -     rbx = 0x0000000121587000   rbp = 0x00000001468805f0
06:44:11     INFO -     rsp = 0x00000001468805a0   rip = 0x000000010e9017e8
06:44:11     INFO -     Found by: call frame info
06:44:11     INFO -  3  XUL!passthrough_resampler<float>::fill(void*, long*, void*, long) [cubeb_resampler.cpp:a3faba8c3991 : 70 + 0x7]
06:44:11     INFO -     rbx = 0x000000000000022d   rbp = 0x0000000146880650
06:44:11     INFO -     rsp = 0x0000000146880600   r12 = 0x0000000121582368
06:44:11     INFO -     r13 = 0x0000000000000000   r14 = 0x0000000121587000
06:44:11     INFO -     r15 = 0x0000000121582340   rip = 0x000000010fe693ac
06:44:11     INFO -     Found by: call frame info
06:44:11     INFO -  4  XUL!audiounit_output_callback [cubeb_audiounit.cpp:a3faba8c3991 : 534 + 0xe]
06:44:11     INFO -     rbx = 0x00000001122d14b0   rbp = 0x00000001468806b0
06:44:11     INFO -     rsp = 0x0000000146880660   r12 = 0x000000012d751c40
06:44:11     INFO -     r13 = 0x000000000000022d   r14 = 0x0000000121587000
06:44:11     INFO -     r15 = 0x0000000000000000   rip = 0x000000010fe649f5
06:44:11     INFO -     Found by: call frame info
06:44:11     INFO -  5  CoreAudio + 0xa73b
06:44:11     INFO -     rbx = 0x000000011f495000   rbp = 0x00000001468806f0
06:44:11     INFO -     rsp = 0x00000001468806c0   r12 = 0x0000000124fc1d60
06:44:11     INFO -     r13 = 0x0000000000000000   r14 = 0x00000000ffffd584
06:44:11     INFO -     r15 = 0x000000014688074c   rip = 0x000000016030a73b
06:44:11     INFO -     Found by: call frame info
06:44:11     INFO -  6  CoreAudio + 0x9fc0
06:44:11     INFO -     rbp = 0x0000000146880770   rsp = 0x0000000146880700
06:44:11     INFO -     rip = 0x0000000160309fc0
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO -  7  AudioToolbox!AudioConverterChain::CallInputProc(unsigned int) + 0x175
06:44:11     INFO -     rbp = 0x00000001468807d0   rsp = 0x0000000146880780
06:44:11     INFO -     rip = 0x00007fff966e1359
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO -  8  AudioToolbox!AudioConverterChain::FillBufferFromInputProc(unsigned int*, CABufferList*) + 0x82
06:44:11     INFO -     rbp = 0x0000000146880810   rsp = 0x00000001468807e0
06:44:11     INFO -     rip = 0x00007fff966e10e0
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO -  9  AudioToolbox!BufferedAudioConverter::GetInputBytes(unsigned int, unsigned int&, CABufferList const*&) + 0xb3
06:44:11     INFO -     rbp = 0x0000000146880840   rsp = 0x0000000146880820
06:44:11     INFO -     rip = 0x00007fff966e104f
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO - 10  AudioToolbox!Resampler2Wrapper::RenderOutput(CABufferList*, unsigned int, unsigned int&) + 0xef
06:44:11     INFO -     rbp = 0x0000000146880900   rsp = 0x0000000146880850
06:44:11     INFO -     rip = 0x00007fff9672ce2f
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO - 11  AudioToolbox!BufferedAudioConverter::FillBuffer(unsigned int&, AudioBufferList&, AudioStreamPacketDescription*) + 0x11b
06:44:11     INFO -     rbp = 0x0000000146880970   rsp = 0x0000000146880910
06:44:11     INFO -     rip = 0x00007fff966d4f2d
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO - 12  AudioToolbox!AudioConverterChain::RenderOutput(CABufferList*, unsigned int, unsigned int&, AudioStreamPacketDescription*) + 0x63
06:44:11     INFO -     rbp = 0x00000001468809a0   rsp = 0x0000000146880980
06:44:11     INFO -     rip = 0x00007fff966d51a9
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO - 13  AudioToolbox!BufferedAudioConverter::FillBuffer(unsigned int&, AudioBufferList&, AudioStreamPacketDescription*) + 0x11b
06:44:11     INFO -     rbp = 0x0000000146880a10   rsp = 0x00000001468809b0
06:44:11     INFO -     rip = 0x00007fff966d4f2d
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO - 14  AudioToolbox!AudioConverterFillComplexBuffer + 0x11f
06:44:11     INFO -     rbp = 0x0000000146880a70   rsp = 0x0000000146880a20
06:44:11     INFO -     rip = 0x00007fff966d4bb7
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO - 15  CoreAudio + 0x9e41
06:44:11     INFO -     rbp = 0x0000000146880ab0   rsp = 0x0000000146880a80
06:44:11     INFO -     rip = 0x0000000160309e41
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO - 16  CoreAudio + 0x9745
06:44:11     INFO -     rbp = 0x0000000146880b20   rsp = 0x0000000146880ac0
06:44:11     INFO -     rip = 0x0000000160309745
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO - 17  CoreAudio + 0x6f1e
06:44:11     INFO -     rbp = 0x0000000146880b70   rsp = 0x0000000146880b30
06:44:11     INFO -     rip = 0x0000000160306f1e
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO - 18  CoreAudio + 0x560d
06:44:11     INFO -     rbp = 0x0000000146880be0   rsp = 0x0000000146880b80
06:44:11     INFO -     rip = 0x000000016030560d
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO - 19  CoreAudio + 0xd131
06:44:11     INFO -     rbp = 0x0000000146880cf0   rsp = 0x0000000146880bf0
06:44:11     INFO -     rip = 0x000000016030d131
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO - 20  CoreAudio!HALC_ProxyIOContext::IOWorkLoop() + 0x85a
06:44:11     INFO -     rbp = 0x0000000146880e80   rsp = 0x0000000146880d00
06:44:11     INFO -     rip = 0x00007fff8b449f3e
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO - 21  CoreAudio!HALC_ProxyIOContext::IOThreadEntry(void*) + 0x58
06:44:11     INFO -     rbp = 0x0000000146880eb0   rsp = 0x0000000146880e90
06:44:11     INFO -     rip = 0x00007fff8b449612
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO - 22  CoreAudio!HALB_IOThread::Entry(void*) + 0x9d
06:44:11     INFO -     rbp = 0x0000000146880ef0   rsp = 0x0000000146880ec0
06:44:11     INFO -     rip = 0x00007fff8b4494e3
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO - 23  libsystem_pthread.dylib!_pthread_body + 0x83
06:44:11     INFO -     rbp = 0x0000000146880f10   rsp = 0x0000000146880f00
06:44:11     INFO -     rip = 0x00007fff94e4805a
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO - 24  libsystem_pthread.dylib!_pthread_start + 0xb0
06:44:11     INFO -     rbp = 0x0000000146880f50   rsp = 0x0000000146880f20
06:44:11     INFO -     rip = 0x00007fff94e47fd7
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO - 25  libsystem_pthread.dylib!thread_start + 0xd
06:44:11     INFO -     rbp = 0x0000000146880f78   rsp = 0x0000000146880f60
06:44:11     INFO -     rip = 0x00007fff94e453ed
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO - 26  CoreAudio!HALB_Guard::WaitFor(unsigned long long) + 0xb6
06:44:11     INFO -     rsp = 0x0000000146881030   rip = 0x00007fff8b449446
06:44:11     INFO -     Found by: stack scanning
06:44:11     INFO - 
06:44:11     INFO - Thread 41
06:44:11     INFO -  0  libsystem_kernel.dylib!__psynch_mutexwait + 0xa
06:44:11     INFO -     rax = 0x000000000200012d   rdx = 0x0000000000002b00
06:44:11     INFO -     rcx = 0x00000001468c32f8   rbx = 0x0000000000002d03
06:44:11     INFO -     rsi = 0x0000000000002d03   rdi = 0x000000011f491528
06:44:11     INFO -     rbp = 0x00000001468c3380   rsp = 0x00000001468c32f8
06:44:11     INFO -      r8 = 0x0000000000002060    r9 = 0x00000001248eb840
06:44:11     INFO -     r10 = 0x00000000000021f4   r11 = 0x0000000000000246
06:44:11     INFO -     r12 = 0x000000011f491540   r13 = 0x0000000000002d03
06:44:11     INFO -     r14 = 0x0000000000002b00   r15 = 0x000000011f491528
06:44:11     INFO -     rip = 0x00007fff9986e166
06:44:11     INFO -     Found by: given as instruction pointer in context
06:44:11     INFO -  1  CoreAudio!HALB_Mutex::Lock() + 0x2b
06:44:11     INFO -     rbp = 0x00000001468c33a0   rsp = 0x00000001468c3390
06:44:11     INFO -     rip = 0x00007fff8b421a5b
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO -  2  CoreAudio!HALC_ProxyIOContext::CreateIOProcID(int (*)(unsigned int, AudioTimeStamp const*, AudioBufferList const*, AudioTimeStamp const*, AudioBufferList*, AudioTimeStamp const*, void*), void*, int (*&)(unsigned int, AudioTimeStamp const*, AudioBufferList const*, AudioTimeStamp const*, AudioBufferList*, AudioTimeStamp const*, void*)) + 0x38
06:44:11     INFO -     rbp = 0x00000001468c3440   rsp = 0x00000001468c33b0
06:44:11     INFO -     rip = 0x00007fff8b447352
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO -  3  CoreAudio!HALC_ShellDevice::CreateIOProcID(int (*)(unsigned int, AudioTimeStamp const*, AudioBufferList const*, AudioTimeStamp const*, AudioBufferList*, AudioTimeStamp const*, void*), void*, int (*&)(unsigned int, AudioTimeStamp const*, AudioBufferList const*, AudioTimeStamp const*, AudioBufferList*, AudioTimeStamp const*, void*)) + 0x49
06:44:11     INFO -     rbp = 0x00000001468c3470   rsp = 0x00000001468c3450
06:44:11     INFO -     rip = 0x00007fff8b4472eb
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO -  4  CoreAudio!HAL_HardwarePlugIn_DeviceCreateIOProcID(AudioHardwarePlugInInterface**, unsigned int, int (*)(unsigned int, AudioTimeStamp const*, AudioBufferList const*, AudioTimeStamp const*, AudioBufferList*, AudioTimeStamp const*, void*), void*, int (**)(unsigned int, AudioTimeStamp const*, AudioBufferList const*, AudioTimeStamp const*, AudioBufferList*, AudioTimeStamp const*, void*)) + 0x83
06:44:11     INFO -     rbp = 0x00000001468c34b0   rsp = 0x00000001468c3480
06:44:11     INFO -     rip = 0x00007fff8b45811c
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO -  5  CoreAudio!HALPlugIn::DeviceCreateIOProcID(HALObject const&, int (*)(unsigned int, AudioTimeStamp const*, AudioBufferList const*, AudioTimeStamp const*, AudioBufferList*, AudioTimeStamp const*, void*), void*, int (*&)(unsigned int, AudioTimeStamp const*, AudioBufferList const*, AudioTimeStamp const*, AudioBufferList*, AudioTimeStamp const*, void*)) + 0x41
06:44:11     INFO -     rbp = 0x00000001468c3500   rsp = 0x00000001468c34c0
06:44:11     INFO -     rip = 0x00007fff8b44713f
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO -  6  CoreAudio!HALDevice::CreateIOProcID(int (*)(unsigned int, AudioTimeStamp const*, AudioBufferList const*, AudioTimeStamp const*, AudioBufferList*, AudioTimeStamp const*, void*), void*) + 0x36
06:44:11     INFO -     rbp = 0x00000001468c3520   rsp = 0x00000001468c3510
06:44:11     INFO -     rip = 0x00007fff8b4470f4
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO -  7  CoreAudio!AudioDeviceCreateIOProcID + 0xb5
06:44:11     INFO -     rbp = 0x00000001468c3560   rsp = 0x00000001468c3530
06:44:11     INFO -     rip = 0x00007fff8b446f65
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO -  8  CoreAudio + 0xbc72
06:44:11     INFO -     rbp = 0x00000001468c3710   rsp = 0x00000001468c3570
06:44:11     INFO -     rip = 0x000000016030bc72
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO -  9  CoreAudio + 0xafb6
06:44:11     INFO -     rbp = 0x00000001468c3770   rsp = 0x00000001468c3720
06:44:11     INFO -     rip = 0x000000016030afb6
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO - 10  CoreAudio + 0x35311
06:44:11     INFO -     rbp = 0x00000001468c3790   rsp = 0x00000001468c3780
06:44:11     INFO -     rip = 0x0000000160335311
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO - 11  CoreAudio + 0x36361
06:44:11     INFO -     rbp = 0x00000001468c37c0   rsp = 0x00000001468c37a0
06:44:11     INFO -     rip = 0x0000000160336361
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO - 12  AudioToolbox!APComponent::NewInstance(ComponentInstanceRecord*&) + 0x1ab
06:44:11     INFO -     rbp = 0x00000001468c3830   rsp = 0x00000001468c37d0
06:44:11     INFO -     rip = 0x00007fff966a5107
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO - 13  AudioToolbox!_AT_AudioComponentInstanceNew + 0x6b
06:44:11     INFO -     rbp = 0x00000001468c3890   rsp = 0x00000001468c3840
06:44:11     INFO -     rip = 0x00007fff966a4c97
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO - 14  XUL!audiounit_get_channel_layout [cubeb_audiounit.cpp:a3faba8c3991 : 1251 + 0x8]
06:44:11     INFO -     rbp = 0x00000001468c3900   rsp = 0x00000001468c38a0
06:44:11     INFO -     rip = 0x000000010fe61060
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO - 15  XUL!audiounit_get_preferred_channel_layout [cubeb_audiounit.cpp:a3faba8c3991 : 1067 + 0x7]
06:44:11     INFO -     rbx = 0x00000001122934a0   rbp = 0x00000001468c3920
06:44:11     INFO -     rsp = 0x00000001468c3910   r12 = 0xf000faa13ef29d83
06:44:11     INFO -     r14 = 0x0000000000000002   r15 = 0x00000001242c93f8
06:44:11     INFO -     rip = 0x000000010fe5f010
06:44:11     INFO -     Found by: call frame info
06:44:11     INFO - 16  XUL!mozilla::CubebUtils::PreferredChannelMap(unsigned int) [CubebUtils.cpp:a3faba8c3991 : 234 + 0xf]
06:44:11     INFO -     rbx = 0x000000012d068470   rbp = 0x00000001468c39a0
06:44:11     INFO -     rsp = 0x00000001468c3930   r12 = 0xf000faa13ef29d83
06:44:11     INFO -     r14 = 0x0000000000000002   r15 = 0x00000001242c93f8
06:44:11     INFO -     rip = 0x000000010e905889
06:44:11     INFO -     Found by: call frame info
06:44:11     INFO - 17  XUL!mozilla::media::DecodedAudioDataSink::InitializeAudioStream(mozilla::media::MediaSink::PlaybackParams const&) [AudioStream.h:a3faba8c3991 : 230 + 0x5]
06:44:11     INFO -     rbx = 0x000000012d068470   rbp = 0x00000001468c39d0
06:44:11     INFO -     rsp = 0x00000001468c39b0   r12 = 0x000000012fdbf400
06:44:11     INFO -     r13 = 0x00000001121c3218   r14 = 0x00000001242c93f8
06:44:11     INFO -     r15 = 0x00000001242c93f8   rip = 0x000000010ea4f6ec
06:44:11     INFO -     Found by: call frame info
06:44:11     INFO - 18  XUL!mozilla::media::DecodedAudioDataSink::Init(mozilla::media::MediaSink::PlaybackParams const&) [DecodedAudioDataSink.cpp:a3faba8c3991 : 100 + 0xb]
06:44:11     INFO -     rbx = 0x000000012fdbf400   rbp = 0x00000001468c3a30
06:44:11     INFO -     rsp = 0x00000001468c39e0   r12 = 0x0000000118888280
06:44:11     INFO -     r13 = 0x00000001121c3218   r14 = 0x00000001468c3a48
06:44:11     INFO -     r15 = 0x00000001242c93f8   rip = 0x000000010ea4e9cc
06:44:11     INFO -     Found by: call frame info
06:44:11     INFO - 19  XUL!mozilla::media::AudioSinkWrapper::Start(long long, mozilla::MediaInfo const&) [AudioSinkWrapper.cpp:a3faba8c3991 : 194 + 0x2]
06:44:11     INFO -     rbx = 0x00000001247a6270   rbp = 0x00000001468c3a70
06:44:11     INFO -     rsp = 0x00000001468c3a40   r12 = 0x0000000130893cc0
06:44:11     INFO -     r13 = 0x00000001121c3218   r14 = 0x00000001242c93c0
06:44:11     INFO -     r15 = 0x0000000000000000   rip = 0x000000010ea4df72
06:44:11     INFO -     Found by: call frame info
06:44:11     INFO - 20  XUL!mozilla::media::VideoSink::Start(long long, mozilla::MediaInfo const&) [VideoSink.cpp:a3faba8c3991 : 171 + 0xc]
06:44:11     INFO -     rbx = 0x000000011221cc90   rbp = 0x00000001468c3ab0
06:44:11     INFO -     rsp = 0x00000001468c3a80   r12 = 0x0000000130893cc0
06:44:11     INFO -     r13 = 0x00000001121c3218   r14 = 0x00000001247a6270
06:44:11     INFO -     r15 = 0x0000000000000000   rip = 0x000000010ea54304
06:44:11     INFO -     Found by: call frame info
06:44:11     INFO - 21  XUL!mozilla::MediaDecoderStateMachine::StartMediaSink() [MediaDecoderStateMachine.cpp:a3faba8c3991 : 3207 + 0x3]
06:44:11     INFO -     rbx = 0x00000001247a6000   rbp = 0x00000001468c3af0
06:44:11     INFO -     rsp = 0x00000001468c3ac0   r12 = 0xf000faa13ef29d83
06:44:11     INFO -     r13 = 0x00000001121c3218   r14 = 0x0000000000000003
06:44:11     INFO -     r15 = 0x00000001247a6000   rip = 0x000000010e94ca2e
06:44:11     INFO -     Found by: call frame info
06:44:11     INFO - 22  XUL!mozilla::MediaDecoderStateMachine::MaybeStartPlayback() [MediaDecoderStateMachine.cpp:a3faba8c3991 : 2861 + 0x8]
06:44:11     INFO -     rbx = 0x00000001247a6000   rbp = 0x00000001468c3b20
06:44:11     INFO -     rsp = 0x00000001468c3b00   r12 = 0xf000faa13ef29d83
06:44:11     INFO -     r13 = 0x00000001121c3218   r14 = 0x0000000000000003
06:44:11     INFO -     r15 = 0x000000012eb49550   rip = 0x000000010e94c92d
06:44:11     INFO -     Found by: call frame info
06:44:11     INFO - 23  XUL!mozilla::MediaDecoderStateMachine::DecodingState::Step() [MediaDecoderStateMachine.cpp:a3faba8c3991 : 666 + 0x9]
06:44:11     INFO -     rbx = 0x000000012e219b00   rbp = 0x00000001468c3b40
06:44:11     INFO -     rsp = 0x00000001468c3b30   r12 = 0xf000faa13ef29d83
06:44:11     INFO -     r13 = 0x00000001121c3218   r14 = 0x000000012eb49730
06:44:11     INFO -     r15 = 0x000000012eb49550   rip = 0x000000010e94f923
06:44:11     INFO -     Found by: call frame info
06:44:11     INFO - 24  XUL!mozilla::detail::RunnableMethodImpl<mozilla::MediaDecoderStateMachine *, void (mozilla::MediaDecoderStateMachine::*)(), true, false>::Run [nsThreadUtils.h:a3faba8c3991 : 832 + 0x17]
06:44:11     INFO -     rbx = 0x0000000000000000   rbp = 0x00000001468c3b50
06:44:11     INFO -     rsp = 0x00000001468c3b50   r12 = 0xf000faa13ef29d83
06:44:11     INFO -     r13 = 0x00000001121c3218   r14 = 0x000000012eb49730
06:44:11     INFO -     r15 = 0x000000012eb49550   rip = 0x000000010e97a6a7
06:44:11     INFO -     Found by: call frame info
06:44:11     INFO - 25  XUL!mozilla::AutoTaskDispatcher::TaskGroupRunnable::Run() [TaskDispatcher.h:a3faba8c3991 : 193 + 0x6]
06:44:11     INFO -     rbx = 0x0000000000000000   rbp = 0x00000001468c3b70
06:44:11     INFO -     rsp = 0x00000001468c3b60   r12 = 0xf000faa13ef29d83
06:44:11     INFO -     r13 = 0x00000001121c3218   r14 = 0x000000012eb49730
06:44:11     INFO -     r15 = 0x000000012eb49550   rip = 0x000000010cdfdb32
06:44:11     INFO -     Found by: call frame info
06:44:11     INFO - 26  XUL!mozilla::TaskQueue::Runner::Run() [TaskQueue.cpp:a3faba8c3991 : 232 + 0x9]
06:44:11     INFO -     rbx = 0x000000013073c620   rbp = 0x00000001468c3c10
06:44:11     INFO -     rsp = 0x00000001468c3b80   r12 = 0xf000faa13ef29d83
06:44:11     INFO -     r13 = 0x00000001121c3218   r14 = 0x000000012eb49730
06:44:11     INFO -     r15 = 0x000000012eb49550   rip = 0x000000010cdf8e7a
06:44:11     INFO -     Found by: call frame info
06:44:11     INFO - 27  XUL!nsThreadPool::Run() [nsThreadPool.cpp:a3faba8c3991 : 225 + 0x6]
06:44:11     INFO -     rbx = 0x00000001389a73b8   rbp = 0x00000001468c3cb0
06:44:11     INFO -     rsp = 0x00000001468c3c20   r12 = 0x0000000000000000
06:44:11     INFO -     r13 = 0x00000001468c3c68   r14 = 0x00000001389a73a0
06:44:11     INFO -     r15 = 0x00000001468c3c70   rip = 0x000000010ce07c9b
06:44:11     INFO -     Found by: call frame info
06:44:11     INFO - 28  XUL!non-virtual thunk to nsThreadPool::Run() [nsThreadPool.cpp:a3faba8c3991 : 154 + 0x9]
06:44:11     INFO -     rbx = 0x00000001468c3d20   rbp = 0x00000001468c3cc0
06:44:11     INFO -     rsp = 0x00000001468c3cc0   r12 = 0x000000013438de10
06:44:11     INFO -     r13 = 0x0000000080460001   r14 = 0x00000001468c3da7
06:44:11     INFO -     r15 = 0x000000013438dde0   rip = 0x000000010ce07dbd
06:44:11     INFO -     Found by: call frame info
06:44:11     INFO - 29  XUL!nsThread::ProcessNextEvent(bool, bool*) [nsThread.cpp:a3faba8c3991 : 1261 + 0x6]
06:44:11     INFO -     rbx = 0x00000001468c3d20   rbp = 0x00000001468c3d90
06:44:11     INFO -     rsp = 0x00000001468c3cd0   r12 = 0x000000013438de10
06:44:11     INFO -     r13 = 0x0000000080460001   r14 = 0x00000001468c3da7
06:44:11     INFO -     r15 = 0x000000013438dde0   rip = 0x000000010ce05693
06:44:11     INFO -     Found by: call frame info
06:44:11     INFO - 30  XUL!NS_ProcessNextEvent(nsIThread*, bool) [nsThreadUtils.cpp:a3faba8c3991 : 389 + 0x11]
06:44:11     INFO -     rbx = 0x000000011f504560   rbp = 0x00000001468c3dc0
06:44:11     INFO -     rsp = 0x00000001468c3da0   r12 = 0x00000001468c3d00
06:44:11     INFO -     r13 = 0x00000001215d8920   r14 = 0x0000000000000001
06:44:11     INFO -     r15 = 0x000000013438dde0   rip = 0x000000010ce046e5
06:44:11     INFO -     Found by: call frame info
06:44:11     INFO - 31  XUL!mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) [MessagePump.cpp:a3faba8c3991 : 368 + 0xd]
06:44:11     INFO -     rbx = 0x000000011f504560   rbp = 0x00000001468c3e20
06:44:11     INFO -     rsp = 0x00000001468c3dd0   r12 = 0x00000001468c3d00
06:44:11     INFO -     r13 = 0x00000001215d8920   r14 = 0x00000001215d8900
06:44:11     INFO -     r15 = 0x000000013438dde0   rip = 0x000000010d37829a
06:44:11     INFO -     Found by: call frame info
06:44:11     INFO - 32  XUL!MessageLoop::Run() [message_loop.cc:a3faba8c3991 : 238 + 0x8]
06:44:11     INFO -     rbx = 0x000000013438dde0   rbp = 0x00000001468c3e50
06:44:11     INFO -     rsp = 0x00000001468c3e30   r12 = 0x0000000000014901
06:44:11     INFO -     r13 = 0x000000013438ddf8   r14 = 0x000000011f504560
06:44:11     INFO -     r15 = 0x00000001468c3e90   rip = 0x000000010d310f39
06:44:11     INFO -     Found by: call frame info
06:44:11     INFO - 33  XUL!nsThread::ThreadFunc(void*) [nsThread.cpp:a3faba8c3991 : 494 + 0x8]
06:44:11     INFO -     rbx = 0x000000013438dde0   rbp = 0x00000001468c3ec0
06:44:11     INFO -     rsp = 0x00000001468c3e60   r12 = 0x0000000000014901
06:44:11     INFO -     r13 = 0x000000013438ddf8   r14 = 0x000000011f504560
06:44:11     INFO -     r15 = 0x00000001468c3e90   rip = 0x000000010ce035ef
06:44:11     INFO -     Found by: call frame info
06:44:11     INFO - 34  libnss3.dylib!_pt_root [ptthread.c:a3faba8c3991 : 216 + 0x3]
06:44:11     INFO -     rbx = 0x000000011f43b5e0   rbp = 0x00000001468c3ef0
06:44:11     INFO -     rsp = 0x00000001468c3ed0   r12 = 0x0000000000014913
06:44:11     INFO -     r13 = 0x00000000000008ff   r14 = 0x00000001468c4000
06:44:11     INFO -     r15 = 0x0000000000000000   rip = 0x000000010ca3848a
06:44:11     INFO -     Found by: call frame info
06:44:11     INFO - 35  libsystem_pthread.dylib!_pthread_body + 0x83
06:44:11     INFO -     rbx = 0x00000001468c4000   rbp = 0x00000001468c3f10
06:44:11     INFO -     rsp = 0x00000001468c3f00   r12 = 0x0000000000014913
06:44:11     INFO -     r13 = 0x00000000000008ff   r14 = 0x000000011f43b5e0
06:44:11     INFO -     r15 = 0x000000010ca383b0   rip = 0x00007fff94e4805a
06:44:11     INFO -     Found by: call frame info
06:44:11     INFO - 36  libsystem_pthread.dylib!_pthread_start + 0xb0
06:44:11     INFO -     rbp = 0x00000001468c3f50   rsp = 0x00000001468c3f20
06:44:11     INFO -     rip = 0x00007fff94e47fd7
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO - 37  libsystem_pthread.dylib!thread_start + 0xd
06:44:11     INFO -     rbp = 0x00000001468c3f78   rsp = 0x00000001468c3f60
06:44:11     INFO -     rip = 0x00007fff94e453ed
06:44:11     INFO -     Found by: previous frame's frame pointer
06:44:11     INFO - 38  libnss3.dylib + 0x1383b0
06:44:11     INFO -     rsp = 0x00000001468c4030   rip = 0x000000010ca383b0
06:44:11     INFO -     Found by: stack scanning
Flags: needinfo?(cchang)
See Also: → 1321502
Backed out for frequently failing test_conformance__textures__video__tex-2d-rgba-rgba-unsigned_byte.html:

https://hg.mozilla.org/integration/autoland/rev/e0ec9e19af0e0275417628c7d8e850a7a6dfa96f

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=a3faba8c399138e0f90ab561ee1dc533ebbffa23&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=usercancel&filter-resultStatus=runnable
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=75944851&repo=autoland

TEST-UNEXPECTED-FAIL | dom/canvas/test/webgl-conf/generated/test_conformance__textures__misc__texture-upload-size.html | Test timed out.
TEST-UNEXPECTED-FAIL | (SimpleTest/TestRunner.js) | /tests/dom/canvas/test/webgl-conf/generated/test_conformance__textures__video__tex-2d-rgba-rgba-unsigned_byte.html - finished in a non-clean fashion, probably because it didn't call SimpleTest.finish()
TEST-UNEXPECTED-FAIL | (SimpleTest/TestRunner.js) | undefined assertion name - Result logged after SimpleTest.finish()
FATAL ERROR: AsyncShutdown timeout in profile-before-change Conditions: [{"name":"MediaShutdownManager: shutdown","state":"(none)","filename":"/builds/slave/autoland-m64-00000000000000000/build/src/dom/media/MediaShutdownManager.cpp","lineNumber":74,"stack":"MediaShutdownManager shutdown"}] At least one completion condition failed to complete within a reasonable amount of time. Causing a crash to ensure that we do not leave the user with an unresponsive process draining resou
Thanks for looping me in. 
I tried to reproduce it on my OSX 10.12 by the following command:

./mach mochitest dom/canvas/test/webgl-conf/generated/test_conformance__textures__misc__texture-upload-size.html

but it didn't work. I'll try another way. 

audiounit_get_channel_layout will be called at [0,1,2,3], I will look at what happens there.

[0] http://searchfox.org/mozilla-central/rev/672c83ed65da286b68be1d02799c35fdd14d0134/dom/media/mediasink/DecodedAudioDataSink.cpp#204
[1] http://searchfox.org/mozilla-central/rev/afcf40f3eafd895611a839017730debb58a342a6/dom/media/AudioStream.h#228
[2] http://searchfox.org/mozilla-central/rev/afcf40f3eafd895611a839017730debb58a342a6/dom/media/CubebUtils.cpp#239
[3] http://searchfox.org/mozilla-central/rev/afcf40f3eafd895611a839017730debb58a342a6/dom/media/CubebUtils.cpp#234
Flags: needinfo?(cchang)
(In reply to Chun-Min Chang[:chunmin] from comment #7)
I could reproduce it now by using lldb to add breakpoint at audiounit_get_channel_layout. I guess it's a race condition issue. It always get stuck in

audiounit_create_unit(..)
...
rv = AudioComponentInstanceNew(comp, unit); <-- stuck here
Comment on attachment 8836005 [details]
Bug 1337805 - Avoid deadlock in AudioStream::DataCallback.

https://reviewboard.mozilla.org/r/111528/#review112844

::: dom/media/CubebUtils.cpp:239
(Diff revision 1)
>    if (!context) {
>      return false;
>    }
> -  return cubeb_get_preferred_channel_layout(context,
> -                                            &sPreferredChannelLayout) == CUBEB_OK
> -         ? true : false;
> +
> +  // Cubeb call if prompt to deadlock (mainly in audiounit)
> +  // therefore prefer to call it with sMutex unlock.

Can you rewrite the comment? It's unclear what it means right now. 

Maybe we should document this API call, saying that no other lock should be taken when calling this ?
Attachment #8836005 - Flags: review?(padenot) → review+
Pushed by achronop@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/2c6b2fd2235e
Update cubeb from upstream 21e96ac. r=padenot
https://hg.mozilla.org/integration/autoland/rev/7bdff2fe5052
Avoid deadlock in AudioStream::DataCallback. r=padenot
https://hg.mozilla.org/mozilla-central/rev/2c6b2fd2235e
https://hg.mozilla.org/mozilla-central/rev/7bdff2fe5052
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
Duplicate of this bug: 1337261
Depends on: 1358868
You need to log in before you can comment on or make changes to this bug.