skip to Main Content

I was trying to run iOS 15 Simulator on Xcode 15.0.1, but I got an error: "Unable to boot the Simulator. Interrupted system call"

I tried:

  1. Reinstalling Xcode
  2. Deleted "Derived Data"
  3. Redownloaded iOS 15 runtime

None of the above methods works for me.

Here is the error log:

Domain: NSPOSIXErrorDomain
Code: 4
Failure Reason: Interrupted system call
User Info: {
    DVTErrorCreationDateKey = "2023-10-26 16:42:13 +0000";
    IDERunOperationFailingWorker = "_IDEInstalliPhoneSimulatorWorker";
    Session = "com.apple.CoreSimulator.SimDevice.AA0321E3-E8C1-4B8D-A650-6078D711A67E";
}
--
Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed or quit responding
Domain: com.apple.SimLaunchHostService.RequestError
Code: 4
--

Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : {
    "device_model" = "iPhone13,1";
    "device_osBuild" = "15.0 (19A339)";
    "device_platform" = "com.apple.platform.iphonesimulator";
    "dvt_coredevice_version" = "348.1";
    "dvt_mobiledevice_version" = "1643.2.4";
    "launchSession_schemeCommand" = Run;
    "launchSession_state" = 1;
    "launchSession_targetArch" = arm64;
    "operation_duration_ms" = 213;
    "operation_errorCode" = 4;
    "operation_errorDomain" = NSPOSIXErrorDomain;
    "operation_errorWorker" = "_IDEInstalliPhoneSimulatorWorker";
    "operation_name" = IDERunOperationWorkerGroup;
    "param_debugger_attachToExtensions" = 0;
    "param_debugger_attachToXPC" = 1;
    "param_debugger_type" = 3;
    "param_destination_isProxy" = 0;
    "param_destination_platform" = "com.apple.platform.iphonesimulator";
    "param_diag_MainThreadChecker_stopOnIssue" = 0;
    "param_diag_MallocStackLogging_enableDuringAttach" = 0;
    "param_diag_MallocStackLogging_enableForXPC" = 1;
    "param_diag_allowLocationSimulation" = 1;
    "param_diag_checker_tpc_enable" = 1;
    "param_diag_gpu_frameCapture_enable" = 0;
    "param_diag_gpu_shaderValidation_enable" = 0;
    "param_diag_gpu_validation_enable" = 0;
    "param_diag_memoryGraphOnResourceException" = 0;
    "param_diag_queueDebugging_enable" = 1;
    "param_diag_runtimeProfile_generate" = 0;
    "param_diag_sanitizer_asan_enable" = 0;
    "param_diag_sanitizer_tsan_enable" = 0;
    "param_diag_sanitizer_tsan_stopOnIssue" = 0;
    "param_diag_sanitizer_ubsan_stopOnIssue" = 0;
    "param_diag_showNonLocalizedStrings" = 0;
    "param_diag_viewDebugging_enabled" = 1;
    "param_diag_viewDebugging_insertDylibOnLaunch" = 1;
    "param_install_style" = 0;
    "param_launcher_UID" = 2;
    "param_launcher_allowDeviceSensorReplayData" = 0;
    "param_launcher_kind" = 0;
    "param_launcher_style" = 0;
    "param_launcher_substyle" = 0;
    "param_runnable_appExtensionHostRunMode" = 0;
    "param_runnable_productType" = "com.apple.product-type.application";
    "param_structuredConsoleMode" = 1;
    "param_testing_launchedForTesting" = 0;
    "param_testing_suppressSimulatorApp" = 0;
    "param_testing_usingCLI" = 0;
    "sdk_canonicalName" = "iphonesimulator17.0";
    "sdk_osVersion" = "17.0";
    "sdk_variant" = iphonesimulator;
}
--


System Information

macOS Version 14.0 (Build 23A344)
Xcode 15.0.1 (22266) (Build 15A507)
Timestamp: 2023-10-27T00:42:13+08:00

As you can see I’m running Xcode on my MacBook Pro 16 (M1 Max) with macOS Sonoma

2

Answers


  1. Chosen as BEST ANSWER

    Okay, answering my own question, after trying thousands of methods I've finally fixed it:

    1. Close Xcode, type this command in terminal: sudo chmod 1777 /tmp
    2. Clean the dyld folder in this path: ~/Library/Developer/CoreSimulator
    3. Restart Xcode, done!

  2. Deleting caches should not be necessary here. I expect that will just cause the issue to recur later.

    There are a few causes we’ve identified for this issue:

    1. The dyld_sim shared cache fails to map into a process within the watchdog timer because it was just recently created and is still being scanned by the system. Deleting the cache will momentarilary address this problem, but you would hit it again the next time the cache is created. Waiting ~2 minutes should allow the scan to complete. Additionally, if you update to Xcode 15.3 Beta 2 or later (released last week), we now avoid attempting to use the cache until that scan is complete.

    2. There is a performance issue reading from the simulator runtime disk images which can result in boot triggering that watchdog timer, especially if I/O is competing with the process that is generating the dyld shared cache. This performance issue has been addressed in macOS 14.4 Beta and later.

    As such, I reccomend that users facing this issue please update to macOS 14.4 Beta or later and Xcode 15.3 Beta 2 or later. If you still see this issue, please collect the following tarballs and attach them to a report at http://bugreport.apple.com:
    xcrun simctl diagnose
    sudo sysdiagnose

    Also, if you’re able, please enable debug logging via:
    defaults write com.apple.CoreSimulator DebugLogging -bool YES

    (you can remove the debug logging later with defaults delete com.apple.CoreSimulator DebugLogging)

    Note that we’ve had multiple reports of this issue over the past 6 months, but triage has been difficult in part becuase we have not been getting the logging requested above and by the time the reporter gets around to responding to the request, they are out of the problematic state (because it usually resolves on its own in a few minutes). Please do not assume that someone else is providing the data. Thanks!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search