Skip to content

fix: crashpad_handler stall in API 29 device tests#60

Merged
MaxMichel2 merged 2 commits into
mainfrom
fix/device-test-crashpad-stall-v2
Jul 21, 2026
Merged

fix: crashpad_handler stall in API 29 device tests#60
MaxMichel2 merged 2 commits into
mainfrom
fix/device-test-crashpad-stall-v2

Conversation

@MaxMichel2

Copy link
Copy Markdown
Collaborator

Summary

  • Revert script: | back to script: >- (single folded line)
  • Replace the one-shot pkill with a background loop that kills crashpad_handler continuously

Root cause of the regression in #58

Two bugs were introduced:

script: | breaks variable scoping. android-emulator-runner@v2 splits multiline scripts by newline and runs each line as a separate sh -c. GRADLE_EXIT set on line 1 is gone by line 3 — Gradle failures were silently masked (always exiting 0). The >- fold is required, not cosmetic.

One-shot kill is too early. The synchronous pkill ran before the action's own adb emu kill. That shutdown triggers a new crashpad_handler to spawn. The killer must run throughout the action's cleanup, not just once before it.

What the fix does

./gradlew ...; GRADLE_EXIT=$?; (while true; do pkill -9 crashpad_handler ...; sleep 2; done) &; exit $GRADLE_EXIT
  • Single line via >- → variables persist, Gradle exit code propagates
  • Background killer loop → starts immediately after Gradle, survives script exit, keeps killing any crashpad_handler that appears during emulator shutdown
  • Runner's own orphan cleanup terminates the loop when the job ends

Test plan

  • API 29 device-tests job completes without hanging after BUILD SUCCESSFUL
  • A failing Gradle build still reports the job as failed (exit code not masked)

🤖 Generated with Claude Code

MaxMichel2 and others added 2 commits July 21, 2026 10:48
The previous fix used `script: |` which android-emulator-runner splits
into separate `sh -c` calls per line — breaking variable persistence and
masking Gradle exit codes. Also, a one-shot pkill runs before the action's
own `adb emu kill`, which can respawn crashpad_handler during emulator
shutdown.

Revert to `>-` (single folded line) so GRADLE_EXIT persists, and replace
the one-shot kill with a background loop that continuously kills
crashpad_handler throughout the action's cleanup phase.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…action

Drop API 29 (known crashpad_handler stall, upstream runner regression).
New matrix: 26, 31, 36. Add get-avd-info composite action to derive arch
and target from the API level automatically, mirroring the Coil approach.
Removes the crashpad workaround and simplifies the emulator-runner config.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@MaxMichel2 MaxMichel2 added the bug Something isn't working label Jul 21, 2026
@MaxMichel2 MaxMichel2 self-assigned this Jul 21, 2026
@MaxMichel2 MaxMichel2 added this to the 0.2.0 milestone Jul 21, 2026
@MaxMichel2
MaxMichel2 requested a review from matthiaslao July 21, 2026 09:11
@MaxMichel2
MaxMichel2 merged commit 70c955d into main Jul 21, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants