From 3a12ca9d65e8e85f3823739a6db7889dcab96a07 Mon Sep 17 00:00:00 2001 From: David Allison <62114487+david-allison@users.noreply.github.com> Date: Sun, 13 Sep 2026 20:05:46 +0100 Subject: [PATCH] ci(emulator): disable ART metrics reporting On the 16 KB page size image, ART's first `statsd` metrics report probes `userfaultfd()` from inside WebView's sandboxed renderer. Chromium's renderer seccomp policy denies the syscall and kills the renderer. Fixes 21740 Fixes 21756 Fixes 21828 Assisted-by: Claude Fable 5.1 --- .github/workflows/tests_emulator.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests_emulator.yml b/.github/workflows/tests_emulator.yml index 2970407f04fd..e5d086702abc 100644 --- a/.github/workflows/tests_emulator.yml +++ b/.github/workflows/tests_emulator.yml @@ -146,9 +146,9 @@ jobs: path: | ~/.android/avd/* ~/.android/adb* - key: avd-${{ matrix.api-level }}-${{ matrix.arch }}-${{matrix.target}}-v1-${{ github.event.inputs.clearCaches }} + key: avd-${{ matrix.api-level }}-${{ matrix.arch }}-${{matrix.target}}-v2-${{ github.event.inputs.clearCaches }} restore-keys: | - avd-${{ matrix.api-level }}-${{ matrix.arch }}-${{matrix.target}}-v1 + avd-${{ matrix.api-level }}-${{ matrix.arch }}-${{matrix.target}}-v2 - name: Warm Gradle Cache # This makes sure we fetch gradle network resources with a retry @@ -200,6 +200,12 @@ jobs: script: | touch adb-log.txt $ANDROID_HOME/platform-tools/adb logcat '*:D' >> adb-log.txt & + # Disable ART statsd metrics reporting. On the 16 KB page size image, the first + # report (~3s into each process) probes userfaultfd(), which the WebView renderer + # sandbox forbids: the renderer is killed and WebView tests flake. ART only reads + # this flag when the zygote starts, so it must be set before the restart below. + # See: https://github.com/ankidroid/Anki-Android/issues/21740 + $ANDROID_HOME/platform-tools/adb shell su root "setprop persist.device_config.runtime_native.metrics.write-to-statsd false" $ANDROID_HOME/platform-tools/adb shell su root "setprop ctl.restart zygote" sleep 10 sleep $FIRST_BOOT_DELAY