xharness: Install / Uninstall apk Sometimes Fails on Android
There are some runs indicated in https://github.com/dotnet/runtime/issues/44306 that show either the apk could not be installed or removed. Good examples of this are in:
[18:48:43] info: Attempting to remove apk 'net.dot.JIT_SIMD':
[18:48:43] fail: Error: Exit code: 224
Standard Output:
cmd: Failure calling service package: Broken pipe (32)
My guess is that adb is somehow corrupt and either resolves itself via workitem completion or an internal timeout. We should look into capturing the error state or states and try to correct it. We should try to avoid failing the tests the first time.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 26 (26 by maintainers)
Commits related to this issue
- Add a retry in the case of exit code 224; Seeks to address https://github.com/dotnet/xharness/issues/354 If this is insufficient there are some helix-based extra things to try. — committed to MattGal/xharness by MattGal 4 years ago
- Add a retry in the case of exit code 224 (#361) * Add a retry in the case of exit code 224; Seeks to address https://github.com/dotnet/xharness/issues/354 If this is insufficient there are some he... — committed to dotnet/xharness by MattGal 4 years ago
So looks like the https://github.com/dotnet/xharness/pull/388 is working for fixing the issue we saw during apk installation on some of the physical machines, I saw one machine got autofixed with the new xharness by rebooting the devices:
@mattleibow that fix also includes your suggestion of using
sys.boot_completed
for ensuring the device is booted so please try xharness >= 1.0.0-prerelease.20601.1.Looks like XHarness
20601.1
which should contain the fix from https://github.com/dotnet/xharness/issues/354 is still failing: https://helixre107v0xdeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-45486-merge-3c2f97f16f154752a9/Microsoft.Extensions.Configuration.EnvironmentVariables.Tests/console.74bfb490.log?sv=2019-07-07&se=2020-12-23T10:26:30Z&sr=c&sp=rl&sig=ImcNQ%2BZX5lvEc%2FHKcQ1cjkfhiIu5go%2F%2F6dcPcPw2aWw%3D“it has been failing on CI” refers to the default Azure hosted bots. I have to manually download, install, create and then spin them up.
Merged PR that does a single retry here, and moved the issue to validate. If this doesn’t make the problem go away I want to teach XHarness how to ask for reboot / retry when it detects it’s running in Helix.