Repository navigation
Say when the simulator restarted under a failed iOS test step (#508) - #514
Merged
Merged
Conversation
…that is what #508's "signal term" was The stale-live-playlist test was not hanging: no time allowance is set, so nothing kills a hung test, and its waits are bounded. The host's logs show the simulator booting again five seconds into the test, with every process in it ending together. ios/check now counts the device's boots after a failed step and names a restart; a restart still fails the step. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MJAhQmFgdRRAKUaMHibQLe
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #508
The cause: the simulator restarted under the runner, not a hang
The SIGTERM came from outside the test. The simulator restarted about five seconds into an eight-second test. What restarted it is not known.
The original result bundle is gone.
ios/checkdeletes.build/ios-checkon every run, and #430's worktree has been removed. The evidence below is from the host's logs for that run (2026-10-12, 17:15–17:27 local, simulatorsp-430). Those logs are still on disk.system.log(~/Library/Logs/CoreSimulator/<udid>/system.log) shows a newsyslogdat 17:24:17. The run's only other boots were xcodebuild's own: one at the start, and later runs.coreaudiodreleased all of the simulator's audio contexts, including those made at its boot.xctest(pid 79037) ended.SimRenderServerandSimMetalHostdied. Apart from the final shutdown, these are the only such deaths in the run.simctlat that time. I searched every session transcript on the host forsimctl,xcodebuildandios/checkbetween 05:30 and 06:30 UTC.ProbeTestsrun has the same fingerprint. It crashed "with signal term" at 00:41:00 on 2026-10-12, and its simulator booted again at 00:40:56.Why it cannot be a hang
ios/checknor a scheme or test plan sets-test-timeouts-enabledor a time allowance, and xcodebuild leaves them off by default. A probe test that slept 418 s in one-second steps passed.harness.until(timeout: 90 s). A wait that never ends would therefore fail as aConditionTimeout, never as a SIGTERM.Reproduction
There is no race in this test, so there is no racing side to make lose. A held response or an extra settle makes the test slower, not killed, for the reason above. What I reproduced instead is the external cause, injected deterministically:
xcrun simctl spawn <udid> launchctl reboot userspace, 3 s after the test starts, reports exactlyTest crashed with signal term.on this test. It did so in both runs: the test alone, and its class.kill -TERMon thexctestprocess gives the same text. That shows how unspecific the text is: any SIGTERM to the runner reads as this crash.What changed
No test code changed. The test was not defective, and no change to it can survive the device restarting under it. Nothing is retried or masked, and no assertion was touched.
A diagnostic in
ios/check, for whoever investigates the next one.ios/MoQ), it counts the device's boots, as the distinctsyslogdpids in thatsystem.log. If the device booted more than xcodebuild's own one boot, it says the simulator restarted during the step.sp-508: it was silent after the step's own boot and printed after a second boot.set -euo pipefail.syslogdthat is given a pid an earlier boot had would be missed.ios/CLAUDE.mdgains a bullet: "crashed with signal term" can be the simulator restarting, and is never a hung test.Acceptance criteria
ios/checknow says when one happened.ios/check: met.xcodebuild test -test-iterations 20 -only-testing:SuperPlayerResilienceTests/StaleLivePlaylistPlaybackTests/testAPlaylistHeldByACacheEndsOnTheTypedErrorNamingTheIntermediarypassed 20/20 onsp-508.SP_SIMULATOR=sp-508 ios/checkpassed before the review fixes and on the final commit: 708 tests, 12 on tvOS, 38 inios/MoQ.testALatencyHolds…, andNetworkShapingTests/testACapUnderATraceGovernsWhenItIsTheSlower(3.73 s against a 3.5 s bound). The detector correctly printed nothing for either.No device run: nothing here needs one.
A possible follow-up: find what restarts a simulator mid-run. It has now happened twice (#421's probe and #508).
Review summary
Standards:
ios/CLAUDE.mdbullet stated one observation as a rule. It now says "can be".grep || true, so a missing log cannot fail the function.boot_baseline.Spec:
ios/checkbe shown passing with the diff. It was, before and after the fixes.🤖 Generated with Claude Code
https://claude.ai/code/session_01MJAhQmFgdRRAKUaMHibQLe