Repository navigation
Description
Current behavior 🐛
Given_BitmapSource.When_MsAppData stalls indefinitely on the Tests - Desktop Skia Linux Framebuffer CI stage (the useXvfb: false variant of build/ci/tests/.azure-devops-tests-linux-skia.yml) whenever CI runs on .NET SDK 11.0.100-preview.6.26359.118. The job is killed at its 60-minute cap, no results xml is written, and the downstream PublishTestResults / Publish Failed Tests Results tasks fail as a consequence.
The log always ends the same way — the test starts and nothing follows for ~52 minutes:
2026-08-03T15:57:12.3894852Z Running test When_MsAppData()
2026-08-03T16:48:56.2564868Z ##[error]The Operation will be canceled. The next steps may not contain expected logs.
Correlated with the .NET 11 Preview 6 bump, over the 40 most recent builds of the Uno.UI - CI pipeline:
| host SDK | Tests - Desktop Skia Linux Framebuffer |
|---|---|
11.0.100-preview.6.26359.118 |
8 hangs at When_MsAppData, 4 green |
10.0.105 |
21 green, 2 genuine test failures, 1 hang at an unrelated test |
- All 8 failures in that window are the same hang (builds 225359, 225410, 225476, 225493, 225521, 225537, 225713, 225723), plus 225357 just outside it — 9 confirmed by log tail. Zero
When_MsAppDatahangs on10.0.105. - Bracketed on
feature/breakingchanges: last green build 225197 (8d5e55db9f, preview.5) → first red build 225357 (9f5ca5899f, preview.6). The only PR in between is chore: Update to .NET 11 Preview 6 #23776 (the p5 → p6 bump).
It is not a build-configuration difference. The X11 Linux stage and the Framebuffer stage consume the same samplesapp-desktop-skia artifact and run the same script — only useXvfb differs (build/ci/tests/.azure-devops-tests-skia-stages.yml) — and the X11 stage is green on every preview.6 build. It is also specific to the ms-appdata path rather than "headless never raises ImageOpened": the image tests immediately before it (When_BundleImages_Loaded_StreamsAreDisposed, the When_DecodePixel* set, When_ImageBrush_Source_Changes, When_LocalResource_ScaleQualifier) all pass on the same run.
Which of the test's three awaits stalls is still unresolved — StorageFile.GetFileFromApplicationUriAsync, CopyAsync, or the ImageOpened TCS.
Secondary problem: any stall costs a full 60-minute job with zero diagnostics
When_MsAppData (src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Media_Imaging/Given_BitmapSource.cs) awaits a TaskCompletionSource fed only by ImageOpened — there is no ImageFailed handler and no [Timeout]:
TaskCompletionSource<bool> tcs = new();
sut.ImageOpened += (s, e) => tcs.TrySetResult(true);
await tcs.Task;UnitTestsControl applies a timeout to an async test body only when the method carries an explicit [Timeout] attribute (GetTestTimeout); DefaultUnitTestTimeout guards initialize/cleanup steps via WaitResult, not the test body. So a stalled image load consumes the whole job budget and produces no failure record — whereas an ImageFailed handler plus a [Timeout] would have turned this into a fast, readable failure with an error message pointing at the real cause.
This is worth fixing independently of the runtime cause above, and would make the underlying issue far easier to diagnose.
Expected behavior 🎯
When_MsAppData completes on the Linux Framebuffer host as it does on X11, or fails fast with the ImageFailed error message instead of hanging until the job times out.
How to reproduce it (as minimally and precisely as possible) 🔬
CI-only so far; no app repro project — it reproduces in the repository's own runtime-test suite.
- Check out a branch whose CI SDK is
11.0.100-preview.6.26359.118(build/ci/net11/_global.json), e.g.feature/breakingchanges. - Build the Skia samples app, then run the runtime tests on Linux without X11:
build/test-scripts/linux-skia-runtime-tests.sh false - The run stalls at
Running test When_MsAppData(). Withxvfb-run(passtrue) the same binary passes.
Reference builds (public pipeline Uno.UI - CI, definition 5): 225723, 225713, 225537 hang; 225197 (preview.5) green.
Workaround 🛠️
Re-running the stage sometimes clears it — all 4 green preview.6 runs were retries (stage attempt 2–3) that executed the full ~7,970-test suite, so those passes are genuine and not an artifact of the failed-tests-only retry path. It is a coin flip, not a fix: builds 225359, 225476 and 225521 hung again on retry.
Renderer 🎨
- Skia
- Native
Affected platforms 📱💻🖥️
Desktop (Linux Framebuffer)
Uno.Sdk version (and other relevant versions) 📦
Repository CI, not an app: feature/breakingchanges running .NET SDK 11.0.100-preview.6.26359.118 (build/ci/net11/_global.json). Last known-good SDK for this stage: 11.0.100-preview.5.26302.115. Unaffected on 10.0.105.
IDE version 🧑💻
N/A — Azure Pipelines hosted Linux agent.
Anything else we need to know? 💬
The hang blocks the Tests - Desktop Skia Linux Framebuffer stage for every PR targeting a preview.6 branch, so it shows up as an unrelated red stage on otherwise clean PRs.
Two separable fixes:
- Root cause — why the ms-appdata
BitmapImageload never completes on the non-X11 Linux host under .NET 11 Preview 6. - Test resilience — add an
ImageFailedhandler (fail withe.ErrorMessage) and a[Timeout]toWhen_MsAppData, as the neighbouringWhen_BundleImages_Loaded_StreamsAreDisposedalready does for failures. A broader look at whether the runtime-test harness should apply a default timeout to async test bodies (not just init/cleanup) would prevent the whole class of 60-minute job kills.
Activity
test: Skip ms-appdata tests on Linux FrameBuffer
test: Guard When_MsAppData against an indefinite hang
feat(ci): Capture diagnostics when runtime tests stall
feat(ci): Capture diagnostics when runtime tests stall
feat(ci): Capture diagnostics when runtime tests stall
MartinZikmund commentedon Sep 1, 2026
Also reproduces on Skia Android (newly exposed, not new)
The same hang now shows on the Android Skia runtime-test host. Same signature as the Linux legs — the test starts, then total silence, no
ImageOpened, noImageFailed, no exception:(The 30 s bound is the containment
WaitAsyncfrom this issue doing its job — on Android it fails fast instead of eating the agent.)Why it surfaced on 2026-08-31
It never ran on Android at all before then. #24003 aligned shard 0's
UITEST_RUNTIME_TEST_GROUP_COUNT(4→5,005db435370, merged 10:19 UTC). Selection is a stable hash modulo that count, soWhen_MsAppDatawas one of the 14.7% of methods no shard selected. Verified absent from every Android shard log in pre-fix builds 231043, 231021, 230963, and present in shard 0 in every post-fix build.masterstill has the old4, which is why this is invisible there.Frequency
Three unrelated PR builds inside a few hours, all on
feature/breakingchanges:So it is intermittent, and the retry mechanism only sometimes rescues it. Builds 231121 / 231139 / 231157 ran it on Android and passed.
Diagnostic value for the root cause
Android narrows the hypothesis space usefully, since it shares almost nothing with the Linux Framebuffer host except the managed stack:
When_MsAppData_StreamDisposed_FileNotLocked,When_Exif_Rotated_MsAppData) run green on Android in every post-fix build checked. SinceWhen_MsAppData_StreamDisposed_FileNotLockedalso doesGetFileFromApplicationUriAsync+CopyAsyncand then awaitsImageOpened, that points away from the storage calls and toward theImageOpenedpath in this specific test — narrowing the "which of the three awaits stalls" question left open in the issue body.The most visible difference between them is that the failing one reuses the fixed name
ingredient3.pngwithReplaceExistingacross runs, while the passing one uses a freshGuid-suffixed name — worth checking whether a cached/locked entry for a previously written path is what never resolves.Containment
#24327 adds
SkiaAndroidto the exclusion so unrelated PRs stop going red. Scoped to this test only; the siblings keep running. The underlying bug stays open here.test: Exclude When_MsAppData on Skia Android
feat(ci): Capture diagnostics when runtime tests stall
feat(ci): Capture diagnostics when runtime tests stall
feat(ci): Capture diagnostics when runtime tests stall