iOS 14 simulators crashing & rebooting

My iOS 14 simulators are constantly crashing/rebooting. Console shows a crash inside "NRPairedDeviceRegistry waitForPairingStorePathPairingID" whereas Xcode logs "XPC connection interrupted
Message from debugger: Terminated due to signal 9"

I have tried different simulators, deleted and reset existing one, re-installed the Xcode 12 beta 1 but it's still happening.

Any suggestions how to use the simulators?

Code Block
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace LIBXPC, Code 0x4
Application Specific Information:
CoreSimulator 725.10 - Device: iPhone SE (2nd generation) (CAA00201-7B3F-4663-A855-F927586BDDD2) - Runtime: iOS 14.0 (18A5301v) - DeviceType: iPhone SE (2nd generation)
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff5bb62e36 semaphore_wait_trap + 10
1 libdispatch.dylib 0x00007fff20104244 _dispatch_sema4_wait + 16
2 libdispatch.dylib 0x00007fff20104743 _dispatch_semaphore_wait_slow + 98
3 com.apple.private.NanoRegistry 0x00007fff52e2ff74 -[NRPairedDeviceRegistry waitForPairingStorePathPairingID:] + 175
4 com.apple.BulletinDistributorCompanion 0x00007fff47ede0b5 -[BLTSettingSyncServer init] + 260
5 com.apple.BulletinDistributorCompanion 0x00007fff47eb41f8 -[BLTSettingSyncInternal connect] + 29
6 com.apple.BulletinDistributorCompanion 0x00007fff47ecf1f4 -[BLTSettingSync initWithSectionConfiguration:queue:watchKitAppList:] + 134
7 com.apple.BulletinDistributorCompanion 0x00007fff47ec4e34 -[BLTBulletinDistributor init] + 660
8 com.apple.BulletinDistributorCompanion 0x00007fff47ec4b8b __43+[BLTBulletinDistributor sharedDistributor]_block_invoke + 16
9 libdispatch.dylib 0x00007fff20103dac _dispatch_client_callout + 8
10 libdispatch.dylib 0x00007fff20105001 _dispatch_once_callout + 20
11 com.apple.BulletinDistributorCompanion 0x00007fff47ec4b79 +[BLTBulletinDistributor sharedDistributor] + 46
12 bulletindistributord 0x000000010eb16388 0x10eb15000 + 5000
13 libdyld.dylib 0x00007fff20253941 start + 1


Answered by mbuchetics in 614707022
It looks like something is odd with device_set.plist. After I deleted the simulators, they are still in that plist as "Default Devices". After I removed them from the plist manually, the Xcode 12 simulator seems to be running fine again.
If you haven't already, please file a new issue via Feedback Assistant (and post the FB number here for reference).


Yes, please file a new issue with Feedback Assistant. When you do, please be sure to attach the output of xcrun simctl diagnose to the issue so we can see what's going on. Thanks!!
Thank you for looking into this. The issue is FB7756203 and I just attached the output of the diagnose tool.
mbuchetics: can you clarify if this is the entire simulator or just some processes crashing in a loop?
Simulator.app itself did not crash, but rather iOS 14 inside. Even with no iOS app running (only starting Simulator.app with any iOS 14 device) it would end up in a crash & reboot loop. Looking at the diagnose file myself I noticed that there were a bunch of missing simulators. So I uninstalled all Xcode versions (10.3, 11.4, 11.5 and 12.0-beta1), deleted ~/Library/Developer and re-installed Xcode 11.5 and 12.0-beta1. Everything seems to be working fine now!
After I deleted all installed Xcode versions and re-installed only Xcode 12-beta1 and Xcode 11.5, everything was working again. But after deleting some simulators from Xcode 11.5, the problem reappeared. I attached another diagnose to the FB issue.
Accepted Answer
It looks like something is odd with device_set.plist. After I deleted the simulators, they are still in that plist as "Default Devices". After I removed them from the plist manually, the Xcode 12 simulator seems to be running fine again.
Ok, didn't want to mark that as a solution ... somehow Xcode 11.5 messes up the device_set.plist and Xcode 12 is not happy with that.
Thanks for following up on this!! It sounds like you're able to reproduce this still. Would you be able to add some detailed reproduction steps here and/or in feedback assistant for exactly what steps you're taking, so we can try the same steps? Clarifying how you're deleting and reinstalling the Xcode versions, how you're launching Xcode and Simulator after that, how you're deleting Simulators would be really helpful in trying to nail down what's going wrong here. Thank you!!
Ok, trying to remember all the steps:
  • Deleted all existing Xcode versions from the Applications (Xcode 10.3, 11.4, 11.5, 12-beta1)

  • sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService

  • Deleted the entire ~/Library/Developer folder

  • Rebooted macOS

  • Installed Xcode 12-beta1 and started the Fruta Sample to verify that iOS 14 simulators were working (mainly using iPhone 11 Pro simulator) -> success!

  • Installed Xcode 11.5 and started one of my apps to verify iOS 13.5 simulators were working -> success

  • Went to Xcode 11.5 -> Devices and Simulators and deleted a lot of simulators that I don't use, only keeping a few

  • Used Xcode 12-beta1 again, started the Fruta sample with an iOS 14 simulator (iPhone 11 Pro) and it crashed again (+ reboot loop)

  • Ran xcrun simctl diagnose, noticed that it was again complaining about a missing default simulator

  • Looked at device_set.plist (inside ~/Library/Developer/CoreSimulator/Devices) and noticed a lot of simulators that I don't have any more (when running xcrun simctl list they don't show up, everything looks ok there)

  • Edited device_set.plist to only include simulators that xcrun simctl list shows -> success, Xcode 12 simulators seem to be working again!

  • After using Xcode 11.5 again, somehow device_set.plist gets modified again (without me adding & deleting any simulators) and again includes a lot of iOS 12.4 and older iOS 13 simulators. xcrun simctl list does not show those. However, so far, the iOS 14 simulators appear to be working fine.

Awesome, thank you so much for the detail!!! I'll see if we can reproduce this internally.
Sorry, just had one more thought, if you could attach the device_set.plist, maybe named device_set-xc115.plist that you have after running Xcode-11.5 and the one you see from running Xcode-12-beta1, maybe named device_set-xc12b1.plist, in Feedback Assistant, that would be a huge help. Thanks again @mbuchetics!!
I renamed the existing device_set.plist and started Xcode 11.5, later Xcode 12. This did not create any new file. However, after I rebooted macOS, I ended up with a new device_set.plist which looks like it only contains the simulators that I have in Xcode 11.5 and 12-beta1. The file is attached in the Feedback Assistant.
Nevermind, renaming/deleting device_set.plist caused Xcode to recreate the simulators and I ended up with a lot of duplicated devices. Also, iOS 14 is again crashing and rebooting within the simulator :( Going to re-install everything again and not touch anything ...
Any chance you have Sherlock installed? I was running into a similar issue of the iOS 14 simulators crashing and restarting every few seconds. I quit the Sherlock app and the crashes stopped. I restarted Sherlock to verify and the crashes started happening again.
iOS 14 simulators crashing & rebooting
 
 
Q