GeezerVison is showing github.com — AMD64 Android 3.x failed: Failed to install split APK · Issue #161528 · python/cpython
AMD64 Android 3.x failed: Failed to install split APK #161528DescriptionAMD64 Android 3.x: https://buildbot.python.org/#/builders/1591/builds/5646
cc @mhsmith
I tried to search for hints on the Internet by looking for some of the errors below, but I didn't find anything relevant so far.
01:07:36 E/SplitApkInstaller: Error while uploading app-debug.apk : Unknown failure: cmd: Failure calling service package: Broken pipe (32)
01:07:37 E/SplitApkInstallerBase: Failed to abandon install session 905454761
Test execution failed with fatal error!
com.google.testing.platform.core.error.UtpException: ErrorName: PLUGIN_ERROR
NameSpace: com.google.testing.platform
ErrorCode: 2002
ErrorType: TEST
Message: ErrorName: UNKNOWN
NameSpace: DdmlibAndroidDeviceController
ErrorCode: 1
ErrorType: TEST
Message: Failed to install split APK(s): [/home/buildbot/buildarea/3.x.mhsmith-android-x86_64/build/Platforms/Android/testbed/app/build/outputs/apk/debug/app-debug.apk]
at com.google.testing.platform.plugin.PluginLifecycleKt.invokeOrThrow(PluginLifecycle.kt:553)
at com.google.testing.platform.plugin.PluginLifecycleKt.invokeOrThrow$default(PluginLifecycle.kt:519)
at com.google.testing.platform.plugin.PluginLifecycle$onBeforeAll$1$1.invoke(PluginLifecycle.kt:241)
at com.google.testing.platform.plugin.PluginLifecycle$onBeforeAll$1$1.invoke(PluginLifecycle.kt:235)
at com.google.testing.platform.core.telemetry.common.noop.NoopDiagnosticsScope.recordEvent(NoopDiagnosticsScope.kt:35)
at com.google.testing.platform.core.telemetry.SequentialEventRecordRequest.record$java_com_google_testing_platform_core_telemetry_telemetry_api(EventRecordRequest.kt:71)
at com.google.testing.platform.core.telemetry.DiagnosticsExtKt.record(DiagnosticsExt.kt:27)
at com.google.testing.platform.core.telemetry.TelemetryKt.createEvent(Telemetry.kt:60)
at com.google.testing.platform.plugin.PluginLifecycle.onBeforeAll(PluginLifecycle.kt:233)
at com.google.testing.platform.executor.SingleDeviceExecutor$execute$2$1.invoke(SingleDeviceExecutor.kt:170)
at com.google.testing.platform.executor.SingleDeviceExecutor$execute$2$1.invoke(SingleDeviceExecutor.kt:170)
at com.google.testing.platform.lib.cancellation.ProcessCancellationContext.runUnlessCancelled(ProcessCancellationContext.kt:159)
at com.google.testing.platform.executor.SingleDeviceExecutor.execute(SingleDeviceExecutor.kt:170)
at com.google.testing.platform.RunnerImpl.run(RunnerImpl.kt:132)
at com.google.testing.platform.server.strategy.NonInteractiveServerStrategy$run$exitCode$1$2.invoke(NonInteractiveServerStrategy.kt:126)
at com.google.testing.platform.server.strategy.NonInteractiveServerStrategy$run$exitCode$1$2.invoke(NonInteractiveServerStrategy.kt:126)
at com.google.testing.platform.core.telemetry.common.noop.NoopDiagnosticsScope.recordEvent(NoopDiagnosticsScope.kt:35)
at com.google.testing.platform.core.telemetry.SequentialEventRecordRequest.record$java_com_google_testing_platform_core_telemetry_telemetry_api(EventRecordRequest.kt:71)
at com.google.testing.platform.core.telemetry.DiagnosticsExtKt.record(DiagnosticsExt.kt:27)
at com.google.testing.platform.core.telemetry.TelemetryKt.createEvent(Telemetry.kt:60)
at com.google.testing.platform.server.strategy.NonInteractiveServerStrategy.run(NonInteractiveServerStrategy.kt:123)
at com.google.testing.platform.main.MainKt$main$3$1.invokeSuspend(Main.kt:80)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at [email protected]/java.lang.Thread.run(Thread.java:840)
Caused by: com.google.testing.platform.core.error.UtpException: ErrorName: UNKNOWN
NameSpace: DdmlibAndroidDeviceController
ErrorCode: 1
ErrorType: TEST
Message: Failed to install split APK(s): [/home/buildbot/buildarea/3.x.mhsmith-android-x86_64/build/Platforms/Android/testbed/app/build/outputs/apk/debug/app-debug.apk]
at com.android.tools.utp.plugins.deviceprovider.ddmlib.DdmlibAndroidDeviceController$executeAsync$deferred$1.invokeSuspend(DdmlibAndroidDeviceController.kt:273)
... 5 more
Caused by: com.android.ddmlib.InstallException: Failed to install-write all apks
at com.android.ddmlib.SplitApkInstaller.install(SplitApkInstaller.java:83)
at com.android.ddmlib.IDeviceSharedImpl.installPackages(IDeviceSharedImpl.java:395)
at com.android.ddmlib.internal.DeviceImpl.lambda$installPackages$34(DeviceImpl.java:1491)
at com.android.ddmlib.internal.DeviceImpl.logRun3(DeviceImpl.java:1833)
at com.android.ddmlib.internal.DeviceImpl.installPackages(DeviceImpl.java:1488)
at com.android.ddmlib.internal.DeviceImpl.lambda$installPackages$35(DeviceImpl.java:1503)
at com.android.ddmlib.internal.DeviceImpl.logRun3(DeviceImpl.java:1833)
at com.android.ddmlib.internal.DeviceImpl.installPackages(DeviceImpl.java:1499)
at com.android.tools.utp.plugins.deviceprovider.ddmlib.DdmlibAndroidDevice.installPackages(DdmlibAndroidDevice.kt:80)
at com.android.tools.utp.plugins.deviceprovider.ddmlib.DdmlibAndroidDeviceController$executeAsync$deferred$1.invokeSuspend(DdmlibAndroidDeviceController.kt:251)
... 5 more
Shell command failed (20): am get-current-user
cmd: Can't find service: activity
Shell command failed (20): am broadcast -a android.intent.action.MEDIA_SCANNER_SCAN_FILE -d file:///sdcard/Android/media/org.python.testbed/additional_test_output
cmd: Can't find service: activity
Shell command failed (20): am get-current-user
cmd: Can't find service: activity
Shell command failed (20): am broadcast -a android.intent.action.MEDIA_SCANNER_SCAN_FILE -d file:///sdcard/googletest/test_outputfiles
cmd: Can't find service: activity
> Task :app:maxVersionDebugAndroidTest
Starting 0 tests on maxVersion
Finished 0 tests on maxVersion
> Task :app:maxVersionDebugAndroidTest
ErrorName: UNKNOWN
NameSpace: DdmlibAndroidDeviceController
ErrorCode: 1
ErrorType: TEST
Message: Failed to install split APK(s): [/home/buildbot/buildarea/3.x.mhsmith-android-x86_64/build/Platforms/Android/testbed/app/build/outputs/apk/debug/app-debug.apk]
Failed to install split APK(s): [/home/buildbot/buildarea/3.x.mhsmith-android-x86_64/build/Platforms/Android/testbed/app/build/outputs/apk/debug/app-debug.apk]
Failed to install-write all apks
com.android.ddmlib.InstallException: Failed to install-write all apks
at com.android.ddmlib.SplitApkInstaller.install(SplitApkInstaller.java:83)
at com.android.ddmlib.IDeviceSharedImpl.installPackages(IDeviceSharedImpl.java:395)
at com.android.ddmlib.internal.DeviceImpl.lambda$installPackages$34(DeviceImpl.java:1491)
at com.android.ddmlib.internal.DeviceImpl.logRun3(DeviceImpl.java:1833)
at com.android.ddmlib.internal.DeviceImpl.installPackages(DeviceImpl.java:1488)
at com.android.ddmlib.internal.DeviceImpl.lambda$installPackages$35(DeviceImpl.java:1503)
at com.android.ddmlib.internal.DeviceImpl.logRun3(DeviceImpl.java:1833)
at com.android.ddmlib.internal.DeviceImpl.installPackages(DeviceImpl.java:1499)
at com.android.tools.utp.plugins.deviceprovider.ddmlib.DdmlibAndroidDevice.installPackages(DdmlibAndroidDevice.kt:80)
at com.android.tools.utp.plugins.deviceprovider.ddmlib.DdmlibAndroidDeviceController$executeAsync$deferred$1.invokeSuspend(DdmlibAndroidDeviceController.kt:251)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
error: closed
Command "/home/buildbot/android-sdk/platform-tools/adb -s emulator-5554 shell pidof -s org.python.testbed" returned exit status 1
This may be transient, so continuing to wait
> Task :app:maxVersionDebugAndroidTest FAILED
> Task :app:mergeDebugAndroidTestTestResultProtos
Test execution completed. See the report at: file:///home/buildbot/buildarea/3.x.mhsmith-android-x86_64/build/Platforms/Android/testbed/app/build/reports/androidTests/managedDevice/debug/allDevices/index.html
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:maxVersionDebugAndroidTest' (registered by plugin 'com.android.internal.application').
> There were failing tests. See the report at: file:///home/buildbot/buildarea/3.x.mhsmith-android-x86_64/build/Platforms/Android/testbed/app/build/reports/androidTests/managedDevice/debug/maxVersion/index.html
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights from a Build Scan (powered by Develocity).
> Get more help at https://help.gradle.org.
BUILD FAILED in 1m 45s
Activityzorathvael commented on Nov 7, 2026 vstinner commented on Nov 7, 2026 One solution that I found would be to wait until adb shell getprop sys.boot_completed returns 1 (system fully booted).
It can be done in a single adb command: adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done'. AbhiDev-pro commented on Nov 7, 2026 Give the emulator more RAM, or wait for full boot with adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done' before starting tests.
log is telling it a Broken pipe while uploading app-debug.apk: the connection to the emulator’s package service dropped mid-install. mhsmith commented on Nov 12, 2026 I think Gradle-managed emulators are supposed to wait for boot_completed automatically, so I'm not sure what's going on here. I've seen this error a few times, but never been able to reproduce it reliably.
This buildbot machine is definitely on the slow side compared to what most Android developers are using, so it's possible it exposes more race conditions in the Android tools. I'll probably look into replacing it with a faster machine next year. Reacted by Victor Stinner
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|