Skip to content

test: Harden CrashE2E timeout diagnostics - #9390

Closed
supervacuus wants to merge 4 commits into
mainfrom
test/crash-e2e-diagnostics
Closed

supervacuus wants to merge 4 commits into
mainfrom
test/crash-e2e-diagnostics

Conversation

@supervacuus

@supervacuus supervacuus commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

(from @supervacuus: I only let the clanker iterate on some pathologies in the CI environment rather than my local machine, so that I can continue my work on #9327. Feel free to ignore this; I will drop it once I have sensible findings and create a new PR with cleaned up and reviewed changes)

Summary

Develop safer CrashE2E timeout diagnostics following #9345. Recent failures attempted sample <pid> 2, but its eight-second command timeout discarded every inspected stack report, including captures already processing symbols.

This draft starts with two separately reviewable changes:

  • Accept simulator-confirmed .stopped(lastPID: nil) in waitForAppToStop, with regression coverage for both stopped states and invalidation by subsequent launches.
  • Add an isolated, opt-in spindump feasibility probe to the existing macOS 26 SentryCrash iOS job. Production stack collection remains unchanged until the probe results and cancellation mechanism have been reviewed.

Capture validation

The probe runs its target as the normal runner user and checks:

  • Target-only binary stackshot capture, then offline reporting after target exit.
  • A known blocked stack frame, continued heartbeat, and cooperative target exit.
  • Three SIGTERM and three SIGKILL interruptions during collection, without any target-resume workaround.
  • Raw-data preservation and successful re-rendering after a deliberately stalled rendering phase times out.

Probe artifacts are uploaded even on success: results, command output/timing, raw captures, reports, and the fixture binary/dSYM. Successful cancellation tests do not prove the absence of every race; collection must also be reviewed for ownership of target suspension before adoption.

The scenario's original timeout/failure is not relaxed. The intended follow-up in this draft is to integrate a validated capture/report pipeline and retain the state fix in the same PR.

Local validation

  • Reproduced both nil-PID regression failures before the fix.
  • 66 Swift runner tests passed after the fix.
  • Six unprivileged probe tests passed, including the real heartbeat target.
  • Standalone runner build passed.
  • make format, make analyze, workflow lint, and pre-commit hooks passed.
  • Privileged capture intentionally remains a validation checkpoint on the actual macOS 26 CI image; local development is on macOS 27.

#skip-changelog

Accept either stopped state when waiting for termination. The last PID
is diagnostic context, not a requirement for a confirmed stop.

Cover simulator confirmation, no-such-process responses, unknown state,
and invalidation of either stop confirmation by a subsequent launch.
Validate target-only binary capture and offline reporting on the
CrashE2E macOS CI image before replacing timeout diagnostics.

Check interrupted collection against a non-root heartbeat target and
retain raw data across a deliberately stalled reporting phase. Upload
probe evidence on success as well as failure. Keep sample unchanged
until the collector has been validated.
@supervacuus supervacuus added the run-full-ci Allows gated GitHub Action workflows to run for a labelled pull request label Oct 19, 2026
@sentry

sentry Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Size Analysis

1 component analyzed

iOS Builds

Name Configuration Version Download Size Install Size
SDK-Size (iOS)
io.sentry.sample.SDK-Size
Release 9.30.2 (1) 1.2 MB (+19 B) 3.1 MB (0 B)

Configure sentry-cocoa status check rules

@sentry

sentry Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

📲 Install Builds

iOS

🔗 App Name App ID Version Configuration
SDK-Size io.sentry.sample.SDK-Size 9.30.2 (1) Release

⚙️ sentry-cocoa Build Distribution Settings

Replace the eight-second sample invocation with a symbolicated,
target-only spindump and a requested 60-second collection budget.
Preserve scenario deadlines, cleanup, and missing-evidence diagnostics.

Validate the non-root sudo invocation on CI. Keep the deliberate
SIGINFO wait as an explicit observation rather than confusing it with
normal capture behavior. Retain target-safety checks and fix the
experimental probe group limit for macOS.
Add an opt-in app scenario that waits after SDK startup and a live
Swift test of the normal timeout, stack capture, and cleanup path.
Require symbolicated app stacks and a passing following scenario
while retaining the original timeout failure.

Reuse the ordinary iOS CI builds for both reporters and preserve
separate timeout-test artifacts even when the test passes.
@github-actions

Copy link
Copy Markdown
Contributor

🚨 Detected changes in high risk code 🚨

High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:

  • .github/file-filters.yml

@supervacuus

Copy link
Copy Markdown
Collaborator Author

closing in favor of #9412

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

Labels

run-full-ci Allows gated GitHub Action workflows to run for a labelled pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant