Time Profiler "Required Kernel Recording Resources Are in Use" Error

Hi, I'm using XCode 12.5 on Big Sur. When running the Time Profiler, I'm getting an error "required kernel recording resources are in use by another document". I tried restarting XCode and my computer but it still didn't work. Any idea why?

  • faced the same problem with iPhone 11 Pro on iOS 14.6: XCode Version 12.5 (12E262) Mac OS Big Sur 11.3.1

    Enabling/Disabling BitCode didnt help Profiling same app on the simulator (i.e. iOS 14.5, iPhone 8+ Simulator) works fine.

Add a Comment

Replies

test

  • The above post is just test. Because I was said that access to this post is unrestricted after trying to post answer. Something wrong

Add a Comment

I’m facing same issue in Xcode (Ver.12.5) on Big Sur (Ver. 11.2.3). I can workaround this issue by quitting Instrument completely (even from dock) in my case.

Hi everyone, sorry for the late reply, we believe this should be fixed in Xcode 13. Could you download the newest version from the AppStore (13.2) and see whether this fixes it for you? If you still encounter the issue, please file a Feedback.

  • @JoachimKurz - I had this problem in Xcode 12.5.1. Using Xcode 13.2.1 fixed it. Thanks!

  • I'm using 13.4.1, this is still an issue for me. Works with cpu profiling, but not leaks or allocations, any updates on this?

  • It is still relevant even with 14.2 and Instruments 14.1

I just had this error pop up and can't find a way to get around it. "Required kernel recording resources are in use by another document"

I also get, at the same time, "(Before Run Started) Failed to gain authorization"

I'm running on a Parallels VM (17.1.4) MacOS Monterey (12.4) Xcode Instruments (13.4) Intel MBP

Seems broken again in Xcode 14.2:

  • Same issue trying to record a simulator in XCode 14.2. Also seeing another error message next to "runs" that reads "Failed to gain authorization"

Add a Comment

same issue with version 14.1

Everyone, if you see this kind of error and do not have another Instruments document open that is currently recording, please file a feedback. If you can reliably reproduce it, please add steps to reproduce. Otherwise, capturing and attaching a sysdiagnose would be great!

Same error here with Xcode 14.3.1 on MacOS 13.5, only for leaks and allocations, not time profiler.

Changing the profiling build configuration from release to debug eliminates the error, though this is not ideal for obvious reasons.

Same error XCode 14.3.1, macOS 13.4.1, M1 Max, Instruments Leaks, debug build of a c++ program using AppleClang 14.0.0. I eventually found a workaround by making a bash script that creates an xml plist file with a "get-task-allow" key and then applied it by running:

codesign -s - -v -f --entitlements allow.plist ./build/debug/MyProgram.app/Contents/MacOS/MyProgram

Here is the allow.plist xml file contents:

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict><key>com.apple.security.get-task-allow</key><true/></dict></plist>
  • ^^^ this worked - thanks for sharing the magic recipe!

Add a Comment

I am seeing the same "Required kernel recording resources are in use by another document." error when running instruments on macOS Sonoma on Xcode 15.2