Repository navigation
Don't retry+reboot on APP_CRASH on Android devices - #17787
Merged
Merged
Conversation
XHarness exit code 80 (APP_CRASH) on a physical Android device requested an infra retry and a machine reboot. Deterministic, product-caused crashes thus burned all Helix attempts (rebooting device machines each time) and ended dead-lettered without published results or logs. Treat Android devices like Apple devices already are: only emulators and simulators get retry+reboot for APP_CRASH. Android device crashes now fall through to the existing network connectivity check, so a crash caused by a lost Wi-Fi connection still gets a retry (without reboot). Fixes #17786 Co-authored-by: Copilot App <[email protected]>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the physical Android crash-handling change.
No open issues 🎉
What changed in this PR
Updates Helix’s XHarness crash handling so physical Android devices, like Apple devices, no longer trigger infrastructure retries and reboots solely for APP_CRASH (exit code 80).
Changes:
- Preserves retry-and-reboot behavior for emulators, simulators, and missing device information.
- Keeps the existing Android connectivity check available to retry network failures.
- Expands comments to explain the physical-device crash policy.
| File | Description |
|---|---|
| src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/xharness-event-processor.py | Excludes physical Android devices from automatic APP_CRASH retry and reboot handling. |
Review effort: Balanced
akoeplinger
approved these changes
Nov 11, 2026
jonathanpeppers
approved these changes
Nov 11, 2026
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.
Fixes #17786
When XHarness reports exit code 80 (
APP_CRASH) on a physical Android device,xharness-event-processor.pyrequested an infra retry and a machine reboot. A deterministic crash caused by the product used up all Helix attempts, rebooted a device machine on each one, and then dead-lettered the item (exit -1, no published results or logs). On dotnet/runtime'swindows.11.amd64.android.openqueue, this dead-lettered 6–8 items per run.Change
if exit_code == 80 and not (platform == "apple" and is_device)→if exit_code == 80 and not is_deviceThis is option (a) from the issue: Android devices now follow the rule Apple devices already had.
isDevice = !serial.StartsWith("emulator"). Physical phones reporttrueand get no retry or reboot. Emulators (false) and items with no device info (None) keep retry+reboot.NoInternetmetric is sent. Otherwise the item fails normally with its logs..retry/.rebootfiles are only written when a user callsreport_infrastructure_failure.To double check:
This script has no test harness. I ran it locally with a stub
helix.publicmodule, a fakedotnetonPATH, and syntheticdiagnostics.jsonfiles, all for exit code 80. The stubs are not committed.NoInternetmetric sentisDevicemissingThis has not been tested in a real Helix run.
Note
This PR was AI-generated with GitHub Copilot.