Skip to content

[wasm][CoreCLR] Add browser_wasm R2R_CG2 leg to runtime-coreclr outerloop - #134960

Merged
lewing merged 7 commits into
mainfrom
lewing-browser-wasm-outerloop-r2r
Oct 1, 2026
Merged

lewing merged 7 commits into
mainfrom
lewing-browser-wasm-outerloop-r2r

Conversation

@lewing

@lewing lewing commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Why: Follow-up to #134771, where @jkotas asked for this. Today the only browser runtime-test leg that runs everything under R2R is the browser_wasm R2R_CG2 leg in runtime.yml, and that leg is innerloop (priority 0 only). runtime-coreclr outerloop (coreclr/ci.yml) runs priority-1 tests on browser only in the checked interpreter leg, which uses R2R CoreLib with interpreted tests. browser_wasm is not in its R2R_CG2 platform list. As a result, no pipeline runs priority-1 tests fully under ReadyToRun on browser.

Change: Add a checked browser_wasm R2R_CG2 outerloop leg to eng/pipelines/coreclr/ci.yml. It is a separate platform-matrix entry rather than an addition to the shared R2R platform list, because browser needs its own extraBuildArgs (-os browser -p:HostConfiguration=Release), the same as the existing browser interpreter leg. It reuses the browser build artifacts that ci.yml already produces.

Quarantines and skips: Each failure below is specific to R2R and limited to wasm ReadyToRun. Some came from crashed or failed work items. Others appeared only as failed test results inside work items that passed, because merged runners record test failures in their results rather than in their exit code.

Failure Issue Mechanism
b51875, b77707: an exception thrown from a finally reached by leave is reported as unhandled (Regression_8, Regression_PdbOnly_r_2) #134975 ActiveIssue with IsWasmReadyToRun
self_override5: !ShouldCallPrestub() assert (Loader) #134949 IL ActiveIssue with IsWasmReadyToRun
AboveStackLimit: the R2R image exceeds the 1000-parameter wasm limit and fails to load (Regressions) #132855 ActiveIssue with IsWasmReadyToRun. The generated wrapper skips the call, so the image is never loaded.
crossgen2 aborts or hangs in Lowering::LowerStoreLocCommon on Vector128_1_*, Vector128_* (HardwareIntrinsics_General_r/_ro) #134976 Runner-level R2RIncompatible on wasm CoreCLR, since more than one assembly is affected. Interpreter coverage is unchanged.
Samples/gc, arrres_il_r: an object outlives the expected GC.Collect, so finalization and resurrection checks fail (GC-scenarios1, Methodical_r1) By design, same class as #134803 Permanent skip for wasm R2R only. Untracked and call-spilled stack GC refs are reported as always live (clr-abi.md, "GC References at Call Sites"). gc uses a ConditionalFact. arrres_il_r uses R2RIncompatible, because its hand-written IL entry point has no generated wrapper.
test115667, test132982, ResolvedFromDifferentContext, Runtime_64883, Runtime_66624: they load their own assembly file, but Assembly.Location is empty for assemblies loaded from an R2R wasm image — Early return when Location is empty, following ByRefLocals and #134076

Merged children are compiled by the all-targets AnyOS managed test build, so a wasm-conditioned project property on a merged child does not exclude it. The quarantines therefore use method-level attributes, properties on a runner, or properties on a process-isolated test. Runner and process-isolated test scripts are generated for browser, so those properties do apply.

Expectation: This leg is expected to find more everything-R2R issues on browser. Failures should be triaged and tracked (Known Build Errors / ActiveIssue), not hidden.

Validation:

  • Build 1618757, two quarantine commits before the current head:
    • All 87 browser R2R work items passed, but 4 tests failed inside them: Runtime_64883, Runtime_66624, arrres_il_r, Samples/gc. The newer commits address all 4.
    • The browser interpreter leg had no failures.
  • Local browser-wasm Checked run of the affected runners and process-isolated tests, with and without RunCrossGen2=1, and with DOTNET_TieredCompilation=0 as in CI:
    • Under R2R, the quarantined tests are skipped or return early.
    • In the interpreter, all of them run and pass.
  • runtime-coreclr outerloop has no PR trigger. To validate the change in CI, run /azp run runtime-coreclr outerloop.

Note

This PR was generated with GitHub Copilot assistance.

…loop

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 4 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@lewing
lewing requested review from jkotas and steveisok September 30, 2026 16:46
@lewing lewing added arch-wasm WebAssembly architecture os-browser Browser variant of arch-wasm labels Sep 30, 2026
@lewing
lewing deployed to copilot-pat-pool September 30, 2026 16:47 — with GitHub Actions Active
@lewing
lewing deployed to copilot-pat-pool September 30, 2026 16:48 — with GitHub Actions Active
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara
See info in area-owners.md if you want to be subscribed.

@lewing

lewing commented Sep 30, 2026

Copy link
Copy Markdown
Member Author

/azp run runtime-coreclr outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@jkotas jkotas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good if the new leg is green

- b51875: ActiveIssue #134975 on IsWasmReadyToRun (exception from finally reported as unhandled)
- self_override5: ActiveIssue #134949 on IsWasmReadyToRun (prestub assert)
- AboveStackLimit: exclude on wasm CoreCLR, #132855 (R2R image exceeds wasm param limit and fails to load)
- Vector128_1_r/_ro: exclude on wasm CoreCLR, #134976 (crossgen2 aborts, stopping the merged runner's R2R compilation)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@lewing

lewing commented Sep 30, 2026

Copy link
Copy Markdown
Member Author

/azp run runtime-coreclr outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

lewing and others added 2 commits September 30, 2026 14:51
- HardwareIntrinsics_General_r/_ro: disable R2R on wasm CoreCLR (#134976) instead
  of excluding Vector128_1; crossgen2 also fails on Vector128_r, so the failure
  is not limited to one assembly. Restores interpreter coverage of Vector128_1.
- b77707: ActiveIssue #134975 on IsWasmReadyToRun (same EH failure as b51875,
  previously hidden by the b51875 crash).
- test115667, test132982, ResolvedFromDifferentContext: skip when the test
  assembly has no Location (empty for assemblies loaded from an R2R wasm image).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Follow ByRefLocals and Regression3_Regressions (#134076): tests that load
their own assembly file return early when Assembly.Location is empty (as
it is for assemblies loaded from an R2R wasm image), instead of skipping
through a TestLibrary-based condition. Restores the original
ResolvedFromDifferentContext path lookup and ConditionalFact.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@lewing

lewing commented Sep 30, 2026

Copy link
Copy Markdown
Member Author

/azp run runtime-coreclr outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

The CI managed test build uses allTargets with TargetOS=AnyOS, so a
wasm-conditioned CLRTestTargetUnsupported on a merged child never excludes
it. Use a method-level ActiveIssue on IsWasmReadyToRun (#132855); the
generated wrapper skips the call, so the oversized R2R image is never loaded.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@lewing

lewing commented Sep 30, 2026

Copy link
Copy Markdown
Member Author

/azp run runtime-coreclr outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Build 1618757 reported four failed tests in passing work items (merged
runners record failures in test results rather than the exit code):

- Runtime_64883, Runtime_66624: return early when the test assembly has no
  Location, like the other self-loading tests.
- GC/Scenarios/Samples/gc: ActiveIssue #134994 on IsWasmReadyToRun.
- arrres_il_r: R2RIncompatible on wasm CoreCLR (#134994); the IL entry point
  has no generated wrapper to honor an attribute.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@lewing

lewing commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

/azp run runtime-coreclr outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Samples/gc and arrres_il_r fail under wasm ReadyToRun because the wasm ABI
reports untracked and call-spilled stack GC refs as always live (clr-abi.md,
"GC References at Call Sites"; same class as #134803, closed as by design).
Replace the ActiveIssue on #134994 with a ConditionalFact (gc) and an
explained R2RIncompatible (arrres_il_r); interpreter coverage is unchanged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@lewing

lewing commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

/azp run runtime-coreclr outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@lewing
lewing enabled auto-merge (squash) October 1, 2026 13:26
@lewing
lewing merged commit ed08972 into main Oct 1, 2026
216 of 220 checks passed
@lewing
lewing deleted the lewing-browser-wasm-outerloop-r2r branch October 1, 2026 13:30
lewing added a commit that referenced this pull request Oct 1, 2026
These JIT regression tests were quarantined for wasm ReadyToRun in
#134960 against #134975 (an exception thrown from a `finally` was
reported as unhandled instead of reaching the caller's `catch`). #134979
("JIT: make Wasm frames that call a finally unwindable") fixed that and
closed #134975, so this removes the three `ActiveIssue` attributes:

- `JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b51875/b51875.cs` (runner
`Regression_8`)
- `JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b51875/Desktop/b51875.cs`
(runner `Regression_PdbOnly_r_2`)
- `JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b77707/b77707.cs` (runner
`Regression_PdbOnly_r_2`)

## Local validation (macOS arm64, branch includes 9997fdf)

```bash
./build.sh -s clr+libs -os browser -c checked -lc Release
src/tests/build.sh checked -arch wasm -os browser -priority1 -p:HostConfiguration=Release \
  -test:JIT/Regression/Regression_8.csproj -test:JIT/Regression/Regression_PdbOnly_r_2.csproj
src/tests/build.sh copynativeonly checked -arch wasm -os browser -priority1 -p:HostConfiguration=Release
src/tests/build.sh generatelayoutonly crossgen2 checked -arch wasm -os browser -priority1 -p:HostConfiguration=Release
# per runner, with CORE_ROOT set and DOTNET_TieredCompilation=0:
RunCrossGen2=1 bash ./<Runner>.sh   # R2R mode
bash ./<Runner>.sh                  # interpreter mode
```

All builds passed. Results from `<Runner>.testResults.xml`:

| Runner | Mode | b51875 | b77707 | Pass / Fail / Skip |
|---|---|---|---|---|
| Regression_8 | R2R (crossgen2) | Pass | n/a | 13 / 0 / 0 |
| Regression_8 | Interpreter | Pass | n/a | 13 / 0 / 0 |
| Regression_PdbOnly_r_2 | R2R (crossgen2) | Pass | Pass | 122 / 0 / 1 |
| Regression_PdbOnly_r_2 | Interpreter | Pass | Pass | 122 / 0 / 1 |

`runtime-coreclr outerloop` has no PR trigger, so it has to be started
manually with `/azp run runtime-coreclr outerloop`.

> [!NOTE]
> This PR was generated with GitHub Copilot assistance.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch-wasm WebAssembly architecture area-Infrastructure-coreclr Only use for closed issues os-browser Browser variant of arch-wasm

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants