xcrun/xcodebuild command hangs after installing xcode 16 beta & iOS 18 beta


The issues over new Xcode major version beta always drive me crazy around this time of the year.

This year we are trying to install both Xcode 15.x & 16 beta on the same mac with Sonoma 14.5, along with all supported iOS/tvOS/watchOS/xrOS simulators available including beta via dmgs distributed on Apple Developer Downloads.

After setups, xcrun simctl related commands or xcodebuild (actually carthage bootstrap) commands hang much longer than usual.

Happens both on M1 mac mini 16GB ram and Intel i7 mac mini 2018 32GB ram. Rebooting mac, killing processes like CoreSimulatorService, Xcode-related ones or simdiskimaged seemed never helpful.

We found that simdiskimaged process tops over 440% of CPU% on Activity Monitor when hanging. It takes over 2m 30s to execute only simple command like xcrun simctl list, whether or not using Xcode 16 beta. (same thing happens on DEVELOPER_DIR=Xcode 15.4 too)

What is weird is: opening Xcode on GUI also hangs (Not Responding) but if I force quit it and re-execute, this symptom would be gone after opening Simulator.app on GUI.

Anyone who suffered from this kind of behavior? as a iOS CI maintainer? Should I file FBA which will be checked as 'normal behavior'?

Hello, sorry to hear the issues. Would you be able to help our analysis by filing a bug to http://feedbackassistant.apple.com, and attaching a sudo sysdiagnose and ideally a xcrun simctl diagnose? Thank you!

You are asking me to leak my mac info which is a rent from company... If I can reproduce on my private mac, I will.

*I'm checking if I can find out what happens when xcrun simctl hangs but it seems like something(not clear but seems like kernel_task) is blocking simctl process for no reason while it's frozen... top -l 1 | grep simctl (5s interval) shows simctl process is sleeping until the freezing resolved and command executed

Thanks, if collecting the diagnostics needs to be more narrow, would a sudo spindump simdiskimaged or its related backtrace be possible? Also, do you have a rough count on how many simulator runtimes are installed on that machine?

Note that this behavior is first time seen after installing Xcode 16 beta and additional simruntimes.

Each machine has simruntimes listed below:

  • iOS 15.4
  • iOS 16.4
  • iOS 17.0.1, 17.2, 17.4, 17.5
  • iOS 18 beta (new)
  • tvOS 15.2
  • tvOS 16.4
  • tvOS 17.0, 17.2, 17.4, 17.5
  • tvOS 18 beta (new)
  • watchOS 8.3
  • watchOS 9.4
  • watchOS 10.0, 10.2, 10.4, 10.5
  • watchOS 11 beta (new)
  • xrOS 1.1, 1.2
  • xrOS 2 beta (new)

Filed FBA https://feedbackassistant.apple.com/feedback/13893850 because spindumps were massive although I created only 3 files of spindumps(simdiskimaged, diskimagesiod, kernel_task).

I just realized that this behavior was not because of Xcode 16 but coming with Sonoma 14.5 in terms of Simulator-related process. When using iOS 17.x simulators for xctest, diskimagesiod process numbers up over 30 processes on Activity monitor(in memory section). I'll add this feature to existing FBA. Pretty disappointed in Sonoma, showing significant another right after solving external drive related one...

FBA was torn down due to insufficient evidence; but finally picked off the culprit. xcrun simctl ran smoothly after I deleted /Library/Developer/PrivateFrameworks and re-run xcodebuild -runFirstLaunch without Xcode 16 beta. Seems something not going well on simdiskimaged of Xcode 16 beta. If you are installing and using multiple simulators via dmg images directly downloaded from Apple Developer, consider using additional components not from Xcode 16 beta.

xcrun/xcodebuild command hangs after installing xcode 16 beta & iOS 18 beta