Repository navigation
fix(ci): Serialize WASM+mobile template build to stop flaky wasm-opt OOM - #23530
Conversation
The uno56droidioswasmskia template (built with no -f) compiles all 5 TFMs in parallel, so the memory-heavy WASM native relink (wasm-opt -O2 over the SkiaSharp/HarfBuzz/ICU statics) ran concurrently with the android/ios/maccatalyst builds and intermittently aborted (SIGABRT) under peak memory on the macOS agent, flaking Tests-Templates. Add /m:1 to serialize the inner per-TFM builds so wasm-opt runs without contention. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Nick Randolph seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
There was a problem hiding this comment.
Pull request overview
This PR addresses flaky Tests - Templates failures on macOS by reducing peak memory pressure when building the multi-target uno56droidioswasmskia template, preventing intermittent wasm-opt SIGABRT/OOM during the WASM native relink step.
Changes:
- Passes
/m:1for theuno56droidioswasmskiatemplate build to serialize its per-TFM builds and avoid concurrentwasm-optexecution with other TFMs. - Adds an in-script comment documenting the rationale for the serialization (root cause and why it fixes the flake).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23530/wasm-skia-net9/index.html |
GitHub Issue: closes #23528
PR Type:
🏗️ Build or CI related changes
What changed? 🚀
build/test-scripts/run-netcore-mobile-template-tests.ps1now passes/m:1when building theuno56droidioswasmskiaproject template, serializing its inner per-TFM builds.Why this is the correct fix (diagnosis → fix)
Symptom (flaky):
Tests - Templatesintermittently fails on the macOS agent while buildinguno56droidioswasmskia, withwasm-optaborting:emcc : error : '…/wasm-opt … -O2 … dotnet.native.wasm' failed (received SIGABRT (-6)). It is flaky,not a deterministic break —
Tests - Templatespasses on every recentmasterbuild, so it onlyforces a stage re-run occasionally.
Root cause: that template is built with no
-f, sodotnet buildcompiles all of its TFMsin parallel (
android/ios/maccatalyst/browserwasm/desktop). The loop's$extraArgsalreadydisables the costly mobile AOT/link and the Uno WASM IL-linker, but it does not affect the
.NET WASM SDK native relink (
wasm-opt -O2over the SkiaSharp/HarfBuzz/ICU WASM statics), which ismemory-heavy and still runs. So
wasm-opt -O2executes concurrently with the other TFM builds, andunder peak memory on the macOS agent it intermittently aborts (
SIGABRT).Why
/m:1is correct (not a band-aid): limiting to one MSBuild node serializes the inner TFMbuilds, so
wasm-optruns without competing with the other TFMs for memory. This removes thecontention mechanism rather than retrying past the symptom. It is scoped to the single multi-TFM
template that crashes; the only cost is a slightly longer build for that one template (the mobile TFMs
are already lightweight since AOT/link are disabled, so
wasm-optis the long pole regardless) — farcheaper than the full-stage re-runs the flake currently triggers.
Alternative considered: lowering the WASM native-relink optimization (
wasm-opt -O1/-O0) keeps fullparallelism and shrinks the memory spike, but
/m:1is behaviour we are certain of; the lower-O pathcan be a follow-up if more headroom is wanted.
PR Checklist ✅
Tests - Templatesstage)