Repository navigation
Release test1_539509's large static array before shutdown - #136869
Conversation
Co-authored-by: Copilot <[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. |
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
|
Seems like recent changes in reflection have increased the numbers of GCs that need to run during shutdown (via EventSource) and may have lead to this test now taking too long. I couldn't reproduce the Wasm timeout locally, so am not sure that this will fix the problem there. But it seems possible. |
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the targeted cleanup of the static array before runtime shutdown.
No open issues 🎉
What changed in this PR
This PR clears the regression test’s large static array before runtime shutdown to address the Windows x86 GCStress timeout reported in #135042. It does not claim to fix the browser-Wasm failure.
Changes:
- Sets
App.m_alFwd20tonullafter the final test operation and exception handler, before printingPassed.. - Adds a comment explaining the cleanup while preserving existing test operations and exception handling.
| File | Description |
|---|---|
src/tests/JIT/jit64/regress/vsw/539509/test1.cs |
Clears the large static array reference at test completion to avoid retaining it during shutdown. |
Review effort: Balanced
|
/ba-g osx-arm64 unrelated build timeout / disconnect |
Summary
Release
App.m_alFwd20at the end ofTestEntryPoint, afterBB.Method1and its exception handler, before printingPassed.. All existing allocations, byref stores, test calls, and exception handling remain unchanged.Static5leaves an array with 31,298,400 reference slots rooted in this static field (125 MB on x86). The Windows timeout dump from build 1648012 shows shutdown waiting for an ETW callback that is generating the runtime EventSource manifest and repeatedly scanning this array under GCStress.Addresses the Windows x86 GCStress occurrence reported in #135042. The browser-Wasm failure was not reproduced locally and is not claimed to be fixed.
Validation
Recompiled the complete modified test source with Roslyn,
/optimize- /debug:full, against the recovered matching Windows x86 Checked CI runtime from build 1648012. Compilation passed.A session-only diagnostic driver calls the complete
App.TestEntryPoint, checks that the static root was cleared, and then generates theNativeRuntimeEventSourcemanifest. Commands below ran from that recovered CI layout:DOTNET_GCStress0corerun.exe test1_539509_check_baseline.dllPassed., then fails the added cleanup check as expected (exit 1).0corerun.exe test1_539509_check_fixed.dll manifest3corerun.exe test1_539509_check_fixed.dll manifestAll seven original test operations and six handled-exception messages match the baseline in both patched runs.
An isolated probe using the same CI runtime measured 100 forced compacting full GCs at 9.265 seconds with the array rooted versus 0.022 seconds after clearing the root. This is a GC-cost probe, not a full-test benchmark.
git diff --checkpassed. No repository SDK/project build, full test suite, or browser-Wasm validation was run for this patch.Note
This fix and pull request description were prepared with GitHub Copilot.