Repository navigation
Description
Android framework version
net11.0-android
Affected platform version
Public dotnet-android Azure DevOps pipeline (definition 333, dnceng-public/public), main. Lanes: Windows MSBuild (8), Linux MSBuild (3), macOS MSBuild (3).
Description
Xamarin.Android.Build.Tests.AndroidDependenciesTests.InstallAndroidDependenciesTest (Xamarin.Android.Build.Tests, src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/AndroidDependenciesTests.cs) fails intermittently in CI and passes when the job is retried on the same commit. It's being disabled with [Ignore] so it stops failing unrelated PRs. This issue tracks investigating it and re-enabling it.
Evidence, 2026-10-19 to 2026-11-18. A failure counts as isolated when 3 or fewer tests failed in that job attempt.
- 1 isolated failures on commits that later passed on the same commit.
- Isolated failures in 4 different PRs.
- Failures on 7 distinct commits; on 1 of them, a retry later passed.
Likely cause, not yet verified: Downloads and installs Android SDK packages from the network; failures include exhausted retry attempts and ArgumentException: 'handle' has already been bound to the thread pool.
Failing attempts on main-targeting builds:
| Date | Build | Attempt | Job | PR | Commit | Passed later on same commit |
|---|---|---|---|---|---|---|
| 2026-11-17 | 1685679 | 1 | Linux > Tests > MSBuild 2 | #13577 | 4de49312c4 |
yes |
| 2026-11-16 | 1682871 | 1 | macOS > Tests > MSBuild 7 | #13572 | 8408ccf0ec |
no |
| 2026-11-16 | 1682871 | 1 | Windows > Tests > MSBuild 3 | #13572 | 8408ccf0ec |
no |
| 2026-11-16 | 1682871 | 1 | Linux > Tests > MSBuild 2 | #13572 | 8408ccf0ec |
no |
| 2026-11-12 | 1677420 | 1 | Windows > Tests > MSBuild 7 | #13520 | d4f9f1cb11 |
no |
| 2026-11-11 | 1675456 | 1 | Windows > Tests > MSBuild 5 | #13504 | 85d8b2fb93 |
no |
| 2026-11-11 | 1675456 | 1 | Windows > Tests > MSBuild 4 | #13504 | 85d8b2fb93 |
no |
| 2026-11-11 | 1675442 | 1 | Windows > Tests > MSBuild 5 | #13501 | a93a6afffd |
no |
Context: #13429 (CI flakiness inventory)
Steps to Reproduce
Intermittent in CI; no reliable local repro yet. To re-enable it:
- Find and fix the root cause. If the test is timing-, network-, or GC-dependent, make it deterministic.
- Remove the
[Ignore]attribute that references this issue. - Confirm it passes repeatedly in CI before closing this issue.
Did you find any workaround?
Disabled via [Ignore] until fixed.
Relevant log output
6× InstallAndroidDependencies should have succeeded within N attempts.
6× build should have succeeded.
2× System.ArgumentException : 'handle' has already been bound to the thread pool, or was not opened for asynchronous I/O. (Parameter 'handle')
Activity
simonrozsival commentedon Nov 20, 2026
The
ArgumentException: 'handle' has already been bound to the thread poolsignature is very likely resolved by #13513. That error came from the oldXamarin.Installer.AndroidSDKlicense writer on Windows (AndroidLicensesStorage.WriteGoogleLicensesAsync): it wrapped an anonymous-pipe handle that was already bound to the thread pool in an asyncNamedPipeClientStream, which then tried to bind it again. #13513 removed that code and switchedInstallAndroidDependenciesto the Android CLI. The only occurrence was 1677420, before that change landed.The two failures since #13513 don't point to
[email protected]being unavailable through the Android CLI:install-deps.logshowsDownloading archive from 'https://aka.ms/download-jdk/microsoft-jdk-21.0.8-linux-x64.tar.gz'→XAIAD7024: System.Net.Http.HttpIOException: The response ended prematurely, with at least 204164182 additional bytes expected.Attempt 2 passed on the same commit with the same[email protected]dependency. This is a transient network or CDN failure.InstallAndroidDependenciessucceeded. The test then failed atbuild should have succeededfor NativeAOT, and many other NativeAOT tests failed in the same jobs. This looks like a NativeAOT break in that dependency-update PR, not an installer flake.The remaining flakiness looks like transient download failures, mainly the JDK download from
aka.ms. Download retries or a cached JDK would address it more directly than changing theplatform-toolsversion.[build] Update platform-tools to 37.0.3 (#13666)
[tests] Download the JDK again; report network outages as inconclusive