Repository navigation
[wasm][coreclr] Drop -v:diag from WBT crossgen2 arguments test - #137291
Conversation
The assertion reads Crossgen2ExtraCommandLineArgs from the binlog, which records task parameters regardless of console verbosity. Diagnostic verbosity made each case capture ~120 MB of output and pushed the Windows no-workload WBT work item past its 90 minute Helix timeout. Co-authored-by: Copilot App <[email protected]>
|
Azure Pipelines: Successfully started running 3 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. |
|
/ba-g Failures are not related to the console-verbosity change. The only failing Helix work item in build 1673938 is Windows The Windows work item also failed on The Windows run uploaded no test results, and Build Analysis has no known-issue match. Bypassing the check does not establish that this change fully resolves the Windows timeout. Note This comment was generated with the assistance of GitHub Copilot. |
Pull Request is not mergeable
#137360) This makes `ReadyToRunTests.PublishCrossgen2ArgumentsReflectWasmDebugInfoProperties` (added in #136506) much cheaper while keeping its coverage. ## Why The Windows Helix work item `WBT-NoWorkload-CLR-Wasm.Build.Tests` keeps hitting its 90-minute timeout. #137291 removed `-v:diag` from this test, but that only shrank the logs. On #137291's own CI (Helix job `96967939-699a-48d4-a0d9-ab808c96a280`) the work item still ran 1h34m and timed out with exit -3. In the last passing slow run (Helix job `a5e1304b-0299-470a-a3ce-9a2289a5b925`), this test's 12 cases took **1464 s**. Each case runs a full per-app or composite ReadyToRun publish (~120 s), just to read back `Crossgen2ExtraCommandLineArgs`. The flags under test (`--wasm-debug-info=*`, `--strip-inlining-info`, `--strip-debug-info`, `--opt-cross-module:*`) are all set in static `PropertyGroup`s, in `Microsoft.NET.Sdk.WebAssembly.Browser.CoreCLR.targets` and `Microsoft.NET.CrossGen.targets`. `RunReadyToRunCompiler` receives `$(PublishReadyToRunCrossgen2ExtraArgs);$(_PublishReadyToRunCrossgen2ExtraArgs)`, and none of the targets touch these flags. In a CI binlog of the old test (Release, per-app, `DebuggerSupport=true`), the evaluated property was `;--wasm-debug-info=none;--opt-cross-module:*`. The task received `;--wasm-debug-info=none;--opt-cross-module:*;`, the same value plus the empty underscore property. ## Change - `PublishCrossgen2ArgumentsReflectWasmDebugInfoProperties` now runs `dotnet msbuild -t:Restore` and then `dotnet msbuild -getProperty:PublishReadyToRunCrossgen2ExtraArgs`, both with `-p:_IsPublishing=true` and the same project properties and `-p:` arguments, writing a binlog for each step. Restore has to be a separate invocation: MSBuild skips `-restore` when `-getProperty` runs without a target, and the WebAssembly SDK pack that sets these arguments is imported from the test's restored packages. - The 12-case matrix is unchanged. - Composite cases still pass the Crossgen2 SDK override props and targets, so both import orders are still covered. - Each case's cost drops from a full R2R publish (~120 s) to a restore plus an evaluation. The restore took ~8.7 s inside the old publishes. - `PublishRunAllPagesCore` now reads its existing publish binlog and asserts the same flags on the `RunReadyToRunCompiler` task. That covers per-app Debug, per-app Release (trimmed, untrimmed, native relink), and composite Release, so we still prove crossgen2 receives the flags, without extra publishes. Expected savings: about 20 minutes on the Windows no-workload CLR work item. That's an estimate from the timings above, not a measurement. ## Validation - `./dotnet.sh build src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj -c Release -p:TargetOS=browser -p:TargetArchitecture=wasm -p:RuntimeFlavor=CoreCLR -p:InstallWorkloadForTesting=false`: **passed** (0 warnings, 0 errors). - Repo SDK, scratch project: `dotnet msbuild -restore -getProperty:NuGetPackageRoot` produced no `obj/` and an empty value. Running `dotnet msbuild -t:Restore` first, then `dotnet msbuild -getProperty:NuGetPackageRoot -getProperty:Foo`, **returned the restored value**, and stdout contained only the JSON result. - CI on the first commit (build 1675766): - All 12 evaluation cases failed on Linux and Windows with an empty value, because restore never ran. The second commit fixes that. - The new `RunReadyToRunCompiler` assertions in `PublishRunAllPages`, `PublishRunAllPagesComposite` and `PublishRunAllPagesNativeRelink` passed on both platforms. - On Windows, `WBT-NoWorkload-CLR` finished in **1h16m**, under the 90-minute limit; the previous run timed out at 1h34m. The 12 cases took about 10 s total there. With the fix, expect roughly 2–3 more minutes for restore and evaluation. - `PublishWithUnnormalizedIntermediatePathKeepsReadyToRunImages` (Release, and Release composite) failed on Windows only: `AssertBundle` found loose `.dll` files in `publish/`. That test (#137229) doesn't use any code this PR changes, and it passed on Linux. - I did **not** run the WBT tests locally, because they need a browser-wasm CoreCLR build. The CI `WBT-NoWorkload-CLR` lanes are the real check. > [!NOTE] > This PR description was generated with GitHub Copilot. --------- Co-authored-by: Copilot App <[email protected]>
Removes
extraBuildArgs.Add("-v:diag");fromReadyToRunTests.PublishCrossgen2ArgumentsReflectWasmDebugInfoProperties. The theory matrix and assertions are unchanged.Why
The Helix work item
WBT-NoWorkload-CLR-Wasm.Build.Testsonwindows.server2025.amd64.openis dead-lettering on main and on PRs. Examples: main build 1672437, and #136772 builds 1670137 and 1672543. Each one fails with exit -1 after 0 s and no console log._workItemTimeoutof 01:30:00. The machine then reboots and the item retries on another machine. After 3 attempts it dead-letters.[TestCategory("no-workload")]cases of this test, and each one publishes with-v:diag.a5e1304b-0299-470a-a3ce-9a2289a5b925, from Keep Unix named mutex storage mapped until a native owner thread exits #137223),testResults.xmlwas 1.47 GB. In a run from before [browser][coreclr] Set WebAssembly ReadyToRun debug flags #136506 (jobe197dfa2-77e6-46f3-8c6c-b0c6903841b1) it was 504 KB. Each of these cases captured about 120 MB (~1M lines) of diag MSBuild output and took about 121 s.The test doesn't need diagnostic verbosity.
GetCrossgen2ExtraCommandLineArgs(binlogPath)reads theCrossgen2ExtraCommandLineArgsparameter of theRunReadyToRunCompilertask from the binlog, and the binary logger records task parameters at any console verbosity.Validation
./dotnet.sh build src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj -c Release -p:TargetOS=browser -p:TargetArchitecture=wasm -p:RuntimeFlavor=CoreCLR -p:InstallWorkloadForTesting=false: passed (0 warnings, 0 errors).-p:InstallWorkloadForTesting=false, the test assembly still compiled. The build then failed in the testing-SDK provisioning step (workloads-browser.targets(122,5)), because this worktree has no locally built runtime packs.WBT-NoWorkload-CLRwork item is the real check.Note
This PR description was generated with GitHub Copilot.