CoreSimulatorService deadlock and unresponsive simulators

CoreSimulatorService stops responding and the whole simulator subsystem wedges — simctl, Simulator.app, and xcodebuild all block at once.

Strong fit Likely class: CoreSimulatorService deadlock / shared-state contention · Updated

Symptom

The simulator subsystem as a whole stops responding. It is not one command — simctl, Simulator.app, and xcodebuild all stall at the same time, because they all depend on the same daemon: CoreSimulatorService.

What it usually looks like

Why it happens / likely failure classes

CoreSimulatorService mediates essentially all simulator state for your user session. It serializes a lot of operations internally. A deadlock or unresponsive state typically traces to:

The baseline fragility exists even for a single run. Concurrency does not cause it so much as it dramatically raises the odds of hitting it.

Quick checks

# Is the service alive, and how long has it been running?
pgrep -lf CoreSimulatorService

# Who else is touching the subsystem right now?
pgrep -lf 'xcodebuild|simctl|Simulator'

# Selected Xcode vs. running service — mismatch is a known trigger
xcode-select -p

# A bounded probe — if this hangs too, the service is wedged
xcrun simctl list devices

A spike of crash logs for com.apple.CoreSimulator.CoreSimulatorService in Console (or ~/Library/Logs/CoreSimulator/) is a strong tell.

Manual mitigations

# 1) Try a clean shutdown first (may itself hang if fully deadlocked)
xcrun simctl shutdown all

# 2) Quit Simulator.app, then restart the daemon. launchd relaunches it.
killall Simulator 2>/dev/null || true
killall -9 com.apple.CoreSimulator.CoreSimulatorService 2>/dev/null || true

# 3) Re-point Xcode if you switched versions
sudo xcode-select -s /Applications/Xcode.app

# 4) Verify recovery
xcrun simctl list devices

# 5) Prune state once responsive
xcrun simctl delete unavailable

If it wedges again within minutes, suspect concurrent callers and stop them before retrying. Logging out (the daemon is per-user) or rebooting clears the most stubborn states.

When XCSteward may help

Preventing and recovering from this class of wedge is a core design goal:

This is a strong candidate to test XCSteward against, particularly if the wedge shows up under parallel or agent-driven activity.

When XCSteward probably will not help

Common questions

What does "CoreSimulatorService deadlock and unresponsive simulators" usually mean?
It usually points to CoreSimulatorService deadlock / shared-state contention. CoreSimulatorService stops responding and the whole simulator subsystem wedges — simctl, Simulator.app, and xcodebuild all block at once. Start by checking simulator readiness, destination selection, CoreSimulator/simctl responsiveness, and whether another xcodebuild, simctl, or Simulator process is already active before treating it as a test-code failure.
Can XCSteward help with "CoreSimulatorService deadlock and unresponsive simulators"?
This is a strong fit when the failure is operational: simulator readiness, destination resolution, CoreSimulator responsiveness, cleanup, timeouts, or local concurrency. XCSteward may help by making those phases bounded, serialized, and easier to inspect. It will not fix broken tests, code signing, missing runtimes, or vendor image bugs.
What should I check first?
Check whether xcrun simctl commands return promptly, whether xcodebuild can resolve a concrete simulator destination, whether the device is truly ready rather than merely Booted, and whether concurrent agents, scripts, or manual runs are touching the same simulator subsystem.