Overview
Users utilizing the M1 resource class on the CircleCI macOS executor are seeing builds hang. Though we can see builds hanging or timing out for other reasons, a specific bug in Apple's hypervisor framework that can cause issues in virtualized environments. These issues arise when a simulator is launched. You may notice a "Too long with no output (exceeded 5m0s): context deadline exceeded" error.
Resolution
We've addressed this issues in the xcode 15 beta image. You can read more about the improvements made here.
If you are unable to use xcode 15.1 or later, you may try the steps listed below. We have significant improvements in performance when a simulator is booted for the second time by preforming the following steps:
1. Launch your simulator at the beginning of your build. You may use the CircleCI macOS orb's preboot-simulator
command.
2. Wait for your simulator to to be booted. You may use the CircleCI macOS orb. This orb includes a command; wait-until-simulator-booted
. This command will wait until your simulator has booted or your job's `NO_OUTPUT_TIMEOUT`
is hit. This is 10 minutes by default.
3. Shutdown the simulator: xcrun simctl
shutdown $DEVICE_ID
4. repeat steps 1 & 2
Other workarounds :
- Adding a retry to the step in which you start your simulator to avoid having to re-run your build.
- Add a final step that uses the when attribute when the value of
"on_fail"
and CircleCI v1 retry a build endpoint to rerun the job upon failure. - Increase the amount of time your build will continue to run without any output by using the `no_output_timeout` key.
Additional resources:
- Discuss thread: Severe performance problems with Xcode 15
- MacOS Execution environment
Comments
Article is closed for comments.