Skip to content

test: Observe iOS CrashE2E process exits - #9345

Merged
supervacuus merged 7 commits into
mainfrom
test/crash-e2e-process-exit
Oct 14, 2026
Merged

supervacuus merged 7 commits into
mainfrom
test/crash-e2e-process-exit

Conversation

@supervacuus

@supervacuus supervacuus commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

📜 Description

  • observes simulator app termination using the launched PID and kernel NOTE_EXIT notifications instead of polling launchd job registrations
  • captures launch output and timeout diagnostics, and stops the app before storing failure caches or continuing to another scenario
  • isolates report assertion failures as known SDK failures (for CI) from launch, observation, timeout, and I/O errors
  • adds standalone runner tests since the CrashE2E runner has already accumulated quite a bit of behavior (+ lets the tests run in CI before the Crash E2E scenrios)

#skip-changelog

💡 Motivation and Context

A recent investigation into increasing CrashE2E failures in CI revealed: a launchd job can remain registered after its process exits and, as a consequence, a failed launchctl query does not prove the app terminated. Neither should determine whether the CrashE2E harness proceeds to drain and verify reports.

In addition, when we introduced CrashE2E in CI, we added coarse known-failure handling that could disguise harness failures as expected SDK reporting gaps (for instance, when SentryCrash can't pass a scenario that the KSCrash integration supports) and bypass cleanup. Classifying failures only after cleanup preserves scenario isolation and prevents false-green runs.

Both will help us with distinguishing cause and effect when CrashE2E runs fail in CI (especially for iOS simulator runs).

💚 How did you test it?

I ran the newly added test suite for the runner and the CrashE2E runner on some iOS tests.

📝 Checklist

You have to check all boxes before merging:

  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.
  • If I added a new public API, I also added it to the SentryObjC wrapper.

Closes #9346

@supervacuus supervacuus self-assigned this Oct 14, 2026
@supervacuus supervacuus added the run-full-ci Allows gated GitHub Action workflows to run for a labelled pull request label Oct 14, 2026

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread TestApps/CrashE2E/Runner/Sources/CrashE2ERunner/IOSPlatformRunner+Process.swift Outdated
@sentry

sentry Bot commented Oct 14, 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 (-15 B) 3.2 MB (0 B)

Configure sentry-cocoa status check rules

@sentry

sentry Bot commented Oct 14, 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

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1216.43 ms 1260.90 ms 44.48 ms
Size 24.14 KiB 1.39 MiB 1.36 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
1cba5c4 1230.28 ms 1271.48 ms 41.20 ms
8a8e812 1233.65 ms 1257.19 ms 23.54 ms
89ccfc2 1210.78 ms 1245.02 ms 34.24 ms
fee4ec3 1229.19 ms 1269.85 ms 40.66 ms
545ca7e 1233.89 ms 1269.30 ms 35.41 ms
b0aa013 1208.48 ms 1244.00 ms 35.52 ms
02b997a 1224.77 ms 1263.96 ms 39.19 ms
88e0b6e 1212.93 ms 1251.27 ms 38.33 ms
80db012 1211.67 ms 1273.24 ms 61.57 ms
f6e658b 1203.39 ms 1238.34 ms 34.95 ms

App size

Revision Plain With Sentry Diff
1cba5c4 24.14 KiB 1.38 MiB 1.36 MiB
8a8e812 24.14 KiB 1.38 MiB 1.36 MiB
89ccfc2 24.14 KiB 1.38 MiB 1.36 MiB
fee4ec3 24.14 KiB 1.39 MiB 1.36 MiB
545ca7e 24.14 KiB 1.39 MiB 1.36 MiB
b0aa013 24.14 KiB 1.38 MiB 1.36 MiB
02b997a 24.14 KiB 1.39 MiB 1.36 MiB
88e0b6e 24.14 KiB 1.38 MiB 1.36 MiB
80db012 24.14 KiB 1.39 MiB 1.36 MiB
f6e658b 24.14 KiB 1.38 MiB 1.35 MiB

Previous results on branch: test/crash-e2e-process-exit

Startup times

Revision Plain With Sentry Diff
9720cd2 1222.38 ms 1268.88 ms 46.49 ms
caade41 1224.85 ms 1263.20 ms 38.35 ms

App size

Revision Plain With Sentry Diff
9720cd2 24.14 KiB 1.39 MiB 1.36 MiB
caade41 24.14 KiB 1.39 MiB 1.36 MiB

@philprime philprime left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Comment thread Makefile
@supervacuus
supervacuus enabled auto-merge (squash) October 14, 2026 15:26

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread TestApps/CrashE2E/Runner/Sources/CrashE2ERunner/IOSPlatformRunner+Process.swift Outdated
@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

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0aebb74. Configure here.

@supervacuus
supervacuus merged commit 654a918 into main Oct 14, 2026
277 checks passed
@supervacuus
supervacuus deleted the test/crash-e2e-process-exit branch October 14, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved 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.

test: Observe iOS CrashE2E process exits

2 participants