The mutex itself is stored in a shared list, so it should be valid. However, at random times, crash happens due to sigabrt with the trace below:
[ 4] 0x00007fff86b513d4 libsystem_pthread.dylib`__pthread_abort_reason + 179
[ 5] 0x00007fff86b4ddf0 libsystem_pthread.dylib`_pthread_mutex_unlock_drop + 160
Looking at the code it's not obvious if something can be causing the mutex value to be invalid, is there a good way to debug this?