You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Android: a stale emulator crash dump makes every boot wait on a crash-report dialog until the lease times out #1183
After an emulator crash, every later Android lease on that Mac failed with INTERNAL: Timed out waiting for device to boot after about 182 s. This happened on the slow lane on 2026-11-01, five runs in a row.
The emulator never booted. A stack sample of qemu-system-aarch64 showed its main thread at 100% CPU inside CrashConsentProvider::showDialog → QDialog::exec(), called from CrashSystem::uploadEntries. It was waiting for a person to answer the "send crash report?" dialog. The trigger was one dump an earlier crash left in /tmp/android-<user>/emu-crash-36.5.11.db/completed/ (4.4 MB). Every launch found it and showed the dialog. The console port and the gRPC port never opened.
Why it matters
A worker Mac with no one at the screen loses every Android lease until someone removes the dump by hand. Nothing explains why: the driver starts the emulator with stdio: "ignore", so the daemon log has only BootTimeoutError at the boot step.
How to reproduce
Put any .dmp file in /tmp/android-$USER/emu-crash-<emulator version>.db/completed/.
Lease an Android emulator: simlock lease android.
The lease fails after the boot timeout, and the emulator window shows the crash-report dialog.
Moving the dump out of that folder fixes the next lease.
Confirmed. Gap: the driver never tells the emulator how to handle crash reports, so the emulator falls back to asking a person. The test's expected flag is a proposal.
src/drivers/android/index.test.ts, "starts the cold boot and the restart from the baseline with -crash-report-mode never, so a stale crash dump asks no one", on bug/1183-repro (d84762a).
What I read on the host (emulator 36.5.11): emulator -help-all and the strings in qemu-system-aarch64.
-crash-report-mode <option list> Override crash reporting mode. Available options: disabled, never, always, ask
"No consent for crashreport %s, deleting."
"Failed to get consent, keeping %s for now."
"Showing crashdialog to get consent."
Root cause
src/drivers/android/index.ts:2227 (#startEmulator) builds every emulator command line from fixed flags plus emulatorLaunchFlags (:2835), and none of them sets -crash-report-mode. With no override, the emulator uses the user's saved setting, which defaults to ask. At startup it opens a modal consent dialog for each dump in emu-crash-<version>.db/completed/. The dialog blocks the main thread, so the console and gRPC ports never open. The symptom is BootTimeoutError in #waitForReadiness, with no reason in the log, because the emulator runs with stdio: "ignore" (:2241).
Simplest fix
Add "-crash-report-mode", "never" to the fixed flags in #startEmulator. Then update the tests that compare the full argv (baselineBuildExpectations, the cold-boot, baseline and launch-option tests). Going by the binary's strings, never also deletes the stale dump.
Alternatives rejected
disabled: no dialog, but the dump stays forever and new crashes are not recorded.
Deleting /tmp/android-$USER/emu-crash-*.db/completed/*: that is the user's crash database, outside the owned root (ADR 0001).
Setting ANDROID_EMU_CRASH_REPORTING_DATABASE per root: the default mode is still ask.
Risk
never is untested on hardware. A slow-lane boot with a .dmp in completed/ should confirm no dialog and that the dump is deleted.
Only the argv changes, so baselines should be unaffected. Check that baselineLaunchInputs stays as it is.
Older emulators may not know the flag. requirements.mdx sets no minimum emulator version.
Question:-crash-report-mode never alone makes the emulator delete every pending dump in the user's shared crash database (/tmp/android-<user>/emu-crash-<version>.db). Android Studio and the user's own emulators write there too. Review finding R1 says this touches files Simlock did not write.
Options:
never alone. No dialog. The emulator deletes the user's dumps from Android Studio and other emulators too, without asking.
never plus ANDROID_EMU_CRASH_REPORTING_DATABASE set to a folder in Simlock's root. No dialog. Simlock's emulators record and drop crash dumps only in Simlock's folder. The user's shared folder is not read or touched.
disabled. No dialog, but crashes are not recorded at all.
Taken: option 2. It keeps Simlock inside its own root (ADR 0001) and still fixes the boot hang. The triage rejected the variable only on its own, without never.
Reverting: drop the env var from the emulator spawn (one line) to get option 1.
The fast tests can't prove the emulator honours the variable. A hardware check will: a .dmp in the shared completed/ folder, a lease boots with no dialog, and the .dmp is still there.
Merged: #1186 (#1183)
Decided: #1183 — -crash-report-mode never alone deletes the user's shared crash dumps → also point the emulator at a crash database inside Simlock's root
Activity
feat(tunnel): simlock tunnel forward reaches a leased device's port f…
V3RON commentedon Nov 1, 2026
Reproduction
Confirmed. Gap: the driver never tells the emulator how to handle crash reports, so the emulator falls back to asking a person. The test's expected flag is a proposal.
src/drivers/android/index.test.ts, "starts the cold boot and the restart from the baseline with -crash-report-mode never, so a stale crash dump asks no one", onbug/1183-repro(d84762a).What I read on the host (emulator 36.5.11):
emulator -help-alland the strings inqemu-system-aarch64.Root cause
src/drivers/android/index.ts:2227(#startEmulator) builds every emulator command line from fixed flags plusemulatorLaunchFlags(:2835), and none of them sets-crash-report-mode. With no override, the emulator uses the user's saved setting, which defaults toask. At startup it opens a modal consent dialog for each dump inemu-crash-<version>.db/completed/. The dialog blocks the main thread, so the console and gRPC ports never open. The symptom isBootTimeoutErrorin#waitForReadiness, with no reason in the log, because the emulator runs withstdio: "ignore"(:2241).Simplest fix
Add
"-crash-report-mode", "never"to the fixed flags in#startEmulator. Then update the tests that compare the full argv (baselineBuildExpectations, the cold-boot, baseline and launch-option tests). Going by the binary's strings,neveralso deletes the stale dump.Alternatives rejected
disabled: no dialog, but the dump stays forever and new crashes are not recorded./tmp/android-$USER/emu-crash-*.db/completed/*: that is the user's crash database, outside the owned root (ADR 0001).ANDROID_EMU_CRASH_REPORTING_DATABASEper root: the default mode is stillask.Risk
neveris untested on hardware. A slow-lane boot with a.dmpincompleted/should confirm no dialog and that the dump is deleted.baselineLaunchInputsstays as it is.requirements.mdxsets no minimum emulator version.Written by an agent.
V3RON commentedon Nov 1, 2026
Decision taken
Question:
-crash-report-mode neveralone makes the emulator delete every pending dump in the user's shared crash database (/tmp/android-<user>/emu-crash-<version>.db). Android Studio and the user's own emulators write there too. Review finding R1 says this touches files Simlock did not write.Options:
neveralone. No dialog. The emulator deletes the user's dumps from Android Studio and other emulators too, without asking.neverplusANDROID_EMU_CRASH_REPORTING_DATABASEset to a folder in Simlock's root. No dialog. Simlock's emulators record and drop crash dumps only in Simlock's folder. The user's shared folder is not read or touched.disabled. No dialog, but crashes are not recorded at all.Taken: option 2. It keeps Simlock inside its own root (ADR 0001) and still fixes the boot hang. The triage rejected the variable only on its own, without
never.Reverting: drop the env var from the emulator spawn (one line) to get option 1.
The fast tests can't prove the emulator honours the variable. A hardware check will: a
.dmpin the sharedcompleted/folder, a lease boots with no dialog, and the.dmpis still there.Written by an agent.
fix(android): give the emulator a crash database under the Simlock ro…
test(e2e): a lease leaves a dump in the user's shared emulator crash …
test(e2e): plant a crash dump crashpad recognises (xattrs) so the smo…
V3RON commentedon Nov 1, 2026
Delivery run
Merged: #1186 (#1183)
Decided: #1183 —
-crash-report-mode neveralone deletes the user's shared crash dumps → also point the emulator at a crash database inside Simlock's rootWritten by an agent.
fix(android): start the emulator with -crash-report-mode never (calls…