CI: fail immediately when am instrument crashes instead of waiting for pipeline timeout
- Dominant language
- C#
- Stars
- 2.1k
- Forks
- 579
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 252
Description
## Problem
During the CoreCLRTrimmable investigation in #11091, a native crash in the test app caused `am instrument` to silently stop producing output. The Android MSBuild task kept waiting until the pipeline hit the 30-minute stage timeout, at which point CI reported "timeout" rather than "instrumentation crashed". This:
1. Burns ~30 min of pipeline time per failed run.
2. Obscures the real cause — the user has to manually dig through logcat to find the FATAL signal that happened minutes earlier.
3. Makes triage extremely slow because the first-line error message is misleading.
## Proposal
While `am instrument` is running, tail `adb logcat` in parallel and watch for:
- `FATAL EXCEPTION` lines
- `tombstone` written notifications
- `signal 6`/`signal 11` aborts in the test process
- The test process PID disappearing from `adb shell ps -A`
When any of these are observed, fail the `RunTestApp` MSBuild task immediately with:
- The fatal signal / exception excerpt from logcat
- A pointer to the tombstone file on the device
- The abbreviated native stack if available
## Acceptance criteria
- [ ] A native crash in a device test run fails the build within ~10 seconds of the crash (not ~30 minutes of timeout).
- [ ] The first error line in the MSBuild log identifies the crash, not a timeout.
- [ ] Existing passing tests continue to work unchanged.
## Discovered during
PR #11091 — adding the CoreCLRTrimmable CI lane. Specific session where 30-min timeouts masked an instant crash in the trimmable typemap generator output.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.