Skip to content

Mono 6.12.0 deadlocks in Garbage Collection #21582

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
ylatuya opened this issue Nov 14, 2022 · 2 comments
Closed

Mono 6.12.0 deadlocks in Garbage Collection #21582

ylatuya opened this issue Nov 14, 2022 · 2 comments

Comments

@ylatuya
Copy link
Contributor

ylatuya commented Nov 14, 2022

Steps to Reproduce

I can reproduce it in an Avalonia app using GStreamer but I don't have a way to reproduce it in a sample project.

Current Behavior

Mono hangs in garbage collection

Expected Behavior

Mono does not hangs

On which platforms did you notice this

[ x] macOS
[ ] Linux
[ ] Windows

Version Used:

Mono JIT compiler version 6.12.0.188 (2020-02/ca8abcb6bc4 Thu Oct 13 14:26:22 EDT 2022)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           
        SIGSEGV:       altstack
        Notification:  kqueue
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug 
        Interpreter:   yes
        LLVM:          yes(610)
        Suspend:       hybrid
        GC:            sgen (concurrent by default)

Stacktrace

* thread #1
  * frame #0: 0x00007ff803bb49b6 libsystem_kernel.dylib`semaphore_wait_trap + 10
    frame #1: 0x000000010565bef9 mono-sgen64`mono_os_sem_timedwait [inlined] mono_os_sem_wait at mono-os-semaphore.h:84:8 [opt]
    frame #2: 0x000000010565bef0 mono-sgen64`mono_os_sem_timedwait(sem=<unavailable>, timeout_ms=<unavailable>, flags=MONO_SEM_FLAGS_NONE) at mono-os-semaphore.h:103 [opt]
    frame #3: 0x000000010565b9b5 mono-sgen64`mono_threads_wait_pending_operations at mono-threads.c:319:8 [opt]
    frame #4: 0x00000001055fb123 mono-sgen64`sgen_client_stop_world at sgen-stw.c:306:3 [opt]
    frame #5: 0x00000001055fb10f mono-sgen64`sgen_client_stop_world(generation=0, serial_collection=0) at sgen-stw.c:124 [opt]
    frame #6: 0x000000010560e4e6 mono-sgen64`sgen_stop_world(generation=0, serial_collection=0) at sgen-gc.c:3871:2 [opt]
    frame #7: 0x000000010560b14d mono-sgen64`sgen_perform_collection [inlined] sgen_perform_collection_inner at sgen-gc.c:2566:3 [opt]
    frame #8: 0x000000010560b0e5 mono-sgen64`sgen_perform_collection(requested_size=2168, generation_to_collect=0, reason="Nursery full", forced_serial=0, stw=1) at sgen-gc.c:2679 [opt]
    frame #9: 0x000000010560b097 mono-sgen64`sgen_ensure_free_space(size=2168, generation=<unavailable>) at sgen-gc.c:2545:2 [opt]
    frame #10: 0x0000000105600e0d mono-sgen64`sgen_alloc_obj_nolock(vtable=0x00007fb8da30c4c0, size=2168) at sgen-alloc.c:258:6 [opt]
    frame #11: 0x00000001055fd7d1 mono-sgen64`mono_gc_alloc_vector(vtable=0x00007fb8da30c4c0, size=2168, max_length=89) at sgen-mono.c:1322:20 [opt]
    frame #12: 0x105b42636 (wrapper managed-to-native) object:__icall_wrapper_mono_gc_alloc_vector (intptr,intptr,intptr) [{0x7fb8cf043888} + 0xc6]  (0x105b42570 0x105b4270a) [0x7fb8ceb042d0 - LongoMatch.exe]

  thread #2
    frame #0: 0x00007ff803bb73ea libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007ff803bf1a6f libsystem_pthread.dylib`_pthread_cond_wait + 1249
    frame #2: 0x0000000105641b1e mono-sgen64`thread_func [inlined] mono_os_cond_wait(mutex=<unavailable>) at mono-os-mutex.h:219:8 [opt]
    frame #3: 0x0000000105641b0b mono-sgen64`thread_func at sgen-thread-pool.c:165 [opt]
    frame #4: 0x0000000105641afd mono-sgen64`thread_func(data=0x0000000000000000) at sgen-thread-pool.c:196 [opt]
    frame #5: 0x00007ff803bf14e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #6: 0x00007ff803becf6b libsystem_pthread.dylib`thread_start + 15

  thread #3
    frame #0: 0x00007ff803bb49b6 libsystem_kernel.dylib`semaphore_wait_trap + 10
    frame #1: 0x00000001055ee6da mono-sgen64`finalizer_thread [inlined] mono_os_sem_wait(flags=MONO_SEM_FLAGS_ALERTABLE) at mono-os-semaphore.h:84:8 [opt]
    frame #2: 0x00000001055ee6cf mono-sgen64`finalizer_thread at mono-coop-semaphore.h:41 [opt]
    frame #3: 0x00000001055ee6b5 mono-sgen64`finalizer_thread(unused=<unavailable>) at gc.c:965 [opt]
    frame #4: 0x00000001055acc4d mono-sgen64`start_wrapper [inlined] start_wrapper_internal at threads.c:1233:3 [opt]
    frame #5: 0x00000001055acc0a mono-sgen64`start_wrapper(data=0x00006000034989c0) at threads.c:1308 [opt]
    frame #6: 0x00007ff803bf14e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #7: 0x00007ff803becf6b libsystem_pthread.dylib`thread_start + 15

  thread #4
    frame #0: 0x00007ff803bb49b6 libsystem_kernel.dylib`semaphore_wait_trap + 10
    frame #1: 0x000000010565b808 mono-sgen64`mono_thread_info_wait_for_resume [inlined] mono_os_sem_wait(flags=MONO_SEM_FLAGS_NONE) at mono-os-semaphore.h:84:8 [opt]
    frame #2: 0x000000010565b7f9 mono-sgen64`mono_thread_info_wait_for_resume(info=0x00007fb8cf820000) at mono-threads.c:233 [opt]
    frame #3: 0x0000000105661c18 mono-sgen64`mono_threads_exit_gc_safe_region_unbalanced_internal(cookie=0x00007fb8cf820000, stackdata=<unavailable>) at mono-threads-coop.c:391:3 [opt]
    frame #4: 0x00000001054cab0f mono-sgen64`socket_transport_recv(buf=2001-01-01 00:00:00 UTC, len=11) at debugger-agent.c:1178:2 [opt]
    frame #5: 0x00000001054b9406 mono-sgen64`debugger_thread [inlined] transport_recv(len=11) at debugger-agent.c:1578:9 [opt]
    frame #6: 0x00000001054b93cd mono-sgen64`debugger_thread(arg=<unavailable>) at debugger-agent.c:10196 [opt]
    frame #7: 0x00000001055acc4d mono-sgen64`start_wrapper [inlined] start_wrapper_internal at threads.c:1233:3 [opt]
    frame #8: 0x00000001055acc0a mono-sgen64`start_wrapper(data=0x0000600003498a40) at threads.c:1308 [opt]
    frame #9: 0x00007ff803bf14e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #10: 0x00007ff803becf6b libsystem_pthread.dylib`thread_start + 15

  thread #5
    frame #0: 0x00007ff803bb497a libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x00007ff803bb4ce8 libsystem_kernel.dylib`mach_msg + 56
    frame #2: 0x00007ff803cb7cdd CoreFoundation`__CFRunLoopServiceMachPort + 319
    frame #3: 0x00007ff803cb6368 CoreFoundation`__CFRunLoopRun + 1276
    frame #4: 0x00007ff803cb57ac CoreFoundation`CFRunLoopRunSpecific + 562
    frame #5: 0x00007ff806849f5e AppKit`_NSEventThread + 132
    frame #6: 0x00007ff803bf14e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #7: 0x00007ff803becf6b libsystem_pthread.dylib`thread_start + 15

  thread #6
    frame #0: 0x00007ff803bb49b6 libsystem_kernel.dylib`semaphore_wait_trap + 10
    frame #1: 0x000000010565b808 mono-sgen64`mono_thread_info_wait_for_resume [inlined] mono_os_sem_wait(flags=MONO_SEM_FLAGS_NONE) at mono-os-semaphore.h:84:8 [opt]
    frame #2: 0x000000010565b7f9 mono-sgen64`mono_thread_info_wait_for_resume(info=0x00007fb8d48bfc00) at mono-threads.c:233 [opt]
    frame #3: 0x0000000105661c18 mono-sgen64`mono_threads_exit_gc_safe_region_unbalanced_internal(cookie=0x00007fb8d48bfc00, stackdata=<unavailable>) at mono-threads-coop.c:391:3 [opt]
    frame #4: 0x00000001055b9516 mono-sgen64`mono_w32handle_timedwait_signal_handle at mono-coop-mutex.h:105:2 [opt]
    frame #5: 0x00000001055b94dc mono-sgen64`mono_w32handle_timedwait_signal_handle [inlined] mono_w32handle_timedwait_signal_naked(poll=0, alerted=<unavailable>) at w32handle.c:652 [opt]
    frame #6: 0x00000001055b94dc mono-sgen64`mono_w32handle_timedwait_signal_handle(handle_data=<unavailable>, timeout=<unavailable>, poll=0, alerted=<unavailable>) at w32handle.c:767 [opt]
    frame #7: 0x00000001055b93d1 mono-sgen64`mono_w32handle_wait_one(handle=<unavailable>, timeout=<unavailable>, alertable=<unavailable>) at w32handle.c:892:13 [opt]
    frame #8: 0x00000001055b9649 mono-sgen64`mono_w32handle_wait_multiple(handles=0x000070000e685860, nhandles=1, waitall=0, timeout=<unavailable>, alertable=1, error=0x000070000e685708) at w32handle.c:1002:10 [opt]
    frame #9: 0x00000001055a623d mono-sgen64`ves_icall_System_Threading_WaitHandle_Wait_internal(handles=<unavailable>, numhandles=<unavailable>, waitall=<unavailable>, timeout=-1, error=0x000070000e685708) at threads.c:2314:9 [opt]
    frame #10: 0x000000010553f308 mono-sgen64`ves_icall_System_Threading_WaitHandle_Wait_internal_raw(a0=0x000070000e685860, a1=1, a2='\0', a3=11) at icall-def.h:1100:1 [opt]
    frame #11: 0x0000000118f7f8f1
    frame #12: 0x0000000118f7f0db
    frame #13: 0x0000000118f7b4ba
    frame #14: 0x0000000118f79383
    frame #15: 0x0000000105372352 mono-sgen64`mono_jit_runtime_invoke(method=<unavailable>, obj=<unavailable>, params=0x000070000e685f68, exc=<unavailable>, error=<unavailable>) at mini-runtime.c:3217:12 [opt]
    frame #16: 0x0000000105581e07 mono-sgen64`mono_runtime_invoke_checked [inlined] do_runtime_invoke(method=<unavailable>, obj=0x0000000105fcff78, params=0x000070000e685f68, exc=<unavailable>, error=0x000070000e685f18) at object.c:3052:11 [opt]
    frame #17: 0x0000000105581dd2 mono-sgen64`mono_runtime_invoke_checked(method=0x00007fb8d4965980, obj=0x0000000105fcff78, params=0x000070000e685f68, error=0x000070000e685f18) at object.c:3220 [opt]
    frame #18: 0x0000000105588700 mono-sgen64`mono_runtime_delegate_try_invoke(delegate=0x0000000105fcff78, params=0x000070000e685f68, exc=0x0000000000000000, error=0x000070000e685f18) at object.c:4438:7 [opt]
    frame #19: 0x00000001055acc8d mono-sgen64`start_wrapper at threads.c:1255:3 [opt]
    frame #20: 0x00000001055acc0a mono-sgen64`start_wrapper(data=0x00006000034fa580) at threads.c:1308 [opt]
    frame #21: 0x00007ff803bf14e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #22: 0x00007ff803becf6b libsystem_pthread.dylib`thread_start + 15

  thread #7
    frame #0: 0x00007ff803bb49b6 libsystem_kernel.dylib`semaphore_wait_trap + 10
    frame #1: 0x000000010565b808 mono-sgen64`mono_thread_info_wait_for_resume [inlined] mono_os_sem_wait(flags=MONO_SEM_FLAGS_NONE) at mono-os-semaphore.h:84:8 [opt]
    frame #2: 0x000000010565b7f9 mono-sgen64`mono_thread_info_wait_for_resume(info=0x00007fb8d4a45c00) at mono-threads.c:233 [opt]
    frame #3: 0x0000000105661c18 mono-sgen64`mono_threads_exit_gc_safe_region_unbalanced_internal(cookie=0x00007fb8d4a45c00, stackdata=<unavailable>) at mono-threads-coop.c:391:3 [opt]
    frame #4: 0x000000010565e459 mono-sgen64`mono_thread_info_sleep at mono-coop-mutex.h:93:2 [opt]
    frame #5: 0x000000010565e419 mono-sgen64`mono_thread_info_sleep [inlined] sleep_interruptable(ms=<unavailable>, alerted=<unavailable>) at mono-threads.c:1643 [opt]
    frame #6: 0x000000010565e393 mono-sgen64`mono_thread_info_sleep(ms=500, alerted=<unavailable>) at mono-threads.c:1673 [opt]
    frame #7: 0x00000001054e4092 mono-sgen64`monitor_thread(unused=<unavailable>) at threadpool-worker-default.c:728:8 [opt]
    frame #8: 0x00000001055acc4d mono-sgen64`start_wrapper [inlined] start_wrapper_internal at threads.c:1233:3 [opt]
    frame #9: 0x00000001055acc0a mono-sgen64`start_wrapper(data=0x000060000342a980) at threads.c:1308 [opt]
    frame #10: 0x00007ff803bf14e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #11: 0x00007ff803becf6b libsystem_pthread.dylib`thread_start + 15

  thread #8
    frame #0: 0x00007ff803bb49b6 libsystem_kernel.dylib`semaphore_wait_trap + 10
    frame #1: 0x000000010565b808 mono-sgen64`mono_thread_info_wait_for_resume [inlined] mono_os_sem_wait(flags=MONO_SEM_FLAGS_NONE) at mono-os-semaphore.h:84:8 [opt]
    frame #2: 0x000000010565b7f9 mono-sgen64`mono_thread_info_wait_for_resume(info=0x00007fb8d2863400) at mono-threads.c:233 [opt]
    frame #3: 0x0000000105661c18 mono-sgen64`mono_threads_exit_gc_safe_region_unbalanced_internal(cookie=0x00007fb8d2863400, stackdata=<unavailable>) at mono-threads-coop.c:391:3 [opt]
    frame #4: 0x00000001054e45b6 mono-sgen64`worker_thread at mono-coop-semaphore.h:57:2 [opt]
    frame #5: 0x00000001054e44da mono-sgen64`worker_thread at threadpool-worker-default.c:388 [opt]
    frame #6: 0x00000001054e4430 mono-sgen64`worker_thread(unused=<unavailable>) at threadpool-worker-default.c:490 [opt]
    frame #7: 0x00000001055acc4d mono-sgen64`start_wrapper [inlined] start_wrapper_internal at threads.c:1233:3 [opt]
    frame #8: 0x00000001055acc0a mono-sgen64`start_wrapper(data=0x0000600003425e40) at threads.c:1308 [opt]
    frame #9: 0x00007ff803bf14e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #10: 0x00007ff803becf6b libsystem_pthread.dylib`thread_start + 15

  thread #9
    frame #0: 0x00007ff803bb6bd2 libsystem_kernel.dylib`__psynch_mutexwait + 10
    frame #1: 0x00007ff803beee7e libsystem_pthread.dylib`_pthread_mutex_firstfit_lock_wait + 76
    frame #2: 0x00007ff803beccbb libsystem_pthread.dylib`_pthread_mutex_firstfit_lock_slow + 205
    frame #3: 0x00007ffa1bc98d00 OpenGL`CGLLockContext + 34
    frame #4: 0x00000001190bd909 libAvaloniaNative.dylib`AvnGlContext::MakeCurrent(IUnknown**) + 75
    frame #5: 0x00000001190bcda5 libAvaloniaNative.dylib`AvnGlRenderTarget::BeginDrawing(IAvnGlSurfaceRenderingSession**) + 113
    frame #6: 0x000000011b880ecb
mono-sgen64 was compiled with optimization - stepping may behave oddly; variables may not be available.
    frame #7: 0x000000011b87f99a
    frame #8: 0x000000011b83a93d

  thread #10
    frame #0: 0x00007ff803bb49b6 libsystem_kernel.dylib`semaphore_wait_trap + 10
    frame #1: 0x000000010565b808 mono-sgen64`mono_thread_info_wait_for_resume [inlined] mono_os_sem_wait(flags=MONO_SEM_FLAGS_NONE) at mono-os-semaphore.h:84:8 [opt]
    frame #2: 0x000000010565b7f9 mono-sgen64`mono_thread_info_wait_for_resume(info=0x00007fb8d4a3f000) at mono-threads.c:233 [opt]
    frame #3: 0x0000000105661c18 mono-sgen64`mono_threads_exit_gc_safe_region_unbalanced_internal(cookie=0x00007fb8d4a3f000, stackdata=<unavailable>) at mono-threads-coop.c:391:3 [opt]
    frame #4: 0x00000001054e45b6 mono-sgen64`worker_thread at mono-coop-semaphore.h:57:2 [opt]
    frame #5: 0x00000001054e44da mono-sgen64`worker_thread at threadpool-worker-default.c:388 [opt]
    frame #6: 0x00000001054e4430 mono-sgen64`worker_thread(unused=<unavailable>) at threadpool-worker-default.c:490 [opt]
    frame #7: 0x00000001055acc4d mono-sgen64`start_wrapper [inlined] start_wrapper_internal at threads.c:1233:3 [opt]
    frame #8: 0x00000001055acc0a mono-sgen64`start_wrapper(data=0x0000600003425a40) at threads.c:1308 [opt]
    frame #9: 0x00007ff803bf14e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #10: 0x00007ff803becf6b libsystem_pthread.dylib`thread_start + 15

  thread #11
    frame #0: 0x00007ff803bb49b6 libsystem_kernel.dylib`semaphore_wait_trap + 10
    frame #1: 0x000000010565b808 mono-sgen64`mono_thread_info_wait_for_resume [inlined] mono_os_sem_wait(flags=MONO_SEM_FLAGS_NONE) at mono-os-semaphore.h:84:8 [opt]
    frame #2: 0x000000010565b7f9 mono-sgen64`mono_thread_info_wait_for_resume(info=0x00007fb8d093ec00) at mono-threads.c:233 [opt]
    frame #3: 0x0000000105661c18 mono-sgen64`mono_threads_exit_gc_safe_region_unbalanced_internal(cookie=0x00007fb8d093ec00, stackdata=<unavailable>) at mono-threads-coop.c:391:3 [opt]
    frame #4: 0x00000001054e45b6 mono-sgen64`worker_thread at mono-coop-semaphore.h:57:2 [opt]
    frame #5: 0x00000001054e44da mono-sgen64`worker_thread at threadpool-worker-default.c:388 [opt]
    frame #6: 0x00000001054e4430 mono-sgen64`worker_thread(unused=<unavailable>) at threadpool-worker-default.c:490 [opt]
    frame #7: 0x00000001055acc4d mono-sgen64`start_wrapper [inlined] start_wrapper_internal at threads.c:1233:3 [opt]
    frame #8: 0x00000001055acc0a mono-sgen64`start_wrapper(data=0x00006000034706c0) at threads.c:1308 [opt]
    frame #9: 0x00007ff803bf14e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #10: 0x00007ff803becf6b libsystem_pthread.dylib`thread_start + 15

  thread #12
    frame #0: 0x00007ff803bbcd5a libsystem_kernel.dylib`__select + 10
    frame #1: 0x0000000105655c77 mono-sgen64`mono_poll(ufds=0x00007fb8cee0ef80, nfds=2, timeout=<unavailable>) at mono-poll.c:114:13 [opt]
    frame #2: 0x00000001055b1853 mono-sgen64`poll_event_wait(callback=(mono-sgen64`wait_callback at threadpool-io.c:264), user_data=0x0000600000212c60) at threadpool-io-poll.c:153:10 [opt]
    frame #3: 0x00000001055b11b5 mono-sgen64`selector_thread(data=<unavailable>) at threadpool-io.c:460:9 [opt]
    frame #4: 0x00000001055acc4d mono-sgen64`start_wrapper [inlined] start_wrapper_internal at threads.c:1233:3 [opt]
    frame #5: 0x00000001055acc0a mono-sgen64`start_wrapper(data=0x000060000344c240) at threads.c:1308 [opt]
    frame #6: 0x00007ff803bf14e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #7: 0x00007ff803becf6b libsystem_pthread.dylib`thread_start + 15

  thread #13
    frame #0: 0x00007ff803bb73ea libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007ff803bf1a6f libsystem_pthread.dylib`_pthread_cond_wait + 1249
    frame #2: 0x0000000105652e50 mono-sgen64`mono_os_cond_timedwait [inlined] mono_os_cond_wait(cond=0x00007fb8cd80a248, mutex=0x00007fb8cd80a208) at mono-os-mutex.h:219:8 [opt]
    frame #3: 0x0000000105652e45 mono-sgen64`mono_os_cond_timedwait(cond=0x00007fb8cd80a248, mutex=0x00007fb8cd80a208, timeout_ms=4294967295) at mono-os-mutex.c:32 [opt]
    frame #4: 0x00000001055b9509 mono-sgen64`mono_w32handle_timedwait_signal_handle at mono-coop-mutex.h:103:8 [opt]
    frame #5: 0x00000001055b94dc mono-sgen64`mono_w32handle_timedwait_signal_handle [inlined] mono_w32handle_timedwait_signal_naked(poll=0, alerted=<unavailable>) at w32handle.c:652 [opt]
    frame #6: 0x00000001055b94dc mono-sgen64`mono_w32handle_timedwait_signal_handle(handle_data=<unavailable>, timeout=<unavailable>, poll=0, alerted=<unavailable>) at w32handle.c:767 [opt]
    frame #7: 0x00000001055b93d1 mono-sgen64`mono_w32handle_wait_one(handle=<unavailable>, timeout=<unavailable>, alertable=<unavailable>) at w32handle.c:892:13 [opt]
    frame #8: 0x00000001055efb5c mono-sgen64`ves_icall_System_Threading_Monitor_Monitor_wait [inlined] mono_monitor_wait(allow_interruption='\x01') at monitor.c:1438:8 [opt]
    frame #9: 0x00000001055efae4 mono-sgen64`ves_icall_System_Threading_Monitor_Monitor_wait(obj_handle=<unavailable>, ms=4294967295, error=<unavailable>) at monitor.c:1499 [opt]
    frame #10: 0x000000010553d9f1 mono-sgen64`ves_icall_System_Threading_Monitor_Monitor_wait_raw(a0=0x000070000f49a7c8, a1=4294967295) at icall-def.h:999:1 [opt]
    frame #11: 0x000000011a2c46fc
    frame #12: 0x000000011a2c376b
    frame #13: 0x000000011a2bf1a3
    frame #14: 0x0000000118f79383
    frame #15: 0x0000000105372352 mono-sgen64`mono_jit_runtime_invoke(method=<unavailable>, obj=<unavailable>, params=0x000070000f49af68, exc=<unavailable>, error=<unavailable>) at mini-runtime.c:3217:12 [opt]
    frame #16: 0x0000000105581e07 mono-sgen64`mono_runtime_invoke_checked [inlined] do_runtime_invoke(method=<unavailable>, obj=0x0000000105ecd5c8, params=0x000070000f49af68, exc=<unavailable>, error=0x000070000f49af18) at object.c:3052:11 [opt]
    frame #17: 0x0000000105581dd2 mono-sgen64`mono_runtime_invoke_checked(method=0x00007fb8d4965980, obj=0x0000000105ecd5c8, params=0x000070000f49af68, error=0x000070000f49af18) at object.c:3220 [opt]
    frame #18: 0x0000000105588700 mono-sgen64`mono_runtime_delegate_try_invoke(delegate=0x0000000105ecd5c8, params=0x000070000f49af68, exc=0x0000000000000000, error=0x000070000f49af18) at object.c:4438:7 [opt]
    frame #19: 0x00000001055acc8d mono-sgen64`start_wrapper at threads.c:1255:3 [opt]
    frame #20: 0x00000001055acc0a mono-sgen64`start_wrapper(data=0x0000600003476ac0) at threads.c:1308 [opt]
    frame #21: 0x00007ff803bf14e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #22: 0x00007ff803becf6b libsystem_pthread.dylib`thread_start + 15

  thread #14
    frame #0: 0x00007ff803bb49b6 libsystem_kernel.dylib`semaphore_wait_trap + 10
    frame #1: 0x000000010565b808 mono-sgen64`mono_thread_info_wait_for_resume [inlined] mono_os_sem_wait(flags=MONO_SEM_FLAGS_NONE) at mono-os-semaphore.h:84:8 [opt]
    frame #2: 0x000000010565b7f9 mono-sgen64`mono_thread_info_wait_for_resume(info=0x00007fb8d091f800) at mono-threads.c:233 [opt]
    frame #3: 0x0000000105661c18 mono-sgen64`mono_threads_exit_gc_safe_region_unbalanced_internal(cookie=0x00007fb8d091f800, stackdata=<unavailable>) at mono-threads-coop.c:391:3 [opt]
    frame #4: 0x00000001054e45b6 mono-sgen64`worker_thread at mono-coop-semaphore.h:57:2 [opt]
    frame #5: 0x00000001054e44da mono-sgen64`worker_thread at threadpool-worker-default.c:388 [opt]
    frame #6: 0x00000001054e4430 mono-sgen64`worker_thread(unused=<unavailable>) at threadpool-worker-default.c:490 [opt]
    frame #7: 0x00000001055acc4d mono-sgen64`start_wrapper [inlined] start_wrapper_internal at threads.c:1233:3 [opt]
    frame #8: 0x00000001055acc0a mono-sgen64`start_wrapper(data=0x00006000034781c0) at threads.c:1308 [opt]
    frame #9: 0x00007ff803bf14e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #10: 0x00007ff803becf6b libsystem_pthread.dylib`thread_start + 15

  thread #15
    frame #0: 0x00007ff803bb49b6 libsystem_kernel.dylib`semaphore_wait_trap + 10
    frame #1: 0x000000010565b808 mono-sgen64`mono_thread_info_wait_for_resume [inlined] mono_os_sem_wait(flags=MONO_SEM_FLAGS_NONE) at mono-os-semaphore.h:84:8 [opt]
    frame #2: 0x000000010565b7f9 mono-sgen64`mono_thread_info_wait_for_resume(info=0x00007fb8d66d8400) at mono-threads.c:233 [opt]
    frame #3: 0x0000000105661c18 mono-sgen64`mono_threads_exit_gc_safe_region_unbalanced_internal(cookie=0x00007fb8d66d8400, stackdata=<unavailable>) at mono-threads-coop.c:391:3 [opt]
    frame #4: 0x00000001054e45b6 mono-sgen64`worker_thread at mono-coop-semaphore.h:57:2 [opt]
    frame #5: 0x00000001054e44da mono-sgen64`worker_thread at threadpool-worker-default.c:388 [opt]
    frame #6: 0x00000001054e4430 mono-sgen64`worker_thread(unused=<unavailable>) at threadpool-worker-default.c:490 [opt]
    frame #7: 0x00000001055acc4d mono-sgen64`start_wrapper [inlined] start_wrapper_internal at threads.c:1233:3 [opt]
    frame #8: 0x00000001055acc0a mono-sgen64`start_wrapper(data=0x000060000344a340) at threads.c:1308 [opt]
    frame #9: 0x00007ff803bf14e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #10: 0x00007ff803becf6b libsystem_pthread.dylib`thread_start + 15

  thread #16
    frame #0: 0x00007ff803bb73ea libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007ff803bf1a6f libsystem_pthread.dylib`_pthread_cond_wait + 1249
    frame #2: 0x0000000105652e50 mono-sgen64`mono_os_cond_timedwait [inlined] mono_os_cond_wait(cond=0x00007fb8cd80a930, mutex=0x00007fb8cd80a8f0) at mono-os-mutex.h:219:8 [opt]
    frame #3: 0x0000000105652e45 mono-sgen64`mono_os_cond_timedwait(cond=0x00007fb8cd80a930, mutex=0x00007fb8cd80a8f0, timeout_ms=4294967295) at mono-os-mutex.c:32 [opt]
    frame #4: 0x00000001055b9509 mono-sgen64`mono_w32handle_timedwait_signal_handle at mono-coop-mutex.h:103:8 [opt]
    frame #5: 0x00000001055b94dc mono-sgen64`mono_w32handle_timedwait_signal_handle [inlined] mono_w32handle_timedwait_signal_naked(poll=0, alerted=<unavailable>) at w32handle.c:652 [opt]
    frame #6: 0x00000001055b94dc mono-sgen64`mono_w32handle_timedwait_signal_handle(handle_data=<unavailable>, timeout=<unavailable>, poll=0, alerted=<unavailable>) at w32handle.c:767 [opt]
    frame #7: 0x00000001055b93d1 mono-sgen64`mono_w32handle_wait_one(handle=<unavailable>, timeout=<unavailable>, alertable=<unavailable>) at w32handle.c:892:13 [opt]
    frame #8: 0x00000001055efb5c mono-sgen64`ves_icall_System_Threading_Monitor_Monitor_wait [inlined] mono_monitor_wait(allow_interruption='\x01') at monitor.c:1438:8 [opt]
    frame #9: 0x00000001055efae4 mono-sgen64`ves_icall_System_Threading_Monitor_Monitor_wait(obj_handle=<unavailable>, ms=4294967295, error=<unavailable>) at monitor.c:1499 [opt]
    frame #10: 0x000000010553d9f1 mono-sgen64`ves_icall_System_Threading_Monitor_Monitor_wait_raw(a0=0x000070000faa37c8, a1=4294967295) at icall-def.h:999:1 [opt]
    frame #11: 0x000000011a2c46fc
    frame #12: 0x000000011a2c376b
    frame #13: 0x000000011a2bf1a3
    frame #14: 0x0000000118f79383
    frame #15: 0x0000000105372352 mono-sgen64`mono_jit_runtime_invoke(method=<unavailable>, obj=<unavailable>, params=0x000070000faa3f68, exc=<unavailable>, error=<unavailable>) at mini-runtime.c:3217:12 [opt]
    frame #16: 0x0000000105581e07 mono-sgen64`mono_runtime_invoke_checked [inlined] do_runtime_invoke(method=<unavailable>, obj=0x0000000105f94738, params=0x000070000faa3f68, exc=<unavailable>, error=0x000070000faa3f18) at object.c:3052:11 [opt]
    frame #17: 0x0000000105581dd2 mono-sgen64`mono_runtime_invoke_checked(method=0x00007fb8d4965980, obj=0x0000000105f94738, params=0x000070000faa3f68, error=0x000070000faa3f18) at object.c:3220 [opt]
    frame #18: 0x0000000105588700 mono-sgen64`mono_runtime_delegate_try_invoke(delegate=0x0000000105f94738, params=0x000070000faa3f68, exc=0x0000000000000000, error=0x000070000faa3f18) at object.c:4438:7 [opt]
    frame #19: 0x00000001055acc8d mono-sgen64`start_wrapper at threads.c:1255:3 [opt]
    frame #20: 0x00000001055acc0a mono-sgen64`start_wrapper(data=0x0000600003b9b000) at threads.c:1308 [opt]
    frame #21: 0x00007ff803bf14e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #22: 0x00007ff803becf6b libsystem_pthread.dylib`thread_start + 15

  thread #17
    frame #0: 0x00007ff803bb73ea libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007ff803bf1a6f libsystem_pthread.dylib`_pthread_cond_wait + 1249
    frame #2: 0x000000011b9b1a81 libSDL2-2.0.0.dylib`SDL_CondWaitTimeout_REAL + 147
    frame #3: 0x000000011b9b16fc libSDL2-2.0.0.dylib`SDL_SemWaitTimeout_REAL + 78
    frame #4: 0x000000011b949c5a libSDL2-2.0.0.dylib`SDL_TimerThread + 459
    frame #5: 0x000000011b949767 libSDL2-2.0.0.dylib`SDL_RunThread + 53
    frame #6: 0x000000011b9b1385 libSDL2-2.0.0.dylib`RunThread + 9
    frame #7: 0x00007ff803bf14e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #8: 0x00007ff803becf6b libsystem_pthread.dylib`thread_start + 15

  thread #18
    frame #0: 0x00007ff803bb49b6 libsystem_kernel.dylib`semaphore_wait_trap + 10
    frame #1: 0x00007ff80c6c72e0 caulk`caulk::mach::semaphore::wait_or_error() + 16
    frame #2: 0x00007ff80c6af102 caulk`caulk::concurrent::details::worker_thread::run() + 36
    frame #3: 0x00007ff80c6aedc6 caulk`void* caulk::thread_proxy<std::__1::tuple<caulk::thread::attributes, void (caulk::concurrent::details::worker_thread::*)(), std::__1::tuple<caulk::concurrent::details::worker_thread*> > >(void*) + 41
    frame #4: 0x00007ff803bf14e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #5: 0x00007ff803becf6b libsystem_pthread.dylib`thread_start + 15

  thread #19
    frame #0: 0x00007ff803bb497a libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x00007ff803bb4ce8 libsystem_kernel.dylib`mach_msg + 56
    frame #2: 0x00007ff803cb7cdd CoreFoundation`__CFRunLoopServiceMachPort + 319
    frame #3: 0x00007ff803cb6368 CoreFoundation`__CFRunLoopRun + 1276
    frame #4: 0x00007ff803cb57ac CoreFoundation`CFRunLoopRunSpecific + 562
    frame #5: 0x00007ff803d3d82b CoreFoundation`CFRunLoopRun + 40
    frame #6: 0x0000000120004b29 DeckLinkAPI`DeckLinkDeviceNotificationControlMac::MessageLoop() + 255
    frame #7: 0x0000000120003e13 DeckLinkAPI`DeviceNotificationController::MessageLoopFunc(void*) + 15
    frame #8: 0x00007ff803bf14e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #9: 0x00007ff803becf6b libsystem_pthread.dylib`thread_start + 15

  thread #20
    frame #0: 0x00007ff803bb73ea libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007ff803bf1a6f libsystem_pthread.dylib`_pthread_cond_wait + 1249
    frame #2: 0x0000000112f8cd70 libgdk-quartz-2.0.0.dylib`___lldb_unnamed_symbol557$$libgdk-quartz-2.0.0.dylib + 80
    frame #3: 0x00007ff803bf14e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #4: 0x00007ff803becf6b libsystem_pthread.dylib`thread_start + 15

  thread #21
    frame #0: 0x00007ff803bbb0aa libsystem_kernel.dylib`poll + 10
    frame #1: 0x0000000113e56e21 libglib-2.0.0.dylib`g_main_context_iterate + 433
    frame #2: 0x0000000113e571fc libglib-2.0.0.dylib`g_main_loop_run + 284
    frame #3: 0x000000011d2313dc libgstgl-1.0.0.dylib`_event_thread_main + 92
    frame #4: 0x0000000113e31552 libglib-2.0.0.dylib`g_thread_proxy + 66
    frame #5: 0x00007ff803bf14e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #6: 0x00007ff803becf6b libsystem_pthread.dylib`thread_start + 15

  thread #22
    frame #0: 0x00007ff803bb73ea libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007ff803bf1a6f libsystem_pthread.dylib`_pthread_cond_wait + 1249
    frame #2: 0x0000000113e5d52c libglib-2.0.0.dylib`g_cond_wait + 44
    frame #3: 0x000000010f491b00 libgstapp-1.0.0.dylib`gst_app_src_create + 416
    frame #4: 0x000000011cbe70a6 libgstbase-1.0.0.dylib`gst_base_src_get_range + 326
    frame #5: 0x000000011cbe6899 libgstbase-1.0.0.dylib`gst_base_src_loop + 1209
    frame #6: 0x000000011ca585ba libgstreamer-1.0.0.dylib`gst_task_func + 298
    frame #7: 0x0000000113e323b3 libglib-2.0.0.dylib`g_thread_pool_thread_proxy + 147
    frame #8: 0x0000000113e31552 libglib-2.0.0.dylib`g_thread_proxy + 66
    frame #9: 0x00007ff803bf14e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #10: 0x00007ff803becf6b libsystem_pthread.dylib`thread_start + 15

  thread #23
    frame #0: 0x00007ff803bbb0aa libsystem_kernel.dylib`poll + 10
    frame #1: 0x0000000113e56e21 libglib-2.0.0.dylib`g_main_context_iterate + 433
    frame #2: 0x0000000113e571fc libglib-2.0.0.dylib`g_main_loop_run + 284
    frame #3: 0x000000011d2313dc libgstgl-1.0.0.dylib`_event_thread_main + 92
    frame #4: 0x0000000113e31552 libglib-2.0.0.dylib`g_thread_proxy + 66
    frame #5: 0x00007ff803bf14e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #6: 0x00007ff803becf6b libsystem_pthread.dylib`thread_start + 15

  thread #24
    frame #0: 0x00007ff803bb73ea libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007ff803bf1a6f libsystem_pthread.dylib`_pthread_cond_wait + 1249
    frame #2: 0x0000000113e5d52c libglib-2.0.0.dylib`g_cond_wait + 44
    frame #3: 0x000000010f491b00 libgstapp-1.0.0.dylib`gst_app_src_create + 416
    frame #4: 0x000000011cbe70a6 libgstbase-1.0.0.dylib`gst_base_src_get_range + 326
    frame #5: 0x000000011cbe6899 libgstbase-1.0.0.dylib`gst_base_src_loop + 1209
    frame #6: 0x000000011ca585ba libgstreamer-1.0.0.dylib`gst_task_func + 298
    frame #7: 0x0000000113e323b3 libglib-2.0.0.dylib`g_thread_pool_thread_proxy + 147
    frame #8: 0x0000000113e31552 libglib-2.0.0.dylib`g_thread_proxy + 66
    frame #9: 0x00007ff803bf14e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #10: 0x00007ff803becf6b libsystem_pthread.dylib`thread_start + 15

  thread #25
    frame #0: 0x00007ff803bb73ea libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007ff803bf1a6f libsystem_pthread.dylib`_pthread_cond_wait + 1249
    frame #2: 0x0000000113e5d52c libglib-2.0.0.dylib`g_cond_wait + 44
    frame #3: 0x000000011ca5867e libgstreamer-1.0.0.dylib`gst_task_func + 494
    frame #4: 0x0000000113e323b3 libglib-2.0.0.dylib`g_thread_pool_thread_proxy + 147
    frame #5: 0x0000000113e31552 libglib-2.0.0.dylib`g_thread_proxy + 66
    frame #6: 0x00007ff803bf14e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #7: 0x00007ff803becf6b libsystem_pthread.dylib`thread_start + 15

  thread #26
    frame #0: 0x00007ff803bb73ea libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007ff803bf1a6f libsystem_pthread.dylib`_pthread_cond_wait + 1249
    frame #2: 0x0000000113e5d52c libglib-2.0.0.dylib`g_cond_wait + 44
    frame #3: 0x000000011cbfb523 libgstbase-1.0.0.dylib`gst_data_queue_push + 403
    frame #4: 0x000000011cf83ea3 libgstcoreelements.dylib`gst_multi_queue_chain + 515
    frame #5: 0x000000011ca23077 libgstreamer-1.0.0.dylib`gst_pad_chain_data_unchecked + 215
    frame #6: 0x000000011ca23def libgstreamer-1.0.0.dylib`gst_pad_push_data + 239
    frame #7: 0x000000011ca23c2b libgstreamer-1.0.0.dylib`gst_pad_push + 347
    frame #8: 0x00000001271bfbf2 libgstisomp4.dylib`gst_qtdemux_push_buffer + 1522
    frame #9: 0x00000001271bd1f3 libgstisomp4.dylib`gst_qtdemux_decorate_and_push_buffer + 1987
    frame #10: 0x000000012719acc1 libgstisomp4.dylib`gst_qtdemux_loop + 5969
    frame #11: 0x000000011ca585ba libgstreamer-1.0.0.dylib`gst_task_func + 298
    frame #12: 0x0000000113e323b3 libglib-2.0.0.dylib`g_thread_pool_thread_proxy + 147
    frame #13: 0x0000000113e31552 libglib-2.0.0.dylib`g_thread_proxy + 66
    frame #14: 0x00007ff803bf14e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #15: 0x00007ff803becf6b libsystem_pthread.dylib`thread_start + 15

  thread #27
    frame #0: 0x00007ff803bb73ea libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007ff803bf1a6f libsystem_pthread.dylib`_pthread_cond_wait + 1249
    frame #2: 0x0000000113e5d52c libglib-2.0.0.dylib`g_cond_wait + 44
    frame #3: 0x000000011cf9b8b9 libgstcoreelements.dylib`gst_queue_chain_buffer_or_list + 761
    frame #4: 0x000000011ca23077 libgstreamer-1.0.0.dylib`gst_pad_chain_data_unchecked + 215
    frame #5: 0x000000011ca23def libgstreamer-1.0.0.dylib`gst_pad_push_data + 239
    frame #6: 0x000000011ca23c2b libgstreamer-1.0.0.dylib`gst_pad_push + 347
    frame #7: 0x000000011ca09de2 libgstreamer-1.0.0.dylib`gst_proxy_pad_chain_default + 146
    frame #8: 0x000000011ca23077 libgstreamer-1.0.0.dylib`gst_pad_chain_data_unchecked + 215
    frame #9: 0x000000011ca23def libgstreamer-1.0.0.dylib`gst_pad_push_data + 239
    frame #10: 0x000000011ca23c2b libgstreamer-1.0.0.dylib`gst_pad_push + 347
    frame #11: 0x000000011ca09de2 libgstreamer-1.0.0.dylib`gst_proxy_pad_chain_default + 146
    frame #12: 0x000000011ca23077 libgstreamer-1.0.0.dylib`gst_pad_chain_data_unchecked + 215
    frame #13: 0x000000011ca23def libgstreamer-1.0.0.dylib`gst_pad_push_data + 239
    frame #14: 0x000000011ca23c2b libgstreamer-1.0.0.dylib`gst_pad_push + 347
    frame #15: 0x000000011ca23077 libgstreamer-1.0.0.dylib`gst_pad_chain_data_unchecked + 215
    frame #16: 0x000000011ca23def libgstreamer-1.0.0.dylib`gst_pad_push_data + 239
    frame #17: 0x000000011ca23c2b libgstreamer-1.0.0.dylib`gst_pad_push + 347
    frame #18: 0x000000011cbef8bb libgstbase-1.0.0.dylib`gst_base_transform_chain + 379
    frame #19: 0x000000011ca23077 libgstreamer-1.0.0.dylib`gst_pad_chain_data_unchecked + 215
    frame #20: 0x000000011ca23def libgstreamer-1.0.0.dylib`gst_pad_push_data + 239
    frame #21: 0x000000011ca23c2b libgstreamer-1.0.0.dylib`gst_pad_push + 347
    frame #22: 0x000000011ca09de2 libgstreamer-1.0.0.dylib`gst_proxy_pad_chain_default + 146
    frame #23: 0x000000011ca23077 libgstreamer-1.0.0.dylib`gst_pad_chain_data_unchecked + 215
    frame #24: 0x000000011ca23def libgstreamer-1.0.0.dylib`gst_pad_push_data + 239
    frame #25: 0x000000011ca23c2b libgstreamer-1.0.0.dylib`gst_pad_push + 347
    frame #26: 0x000000011d1266c7 libgstplayback.dylib`gst_stream_synchronizer_sink_chain + 359
    frame #27: 0x000000011ca23077 libgstreamer-1.0.0.dylib`gst_pad_chain_data_unchecked + 215
    frame #28: 0x000000011ca23def libgstreamer-1.0.0.dylib`gst_pad_push_data + 239
    frame #29: 0x000000011ca23c2b libgstreamer-1.0.0.dylib`gst_pad_push + 347
    frame #30: 0x000000011ca09de2 libgstreamer-1.0.0.dylib`gst_proxy_pad_chain_default + 146
    frame #31: 0x000000011ca23077 libgstreamer-1.0.0.dylib`gst_pad_chain_data_unchecked + 215
    frame #32: 0x000000011ca23def libgstreamer-1.0.0.dylib`gst_pad_push_data + 239
    frame #33: 0x000000011ca23c2b libgstreamer-1.0.0.dylib`gst_pad_push + 347
    frame #34: 0x000000011cf7ea3e libgstcoreelements.dylib`gst_selector_pad_chain + 2318
    frame #35: 0x000000011ca23077 libgstreamer-1.0.0.dylib`gst_pad_chain_data_unchecked + 215
    frame #36: 0x000000011ca23def libgstreamer-1.0.0.dylib`gst_pad_push_data + 239
    frame #37: 0x000000011ca23c2b libgstreamer-1.0.0.dylib`gst_pad_push + 347
    frame #38: 0x000000011ca09de2 libgstreamer-1.0.0.dylib`gst_proxy_pad_chain_default + 146
    frame #39: 0x000000011ca23077 libgstreamer-1.0.0.dylib`gst_pad_chain_data_unchecked + 215
    frame #40: 0x000000011ca23def libgstreamer-1.0.0.dylib`gst_pad_push_data + 239
    frame #41: 0x000000011ca23c2b libgstreamer-1.0.0.dylib`gst_pad_push + 347
    frame #42: 0x000000011ca09de2 libgstreamer-1.0.0.dylib`gst_proxy_pad_chain_default + 146
    frame #43: 0x000000011ca23077 libgstreamer-1.0.0.dylib`gst_pad_chain_data_unchecked + 215
    frame #44: 0x000000011ca23def libgstreamer-1.0.0.dylib`gst_pad_push_data + 239
    frame #45: 0x000000011ca23c2b libgstreamer-1.0.0.dylib`gst_pad_push + 347
    frame #46: 0x000000011cd24903 libgstvideo-1.0.0.dylib`gst_video_decoder_clip_and_push_buf + 1731
    frame #47: 0x000000011cd23acb libgstvideo-1.0.0.dylib`gst_video_decoder_finish_frame + 987
    frame #48: 0x000000011d2a50f4 libgstapplemedia.dylib`gst_vtdec_push_frames_if_needed + 212
    frame #49: 0x000000011d2a4927 libgstapplemedia.dylib`gst_vtdec_handle_frame + 87
    frame #50: 0x000000011cd25f93 libgstvideo-1.0.0.dylib`gst_video_decoder_decode_frame + 627
    frame #51: 0x000000011cd2e156 libgstvideo-1.0.0.dylib`gst_video_decoder_chain_forward + 678
    frame #52: 0x000000011cd2e950 libgstvideo-1.0.0.dylib`gst_video_decoder_chain + 208
    frame #53: 0x000000011ca23077 libgstreamer-1.0.0.dylib`gst_pad_chain_data_unchecked + 215
    frame #54: 0x000000011ca23def libgstreamer-1.0.0.dylib`gst_pad_push_data + 239
    frame #55: 0x000000011ca23c2b libgstreamer-1.0.0.dylib`gst_pad_push + 347
    frame #56: 0x000000011cbef8bb libgstbase-1.0.0.dylib`gst_base_transform_chain + 379
    frame #57: 0x000000011ca23077 libgstreamer-1.0.0.dylib`gst_pad_chain_data_unchecked + 215
    frame #58: 0x000000011ca23def libgstreamer-1.0.0.dylib`gst_pad_push_data + 239
    frame #59: 0x000000011ca23c2b libgstreamer-1.0.0.dylib`gst_pad_push + 347
    frame #60: 0x000000011cbc15cb libgstbase-1.0.0.dylib`gst_base_parse_push_frame + 1451
    frame #61: 0x000000011cbc3480 libgstbase-1.0.0.dylib`gst_base_parse_finish_frame + 944
    frame #62: 0x000000011b00d7ee libgstvideoparsersbad.dylib`gst_h264_parse_handle_frame + 2462
    frame #63: 0x000000011cbcd56d libgstbase-1.0.0.dylib`gst_base_parse_handle_buffer + 429
    frame #64: 0x000000011cbc464b libgstbase-1.0.0.dylib`gst_base_parse_chain + 1499
    frame #65: 0x000000011ca23077 libgstreamer-1.0.0.dylib`gst_pad_chain_data_unchecked + 215
    frame #66: 0x000000011ca23def libgstreamer-1.0.0.dylib`gst_pad_push_data + 239
    frame #67: 0x000000011ca23c2b libgstreamer-1.0.0.dylib`gst_pad_push + 347
    frame #68: 0x000000011cf8688b libgstcoreelements.dylib`gst_multi_queue_loop + 1163
    frame #69: 0x000000011ca585ba libgstreamer-1.0.0.dylib`gst_task_func + 298
    frame #70: 0x0000000113e323b3 libglib-2.0.0.dylib`g_thread_pool_thread_proxy + 147
    frame #71: 0x0000000113e31552 libglib-2.0.0.dylib`g_thread_proxy + 66
    frame #72: 0x00007ff803bf14e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #73: 0x00007ff803becf6b libsystem_pthread.dylib`thread_start + 15

  thread #28
    frame #0: 0x00007ff803bbb0aa libsystem_kernel.dylib`poll + 10
    frame #1: 0x0000000113e56e21 libglib-2.0.0.dylib`g_main_context_iterate + 433
    frame #2: 0x0000000113e571fc libglib-2.0.0.dylib`g_main_loop_run + 284
    frame #3: 0x000000011d2313dc libgstgl-1.0.0.dylib`_event_thread_main + 92
    frame #4: 0x0000000113e31552 libglib-2.0.0.dylib`g_thread_proxy + 66
    frame #5: 0x00007ff803bf14e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #6: 0x00007ff803becf6b libsystem_pthread.dylib`thread_start + 15

  thread #29
    frame #0: 0x00007ff803bbb0aa libsystem_kernel.dylib`poll + 10
    frame #1: 0x0000000113e56e21 libglib-2.0.0.dylib`g_main_context_iterate + 433
    frame #2: 0x0000000113e571fc libglib-2.0.0.dylib`g_main_loop_run + 284
    frame #3: 0x000000011d22c928 libgstgl-1.0.0.dylib`gst_gl_context_create_thread + 1176
    frame #4: 0x0000000113e31552 libglib-2.0.0.dylib`g_thread_proxy + 66
    frame #5: 0x00007ff803bf14e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #6: 0x00007ff803becf6b libsystem_pthread.dylib`thread_start + 15

  thread #30
    frame #0: 0x00007ff803bb73ea libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007ff803bf1a6f libsystem_pthread.dylib`_pthread_cond_wait + 1249
    frame #2: 0x0000000113e5d52c libglib-2.0.0.dylib`g_cond_wait + 44
    frame #3: 0x000000011cbd21c7 libgstbase-1.0.0.dylib`gst_base_sink_wait_preroll + 55
    frame #4: 0x000000011cbd29b3 libgstbase-1.0.0.dylib`gst_base_sink_do_preroll + 1715
    frame #5: 0x000000011cbdad4c libgstbase-1.0.0.dylib`gst_base_sink_chain_unlocked + 1020
    frame #6: 0x000000011cbe023d libgstbase-1.0.0.dylib`gst_base_sink_chain_main + 61
    frame #7: 0x000000011ca23077 libgstreamer-1.0.0.dylib`gst_pad_chain_data_unchecked + 215
    frame #8: 0x000000011ca23def libgstreamer-1.0.0.dylib`gst_pad_push_data + 239
    frame #9: 0x000000011ca23c2b libgstreamer-1.0.0.dylib`gst_pad_push + 347
    frame #10: 0x000000011cbef8bb libgstbase-1.0.0.dylib`gst_base_transform_chain + 379
    frame #11: 0x000000011ca23077 libgstreamer-1.0.0.dylib`gst_pad_chain_data_unchecked + 215
    frame #12: 0x000000011ca23def libgstreamer-1.0.0.dylib`gst_pad_push_data + 239
    frame #13: 0x000000011ca23c2b libgstreamer-1.0.0.dylib`gst_pad_push + 347
    frame #14: 0x000000011cbef8bb libgstbase-1.0.0.dylib`gst_base_transform_chain + 379
    frame #15: 0x000000011ca23077 libgstreamer-1.0.0.dylib`gst_pad_chain_data_unchecked + 215
    frame #16: 0x000000011ca23def libgstreamer-1.0.0.dylib`gst_pad_push_data + 239
    frame #17: 0x000000011ca23c2b libgstreamer-1.0.0.dylib`gst_pad_push + 347
    frame #18: 0x000000011cbef8bb libgstbase-1.0.0.dylib`gst_base_transform_chain + 379
    frame #19: 0x000000011ca23077 libgstreamer-1.0.0.dylib`gst_pad_chain_data_unchecked + 215
    frame #20: 0x000000011ca23def libgstreamer-1.0.0.dylib`gst_pad_push_data + 239
    frame #21: 0x000000011ca23c2b libgstreamer-1.0.0.dylib`gst_pad_push + 347
    frame #22: 0x000000011ca09de2 libgstreamer-1.0.0.dylib`gst_proxy_pad_chain_default + 146
    frame #23: 0x000000011ca23077 libgstreamer-1.0.0.dylib`gst_pad_chain_data_unchecked + 215
    frame #24: 0x000000011ca23def libgstreamer-1.0.0.dylib`gst_pad_push_data + 239
    frame #25: 0x000000011ca23c2b libgstreamer-1.0.0.dylib`gst_pad_push + 347
    frame #26: 0x000000011ca09de2 libgstreamer-1.0.0.dylib`gst_proxy_pad_chain_default + 146
    frame #27: 0x000000011ca23077 libgstreamer-1.0.0.dylib`gst_pad_chain_data_unchecked + 215
    frame #28: 0x000000011ca23def libgstreamer-1.0.0.dylib`gst_pad_push_data + 239
    frame #29: 0x000000011ca23c2b libgstreamer-1.0.0.dylib`gst_pad_push + 347
    frame #30: 0x000000011cbef8bb libgstbase-1.0.0.dylib`gst_base_transform_chain + 379
    frame #31: 0x000000011ca23077 libgstreamer-1.0.0.dylib`gst_pad_chain_data_unchecked + 215
    frame #32: 0x000000011ca23def libgstreamer-1.0.0.dylib`gst_pad_push_data + 239
    frame #33: 0x000000011ca23c2b libgstreamer-1.0.0.dylib`gst_pad_push + 347
    frame #34: 0x000000011cbef8bb libgstbase-1.0.0.dylib`gst_base_transform_chain + 379
    frame #35: 0x000000011ca23077 libgstreamer-1.0.0.dylib`gst_pad_chain_data_unchecked + 215
    frame #36: 0x000000011ca23def libgstreamer-1.0.0.dylib`gst_pad_push_data + 239
    frame #37: 0x000000011ca23c2b libgstreamer-1.0.0.dylib`gst_pad_push + 347
    frame #38: 0x000000011ca09de2 libgstreamer-1.0.0.dylib`gst_proxy_pad_chain_default + 146
    frame #39: 0x000000011ca23077 libgstreamer-1.0.0.dylib`gst_pad_chain_data_unchecked + 215
    frame #40: 0x000000011ca23def libgstreamer-1.0.0.dylib`gst_pad_push_data + 239
    frame #41: 0x000000011ca23c2b libgstreamer-1.0.0.dylib`gst_pad_push + 347
    frame #42: 0x000000011cf9ab0d libgstcoreelements.dylib`gst_queue_loop + 2381
    frame #43: 0x000000011ca585ba libgstreamer-1.0.0.dylib`gst_task_func + 298
    frame #44: 0x0000000113e323b3 libglib-2.0.0.dylib`g_thread_pool_thread_proxy + 147
    frame #45: 0x0000000113e31552 libglib-2.0.0.dylib`g_thread_proxy + 66
    frame #46: 0x00007ff803bf14e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #47: 0x00007ff803becf6b libsystem_pthread.dylib`thread_start + 15

  thread #31
    frame #0: 0x00007ff803bbb0aa libsystem_kernel.dylib`poll + 10
    frame #1: 0x0000000113e56e21 libglib-2.0.0.dylib`g_main_context_iterate + 433
    frame #2: 0x0000000113e571fc libglib-2.0.0.dylib`g_main_loop_run + 284
    frame #3: 0x000000011d22c928 libgstgl-1.0.0.dylib`gst_gl_context_create_thread + 1176
    frame #4: 0x0000000113e31552 libglib-2.0.0.dylib`g_thread_proxy + 66
    frame #5: 0x00007ff803bf14e1 libsystem_pthread.dylib`_pthread_start + 125
    frame #6: 0x00007ff803becf6b libsystem_pthread.dylib`thread_start + 15

  thread #32
    frame #0: 0x00007ff803c3b092 CoreFoundation`__CFSearchStringROM + 41
    frame #1: 0x00007ff803c3aa36 CoreFoundation`__CFStringCreateImmutableFunnel3 + 1808
    frame #2: 0x00007ff803c3a30e CoreFoundation`CFStringCreateWithCString + 67
    frame #3: 0x00007ff8042f668b LaunchServices`invocation function for block in _MyCFXPCCreateCFObjectFromXPCObject(void*, unsigned long) + 60
    frame #4: 0x00007ff803929643 libxpc.dylib`_xpc_dictionary_apply_apply + 40
    frame #5: 0x00007ff803926889 libxpc.dylib`_xpc_dictionary_apply_node_f + 132
    frame #6: 0x00007ff80392956d libxpc.dylib`xpc_dictionary_apply + 111
    frame #7: 0x00007ff804142457 LaunchServices`_MyCFXPCCreateCFObjectFromXPCObject(void*, unsigned long) + 745
    frame #8: 0x00007ff8041460b0 LaunchServices`LSNotificationReceiver::receiveNotificationFromServer(_xpc_connection_s*, void*) + 334
    frame #9: 0x00007ff80392cb6c libxpc.dylib`_xpc_connection_call_event_handler + 56
    frame #10: 0x00007ff80392b947 libxpc.dylib`_xpc_connection_mach_event + 1382
    frame #11: 0x00007ff803a363b1 libdispatch.dylib`_dispatch_client_callout4 + 9
    frame #12: 0x00007ff803a4f041 libdispatch.dylib`_dispatch_mach_msg_invoke + 445
    frame #13: 0x00007ff803a3c1cd libdispatch.dylib`_dispatch_lane_serial_drain + 342
    frame #14: 0x00007ff803a4fb77 libdispatch.dylib`_dispatch_mach_invoke + 484
    frame #15: 0x00007ff803a3c1cd libdispatch.dylib`_dispatch_lane_serial_drain + 342
    frame #16: 0x00007ff803a3cdfd libdispatch.dylib`_dispatch_lane_invoke + 366
    frame #17: 0x00007ff803a46eee libdispatch.dylib`_dispatch_workloop_worker_thread + 753
    frame #18: 0x00007ff803bedfd0 libsystem_pthread.dylib`_pthread_wqthread + 326
    frame #19: 0x00007ff803becf57 libsystem_pthread.dylib`start_wqthread + 15

  thread #33
    frame #0: 0x00007ff803924d48 libxpc.dylib`_xpc_dictionary_look_up_table + 58
    frame #1: 0x00007ff803924c21 libxpc.dylib`_xpc_dictionary_look_up + 31
    frame #2: 0x00007ff80a306a6a RunningBoardServices`RBSXPCDictionaryGetValue + 101
    frame #3: 0x00007ff80a306bf4 RunningBoardServices`_BSXPCDecodeObjectForKey + 143
    frame #4: 0x00007ff80a2fb663 RunningBoardServices`-[RBSInheritance initWithRBSXPCCoder:] + 226
    frame #5: 0x00007ff80a30828a RunningBoardServices`_BSXPCDecodeObject + 2182
    frame #6: 0x00007ff80a308581 RunningBoardServices`___BSXPCDecodeObject_block_invoke + 51
    frame #7: 0x00007ff80392c0ba libxpc.dylib`xpc_array_apply + 62
    frame #8: 0x00007ff80a307cef RunningBoardServices`_BSXPCDecodeObject + 747
    frame #9: 0x00007ff80a306c40 RunningBoardServices`_BSXPCDecodeObjectForKey + 219
    frame #10: 0x00007ff80a2facd9 RunningBoardServices`-[RBSInheritanceChangeSet initWithRBSXPCCoder:] + 218
    frame #11: 0x00007ff80a30828a RunningBoardServices`_BSXPCDecodeObject + 2182
    frame #12: 0x00007ff80a306c40 RunningBoardServices`_BSXPCDecodeObjectForKey + 219
    frame #13: 0x00007ff80a2f407d RunningBoardServices`-[RBSXPCMessage decodeArgumentCollection:withClass:atIndex:allowNil:error:] + 473
    frame #14: 0x00007ff80a2f3e9e RunningBoardServices`-[RBSXPCMessage decodeArgumentWithClass:atIndex:allowNil:error:] + 39
    frame #15: 0x00007ff80a2f3de3 RunningBoardServices`__32-[RBSConnection _handleMessage:]_block_invoke_2 + 85
    frame #16: 0x00007ff8039638fe libsystem_trace.dylib`_os_activity_initiate_impl + 51
    frame #17: 0x00007ff80a2f371d RunningBoardServices`-[RBSConnection _handleMessage:] + 728
    frame #18: 0x00007ff80a2f3358 RunningBoardServices`__30-[RBSConnection _lock_connect]_block_invoke + 68
    frame #19: 0x00007ff80392cb6c libxpc.dylib`_xpc_connection_call_event_handler + 56
    frame #20: 0x00007ff80392b947 libxpc.dylib`_xpc_connection_mach_event + 1382
    frame #21: 0x00007ff803a363b1 libdispatch.dylib`_dispatch_client_callout4 + 9
    frame #22: 0x00007ff803a4f041 libdispatch.dylib`_dispatch_mach_msg_invoke + 445
    frame #23: 0x00007ff803a3c1cd libdispatch.dylib`_dispatch_lane_serial_drain + 342
    frame #24: 0x00007ff803a4fb77 libdispatch.dylib`_dispatch_mach_invoke + 484
    frame #25: 0x00007ff803a3c1cd libdispatch.dylib`_dispatch_lane_serial_drain + 342
    frame #26: 0x00007ff803a3ce30 libdispatch.dylib`_dispatch_lane_invoke + 417
    frame #27: 0x00007ff803a46eee libdispatch.dylib`_dispatch_workloop_worker_thread + 753
    frame #28: 0x00007ff803bedfd0 libsystem_pthread.dylib`_pthread_wqthread + 326
    frame #29: 0x00007ff803becf57 libsystem_pthread.dylib`start_wqthread + 15
    ```
@ylatuya
Copy link
Contributor Author

ylatuya commented Nov 14, 2022

After analysing a bit further the stacktrace, thread 9 seems to be the culprit. If I am reading this correctly, in Thread 9 Avalonia is trying the make current the GL context which might be a shared context taken in Thread 1. Thread 9 might be waiting for Thread 1 to release the GL lock and Thread 1 is in turn waiting for Thread 9 causing the deadlock.

@ylatuya
Copy link
Contributor Author

ylatuya commented Nov 15, 2022

The bug is in Avalonia -> AvaloniaUI/Avalonia#9444

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant