Skip to content

Instantly share code, notes, and snippets.

@kolen
Created August 3, 2017 22:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kolen/d75adef899ef44d05495986835565f1f to your computer and use it in GitHub Desktop.
Save kolen/d75adef899ef44d05495986835565f1f to your computer and use it in GitHub Desktop.
cmus freezes on mac os, coreaudio-related
(lldb) bt all
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
* frame #0: 0x0000000100520c22 libsystem_kernel.dylib`__psynch_mutexwait + 10
frame #1: 0x0000000100679dfa libsystem_pthread.dylib`_pthread_mutex_lock_wait + 100
frame #2: 0x00007fff8c485f60 CoreAudio`HALB_Mutex::Lock() + 72
frame #3: 0x00007fff8c4a389b CoreAudio`HALC_ProxyIOContext::GetPropertyData(AudioObjectPropertyAddress const&, unsigned int, void const*, unsigned int, unsigned int&, void*) const + 737
frame #4: 0x00007fff8c49eaae CoreAudio`HALC_ShellObject::GetPropertyData(unsigned int, AudioObjectPropertyAddress const&, unsigned int, void const*, unsigned int, unsigned int&, void*) const + 1200
frame #5: 0x00007fff8c49e284 CoreAudio`HAL_HardwarePlugIn_ObjectGetPropertyData(AudioHardwarePlugInInterface**, unsigned int, AudioObjectPropertyAddress const*, unsigned int, void const*, unsigned int*, void*) + 232
frame #6: 0x00007fff8c49dfeb CoreAudio`HALPlugIn::ObjectGetPropertyData(HALObject const&, AudioObjectPropertyAddress const&, unsigned int, void const*, unsigned int&, void*) const + 71
frame #7: 0x00007fff8c4963c9 CoreAudio`HALObject::GetPropertyData(AudioObjectPropertyAddress const&, unsigned int, void const*, unsigned int&, void*) const + 449
frame #8: 0x00007fff8c4a478b CoreAudio`HALDevice::GetPropertyData(AudioObjectPropertyAddress const&, unsigned int, void const*, unsigned int&, void*) const + 661
frame #9: 0x00007fff8c4c43c3 CoreAudio`AudioDeviceGetProperty + 238
frame #10: 0x00000001038c0fa8 CoreAudio`AUHAL::GetProperty(unsigned int, unsigned int, unsigned int, void*) + 348
frame #11: 0x00000001039ceca0 CoreAudio`AUMethodGetProperty(void*, unsigned int, unsigned int, unsigned int, void*, unsigned int*) + 207
frame #12: 0x000000010064a0c8 libmacosx.so`ao_plugin_close + 321
frame #13: 0x000000010091e6b0 libao.4.dylib`ao_close + 28
frame #14: 0x000000010059bb4c ao.so`op_ao_close + 16
frame #15: 0x00000001002e3fd6 cmus`_consumer_stop + 27
frame #16: 0x00000001002e48d0 cmus`player_play_file + 95
frame #17: 0x00000001002d10a9 cmus`run_command + 47
frame #18: 0x00000001002ef2ce cmus`main + 4703
frame #19: 0x00000001003a6235 libdyld.dylib`start + 1
frame #20: 0x00000001003a6235 libdyld.dylib`start + 1
thread #2
frame #0: 0x0000000100520c22 libsystem_kernel.dylib`__psynch_mutexwait + 10
frame #1: 0x0000000100679dfa libsystem_pthread.dylib`_pthread_mutex_lock_wait + 100
frame #2: 0x00000001002deb28 cmus`cmus_mutex_lock + 9
frame #3: 0x00000001002e2f72 cmus`producer_loop + 374
frame #4: 0x000000010067993b libsystem_pthread.dylib`_pthread_body + 180
frame #5: 0x0000000100679887 libsystem_pthread.dylib`_pthread_start + 286
frame #6: 0x000000010067908d libsystem_pthread.dylib`thread_start + 13
thread #3
frame #0: 0x0000000100520c22 libsystem_kernel.dylib`__psynch_mutexwait + 10
frame #1: 0x0000000100679dfa libsystem_pthread.dylib`_pthread_mutex_lock_wait + 100
frame #2: 0x00000001002deb28 cmus`cmus_mutex_lock + 9
frame #3: 0x00000001002e3ddb cmus`consumer_loop + 3641
frame #4: 0x000000010067993b libsystem_pthread.dylib`_pthread_body + 180
frame #5: 0x0000000100679887 libsystem_pthread.dylib`_pthread_start + 286
frame #6: 0x000000010067908d libsystem_pthread.dylib`thread_start + 13
thread #4
frame #0: 0x0000000100520bf2 libsystem_kernel.dylib`__psynch_cvwait + 10
frame #1: 0x000000010067a7fa libsystem_pthread.dylib`_pthread_cond_wait + 712
frame #2: 0x00000001002f209e cmus`worker_loop + 254
frame #3: 0x000000010067993b libsystem_pthread.dylib`_pthread_body + 180
frame #4: 0x0000000100679887 libsystem_pthread.dylib`_pthread_start + 286
frame #5: 0x000000010067908d libsystem_pthread.dylib`thread_start + 13
thread #5, name = 'com.apple.audio.IOThread.client'
frame #0: 0x0000000100520c22 libsystem_kernel.dylib`__psynch_mutexwait + 10
frame #1: 0x0000000100679dfa libsystem_pthread.dylib`_pthread_mutex_lock_wait + 100
frame #2: 0x0000000100649b74 libmacosx.so`audioCallback + 63
frame #3: 0x00000001039c5ea5 CoreAudio`AUInputElement::PullInput(unsigned int&, AudioTimeStamp const&, unsigned int, unsigned int) + 185
frame #4: 0x00000001038bc858 CoreAudio`AUInputFormatConverter2::InputProc(OpaqueAudioConverter*, unsigned int*, AudioBufferList*, AudioStreamPacketDescription**, void*) + 196
frame #5: 0x00007fff8b7615ab AudioToolbox`AudioConverterChain::CallInputProc(unsigned int) + 415
frame #6: 0x00007fff8b761308 AudioToolbox`AudioConverterChain::FillBufferFromInputProc(unsigned int*, CABufferList*) + 130
frame #7: 0x00007fff8b76126c AudioToolbox`BufferedAudioConverter::GetInputBytes(unsigned int, unsigned int&, CABufferList const*&) + 178
frame #8: 0x00007fff8b761130 AudioToolbox`CBRConverter::RenderOutput(CABufferList*, unsigned int, unsigned int&, AudioStreamPacketDescription*) + 106
frame #9: 0x00007fff8b75476d AudioToolbox`BufferedAudioConverter::FillBuffer(unsigned int&, AudioBufferList&, AudioStreamPacketDescription*) + 281
frame #10: 0x00007fff8b754a31 AudioToolbox`AudioConverterChain::RenderOutput(CABufferList*, unsigned int, unsigned int&, AudioStreamPacketDescription*) + 99
frame #11: 0x00007fff8b75476d AudioToolbox`BufferedAudioConverter::FillBuffer(unsigned int&, AudioBufferList&, AudioStreamPacketDescription*) + 281
frame #12: 0x00007fff8b75423e AudioToolbox`AudioConverterFillComplexBuffer + 282
frame #13: 0x00000001038bc30f CoreAudio`AUInputFormatConverter2::PullAndConvertInput(AudioTimeStamp const&, unsigned int&, AudioBufferList&, AudioStreamPacketDescription*, bool&) + 107
frame #14: 0x00000001038bc158 CoreAudio`AUConverterBase::RenderBus(unsigned int&, AudioTimeStamp const&, unsigned int, unsigned int) + 580
frame #15: 0x00000001039c9034 CoreAudio`AUBase::DoRenderBus(unsigned int&, AudioTimeStamp const&, unsigned int, AUOutputElement*, unsigned int, AudioBufferList&) + 154
frame #16: 0x00000001039c8d34 CoreAudio`AUBase::DoRender(unsigned int&, AudioTimeStamp const&, unsigned int, unsigned int, AudioBufferList&) + 504
frame #17: 0x00000001038bf28e CoreAudio`AUHAL::AUIOProc(unsigned int, AudioTimeStamp const*, AudioBufferList const*, AudioTimeStamp const*, AudioBufferList*, AudioTimeStamp const*, void*) + 1814
frame #18: 0x00007fff8c4bf8ce CoreAudio`HALC_ProxyIOContext::IOWorkLoop() + 5290
frame #19: 0x00007fff8c4be264 CoreAudio`HALC_ProxyIOContext::IOThreadEntry(void*) + 128
frame #20: 0x00007fff8c4bdfa3 CoreAudio`HALB_IOThread::Entry(void*) + 75
frame #21: 0x000000010067993b libsystem_pthread.dylib`_pthread_body + 180
frame #22: 0x0000000100679887 libsystem_pthread.dylib`_pthread_start + 286
frame #23: 0x000000010067908d libsystem_pthread.dylib`thread_start + 13
thread #6
frame #0: 0x000000010052144e libsystem_kernel.dylib`__workq_kernreturn + 10
frame #1: 0x000000010067948e libsystem_pthread.dylib`_pthread_wqthread + 1023
frame #2: 0x000000010067907d libsystem_pthread.dylib`start_wqthread + 13
@AgoraBeck
Copy link

frame #2: 0x00007fff8c485f60 CoreAudio`HALB_Mutex::Lock() + 72  deadlock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment