Possible thread performance checker bug

I'm experiencing some rare crash but only if I enable Xcode's "thread performance checker". The crash typically ends with these lines:

std::_1::hash_table<std::_1::hash_value_type<long
qosWaiterSignallerInvariantCheck
...

and sometimes with "findPrimitiveInfoNoAssert" on the second line.

I wonder if I am doing anything wrong, or is it a (hopefully known) issue in thread performance checker itself? It does look like some sort of data race bug, if to guess there's some internal dictionary that's not properly protected with a mutex or something.

I'm using Xcode 16.4 running on macOS 15.5, building and running an app on iPhone with iOS 18.5.

Cheers!

Are you using Core Image, by any chance?

I'm hitting something very similar, developing for macOS and running under Xcode 16.2 on macOS 15.5. Doing a lot of video work using Core Image, and I get these crashes during a CIRenderTask pretty frequently (like within a few minutes of live rendering), usually within a call to CI::Context::recursive_render.

We do get occasional crash reports from release builds, crashing on locking calls within Core Image, but none of those involve qosWaiterSignallerInvariantCheck, and we hit them much, much more often when running with Thread Performance Checker on.

I'm seeing this too, it started recently, I guess with an Xcode update. My MacOS app is using CoreImage / NSImage a lot. The stack trace usually ends in: std::__1::__hash_table<std::__1::__hash_value_type<long, qos_info_t> [..], qosWaiterSignallerInvariantCheck, etc...

I haven't seen the crash yet in production, but I see it very easily in a debug build, within a few minutes.

Any help would be appreciated.

Hi, let us know on this thread if you hit this crash specifically on macOS 15.6.1+ and/or iOS 18.6.1+.

Possible thread performance checker bug
 
 
Q