libsystem_kernel.dylib`__ulock_wait: what the mistake ?

Hi!

I do some project on os and everywhere I get the same error libsystem_kernel.dylib`__ulock_wait:

-> 0x7fffa4bdc31e <+10>: jae 0x7fffa4bdc328; <+20>



Where it appears and how to track it I do not know, I need help. Thank you!

my system:

MacOS Sierra Version 10.12.6 (16G29)

Xcode version 8.3.3 (8E3004b)


P.s.

my bt all looks like this:


* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP

* frame #0: 0x00007fffa4bdc31e libsystem_kernel.dylib`__ulock_wait + 10

frame #1: 0x00007fffa4cbfaff libsystem_platform.dylib`_os_ulock_wait + 25

frame #2: 0x00007fffa4cbf7d0 libsystem_platform.dylib`_os_nospin_lock_lock_slow + 125

frame #3: 0x00007fff8ccbe614 AppKit`_NSOpenGLContextGetOffScreenSurface + 28

frame #4: 0x00007fff8ccd262b AppKit`-[NSOpenGLContext update] + 378

frame #5: 0x00007fff8ef0a22c CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12

frame #6: 0x00007fff8eeeb3c4 CoreFoundation`__CFRunLoopDoBlocks + 356

frame #7: 0x00007fff8eeeab35 CoreFoundation`__CFRunLoopRun + 917

frame #8: 0x00007fff8eeea544 CoreFoundation`CFRunLoopRunSpecific + 420

frame #9: 0x00007fff8e449ebc HIToolbox`RunCurrentEventLoopInMode + 240

frame #10: 0x00007fff8e449bf9 HIToolbox`ReceiveNextEventCommon + 184

frame #11: 0x00007fff8e449b26 HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 71

frame #12: 0x00007fff8c9e2a54 AppKit`_DPSNextEvent + 1120

frame #13: 0x00007fff8d15e7ee AppKit`-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2796

frame #14: 0x00007fff8c9d73db AppKit`-[NSApplication run] + 926

frame #15: 0x00007fff8c9a1e0e AppKit`NSApplicationMain + 1237

frame #16: 0x0000000100012a42 LosShader`main(argc=3, argv=0x00007fff5fbff620) at main.m:12

frame #17: 0x00007fffa4aad235 libdyld.dylib`start + 1

thread #2

frame #0: 0x00007fffa4bdc44e libsystem_kernel.dylib`__workq_kernreturn + 10

frame #1: 0x00000001002086c6 libsystem_pthread.dylib`_pthread_wqthread + 1023

frame #2: 0x00000001002082b5 libsystem_pthread.dylib`start_wqthread + 13

thread #3

frame #0: 0x00007fffa4bdc44e libsystem_kernel.dylib`__workq_kernreturn + 10

frame #1: 0x00000001002086c6 libsystem_pthread.dylib`_pthread_wqthread + 1023

frame #2: 0x00000001002082b5 libsystem_pthread.dylib`start_wqthread + 13

thread #4

frame #0: 0x00007fffa4bdc44e libsystem_kernel.dylib`__workq_kernreturn + 10

frame #1: 0x0000000100208859 libsystem_pthread.dylib`_pthread_wqthread + 1426

frame #2: 0x00000001002082b5 libsystem_pthread.dylib`start_wqthread + 13

thread #6, queue = 'OpenGLMT'

frame #0: 0x00007fffa4bdbc22 libsystem_kernel.dylib`__psynch_mutexwait + 10

frame #1: 0x0000000100209061 libsystem_pthread.dylib`_pthread_mutex_lock_wait + 105

frame #2: 0x0000000100206584 libsystem_pthread.dylib`_pthread_mutex_lock_slow + 316

frame #3: 0x00007fff94098c8b OpenGL`CGLGetSurface + 55

frame #4: 0x00007fff8d08c52d AppKit`flush_notify + 338

frame #5: 0x00007fff940bc54a GLEngine`glSwap_Exec + 186

frame #6: 0x00007fff9411f768 GLEngine`glSwap_UnpackThread + 14

frame #7: 0x00007fff941a8d1f GLEngine`gleCmdProcessor + 77

frame #8: 0x000000010019178c libdispatch.dylib`_dispatch_client_callout + 8

frame #9: 0x00000001001a893f libdispatch.dylib`_dispatch_queue_serial_drain + 205

frame #10: 0x000000010019aaa2 libdispatch.dylib`_dispatch_queue_invoke + 1174

frame #11: 0x0000000100193a0c libdispatch.dylib`_dispatch_root_queue_drain + 671

frame #12: 0x000000010019371d libdispatch.dylib`_dispatch_worker_thread3 + 114

frame #13: 0x00000001002087da libsystem_pthread.dylib`_pthread_wqthread + 1299

frame #14: 0x00000001002082b5 libsystem_pthread.dylib`start_wqthread + 13

thread #7, name = 'OGL Profiler'

frame #0: 0x00007fffa4bd434a libsystem_kernel.dylib`mach_msg_trap + 10

frame #1: 0x00007fffa4bd3797 libsystem_kernel.dylib`mach_msg + 55

frame #2: 0x00007fff94092971 OpenGL`glcDebugListener + 302

frame #3: 0x0000000100208b90 libsystem_pthread.dylib`_pthread_body + 180

frame #4: 0x0000000100208adc libsystem_pthread.dylib`_pthread_start + 286

frame #5: 0x00000001002082c5 libsystem_pthread.dylib`thread_start + 13

thread #8, name = 'CVDisplayLink'

frame #0: 0x00007fffa4bd4386 libsystem_kernel.dylib`semaphore_wait_trap + 10

frame #1: 0x00000001001bb0ee libdispatch.dylib`_os_semaphore_wait + 16

frame #2: 0x000000010019b260 libdispatch.dylib`_dispatch_semaphore_wait_slow + 103

frame #3: 0x00007fff9409e126 OpenGL`CGLFlushDrawable + 66

frame #4: 0x0000000100009d9d LosShader`::-[ShaderLosGL drawShader](self=0x00006000001c0ff0, _cmd="drawShader") at ShaderGLmain.mm:138

frame #5: 0x0000000100009760 LosShader`::-[ShaderLosGL getFrame:](self=0x00006000001c0ff0, _cmd="getFrame:", outputTime=0x0000700009393cc8) at ShaderGLmain.mm:46

frame #6: 0x0000000100009b37 LosShader`MydisplayLink(display=0x0000000101023200, now=0x0000700009393dd8, outputTime=0x0000700009393cc8, flags=0, flagOut=0x0000700009393d18, displayLinkcontext=0x00006000001c0ff0) at ShaderGLmain.mm:51

frame #7: 0x00007fff905c4c4a CoreVideo`CVDisplayLink::performIO(CVTimeStamp*) + 248

frame #8: 0x00007fff905c47de CoreVideo`CVDisplayLink::runIOThread() + 644

frame #9: 0x0000000100208b90 libsystem_pthread.dylib`_pthread_body + 180

frame #10: 0x0000000100208adc libsystem_pthread.dylib`_pthread_start + 286

frame #11: 0x00000001002082c5 libsystem_pthread.dylib`thread_start + 13

If you look up the backtrace you’ll see that OpenGL (frame 4) is trying to acquire some a lock (frame 3). Presumably someone else is holding on to the lock and that’s why you’re stuck. The next step here is to look at the backtraces of all the other threads in your process to see if there’s some other thread that’s obviously stuck holding on to this lock.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
Hey, is there any solution about this problem?
macOS: catalina 10.15.4
XCODE: 11.5 (11E608c)


libsystem_kernel.dylib`__ulock_wait: what the mistake ?
 
 
Q