Allocations/Leaks Instrument Error: Required kernel recording resources are in use by another document.

The Leaks instrument is suddenly giving me the error "Required kernel recording resources are in use by another document."

I see this has come up with Xcode 12 on iOS, but now it's happening when profiling a Mac application on Monterey 12.3.1 and Xcode 13.3.

I get the same behaviour on a debug or release build. The Allocations instrument on its own also gives the same error. The Time Profiler intrument launches without issue.

Regardless of the (useless) error, it's possible this is a signing issue, since Intruments is also constantly asking for a password when launching the process.

Does anyone have any insight into what is causing this?

Some additional information:

The Leaks instrument will work with An Intel-Only build, but not with an Apple Silicon build or a universal binary.

With an Intel only executable, on an Intel Mac, I have the same issue, both with Instruments from Xcode 13.3 and from Xcode 13.2.1. Also using macOS 12.3.1.

The same issue with Xcode 13.3.1

The same issue with Xcode 14.0! Any updates? :(

So is this related to Apple Silicon? Any updates?

In Xcode 14.3.1 (MacOS 13.5) we get the same error, same request for password when launching the process. We do NOT get the error if we change the profiling build configuration from release to debug.

Allocations/Leaks Instrument Error: Required kernel recording resources are in use by another document.
 
 
Q