Skip to content

fix(ci): keep a UI dump that uiautomator wrote before crashing - #170

Merged
d4rken merged 1 commit into
mainfrom
worktree-fix-ci-uiautomator-exit-crash
Oct 28, 2026
Merged

d4rken merged 1 commit into
mainfrom
worktree-fix-ci-uiautomator-exit-crash

Conversation

@d4rken

@d4rken d4rken commented Oct 28, 2026

Copy link
Copy Markdown
Member

What changed

No user-facing behavior change. The emulator integration suite no longer fails a case when the device's UI dump tool writes the screen and then crashes on its way out.

Technical Context

  • Root cause: in run 39607579029 the Android 37.1 job's uiautomator dump printed its success line, then died of SIGSEGV in libpowermanager.so static destructors. The checked shell call raised on the non-zero exit before the reply was read.
  • A failed dump whose stdout carries the success line is now read as usual and logged as a NOTE with the exit status. A non-zero exit without that line still fails the case at once, so real uiautomator errors keep their stderr in the failure.
  • adb() now raises CommandFailed, a RuntimeError subclass with the same message plus stdout and exit status, so existing handlers are unaffected.

The Android 37.1 emulator leg failed in foreign-signer-never-binds
because uiautomator printed "UI hierchary dumped to: ..." and then died
of SIGSEGV in libpowermanager's static destructors (sp<IPower>::~sp via
__cxa_finalize). adb returned the non-zero exit with empty stderr, and
the checked shell call raised before dump() looked at the reply.

adb() now raises CommandFailed, a RuntimeError with the same message
that also carries stdout and the exit status. dump() accepts a failed
uiautomator whose stdout holds the dump report and prints a NOTE with
the exit status. A failure without the report still ends the case at
once, as test_command_failure_is_not_hidden_by_ui_retries requires,
rather than being retried until the budget runs out and losing stderr
from the error.

The job ran about 1,200 dumps and recorded this one uiautomator
tombstone, and it is the only failure with this signature in the last
30 failed runs of the workflow.
@d4rken d4rken added the bug Something isn't working as expected label Oct 28, 2026
@github-actions github-actions Bot added the Build process Build tooling, CI, dependencies, packaging and releases label Oct 28, 2026
@d4rken
d4rken merged commit b0877be into main Oct 28, 2026
32 checks passed
@d4rken
d4rken deleted the worktree-fix-ci-uiautomator-exit-crash branch October 28, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working as expected Build process Build tooling, CI, dependencies, packaging and releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant