Skip to content

Flaky SecureStorage emulator crash with no tombstone in crash logcat #197

@jappeace-sloth

Description

@jappeace-sloth

Problem

The android emulator CI job intermittently crashes during the SecureStorage test. When it does, the crash logcat section between === Begin crash logcat === and === End crash logcat === contains only system noise (StatusBarIconController, ConnectivityService, logd) — no tombstone, no backtrace, no signal info.

This makes the crash undebuggable from CI logs alone.

Observed behavior

From PR #196 first run:

=== End crash logcat ===

ERROR: Fatal crash detected while waiting for 'SecureStorage read result'
FAIL: write callback fires with StorageSuccess
FAIL: read callback fires with StorageSuccess
FAIL: read returns written token value
[securestorage] attempt 9 FAILED
[securestorage] attempt 10/10

The app crashed, all 10 retry attempts failed, but the crash logcat captured zero useful diagnostics. The same commit passed on retry (second CI run all 5 jobs green) and also passed on android-armv7a-emulator in both runs.

What we need

The crash detection (helpers.sh or equivalent) should capture actual crash diagnostics. Currently it seems like the logcat window misses the tombstone. Possible fixes:

  1. Widen the logcat filter — ensure we capture F DEBUG, F libc, and pid of the crashed process, not just a time-windowed dump
  2. Dump tombstonesadb shell cat /data/tombstones/tombstone_* after detecting a crash
  3. Use adb logcat -b crash — Android has a dedicated crash log buffer that persists the tombstone separately from main logcat

Without at least one of these, any future native crash in CI will be equally opaque.

Reproducer

No reliable reproducer — this is a flaky emulator issue. It happened once on the x86_64 android job and did not reproduce on immediate retry or on armv7a.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions