Skip to content

[CI] Collect diagnostic info on LaunchTimedOut simulator failures. Ref #25299#25300

Draft
rolfbjarne wants to merge 5 commits intomainfrom
dev/rolf/ci-launchtimedout
Draft

[CI] Collect diagnostic info on LaunchTimedOut simulator failures. Ref #25299#25300
rolfbjarne wants to merge 5 commits intomainfrom
dev/rolf/ci-launchtimedout

Conversation

@rolfbjarne
Copy link
Copy Markdown
Member

When simulator tests fail with LaunchTimedOut, collect diagnostic info:

  • Simulator list (simctl list) to check boot state
  • Simulator boot status for the target UDID
  • Installed apps on the simulator

Also run simctl diagnose in the pipeline on test failure (not only
when system.debug is true).

…#25299

When simulator tests fail with LaunchTimedOut, collect diagnostic info:
- Simulator list (simctl list) to check boot state
- Simulator boot status for the target UDID
- Installed apps on the simulator

Also run simctl diagnose in the pipeline on test failure (not only
when system.debug is true).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@rolfbjarne
Copy link
Copy Markdown
Member Author

CC #25299

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates CI and xharness to collect additional simulator diagnostics when tests fail due to simulator launch timeouts, improving debuggability of intermittent LaunchTimedOut failures in the Apple-platform test infrastructure.

Changes:

  • Run xcrun simctl diagnose in the test pipeline on job failure (not only when system.debug is enabled) and publish the resulting artifact.
  • Add xharness-side diagnostic collection for LaunchTimedOut results (simctl list, bootstatus, listapps) into a dedicated log.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tools/devops/automation/templates/tests/run-tests.yml Adjusts step conditions so simulator diagnostics are collected/published on failures as well as debug runs.
tests/xharness/AppRunner.cs Adds targeted LaunchTimedOut diagnostic logging via simctl commands.

Comment thread tests/xharness/AppRunner.cs
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

rolfbjarne and others added 2 commits May 6, 2026 14:26
Log the LaunchTimedOut condition to the Jenkins main log so it's visible
in the pipeline output (previously it was only in a per-test Run log file).
Also collect load average and recent crash reports in the diagnostic log,
since we found sqlite3 crashes correlated with LaunchTimedOut failures.

Ref #25299

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When a simulator test launch times out, retry once with a fresh AppRunner.
This addresses the transient failures caused by high system load and
sqlite3 crashes on CI machines that prevent simulators from properly
launching test apps.

Also propagate AppRunner.FailureMessage to the test task so failure
details are visible in the test report.

Ref #25299

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

✅ [PR Build #23a7934] Build passed (Build packages) ✅

Pipeline on Agent
Hash: 23a7934e38792b5181a671fbf2d68ed66e3d106a [PR build]

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

✅ [PR Build #23a7934] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: 23a7934e38792b5181a671fbf2d68ed66e3d106a [PR build]

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 23a7934e38792b5181a671fbf2d68ed66e3d106a [PR build]

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

✅ [PR Build #23a7934] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: 23a7934e38792b5181a671fbf2d68ed66e3d106a [PR build]

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

🔥 [CI Build #23a7934] Test results 🔥

Test results

❌ Tests failed on VSTS: test results

1 tests crashed, 2 tests failed, 164 tests passed.

Failures

❌ fsharp tests

2 tests failed, 2 tests passed.

Failed tests

  • fsharp/iOS - simulator/Debug: HarnessException (Harness exception for 'fsharp': System.NullReferenceException: Object reference not set to an instance of an object.
    at Xharness.Jenkins.TestTasks.RunSimulator.RunTestAsync() in /Users/builder/azdo/_work/2/s/macios/tests/xharness/Jenkins/TestTasks/RunSimulator.cs:line 135
    at Xharness.Jenkins.TestTasks.RunTest.ExecuteAsync() in /Users/builder/azdo/_work/2/s/macios/tests/xharness/Jenkins/TestTasks/RunTest.cs:line 113
    at Xharness.Jenkins.TestTasks.TestTask.RunInternalAsync() in /Users/builder/azdo/_work/2/s/macios/tests/xharness/Jenkins/TestTasks/TestTask.cs:line 234)
  • fsharp/tvOS - simulator/Debug: HarnessException (Harness exception for 'fsharp': System.NullReferenceException: Object reference not set to an instance of an object.
    at Xharness.Jenkins.TestTasks.RunSimulator.RunTestAsync() in /Users/builder/azdo/_work/2/s/macios/tests/xharness/Jenkins/TestTasks/RunSimulator.cs:line 135
    at Xharness.Jenkins.TestTasks.RunTest.ExecuteAsync() in /Users/builder/azdo/_work/2/s/macios/tests/xharness/Jenkins/TestTasks/RunTest.cs:line 113
    at Xharness.Jenkins.TestTasks.TestTask.RunInternalAsync() in /Users/builder/azdo/_work/2/s/macios/tests/xharness/Jenkins/TestTasks/TestTask.cs:line 234)

Html Report (VSDrops) Download

❌ windows tests

🔥 Failed catastrophically on VSTS: test results - windows (no summary found).

Html Report (VSDrops) Download

Successes

✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 6 tests passed. Html Report (VSDrops) Download
✅ linker: All 44 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 13 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 18 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 18 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 13 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

macOS tests

✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Ventura (13): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sequoia (15): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Tahoe (26): All 5 tests passed. Html Report (VSDrops) Download

Linux Build Verification

Linux build succeeded

Pipeline on Agent
Hash: 23a7934e38792b5181a671fbf2d68ed66e3d106a [PR build]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants