Repository navigation
Capture WER LocalDumps for crossgen2 on Windows VMR builds (diagnose dotnet/runtime#125699) - #7279
Conversation
To diagnose dotnet/runtime#125699, where the shipped crossgen2 has hit a FailFast/AV in ProfileDataManager.GetAllowSynthesis a handful of times in the SDK crossgen layout step (Crossgen.targets:171) without ever leaving behind a dump. Enable WER LocalDumps for crossgen2.exe on the Windows legs so the next recurrence produces a full minidump that publishes via the existing BuildLogs artifact.
There was a problem hiding this comment.
Pull request overview
Adds Windows-only pipeline configuration to capture Windows Error Reporting (WER) LocalDumps for crossgen2.exe during VMR builds, so intermittent FailFast/AV crashes in the SDK crossgen layout step can be diagnosed with crash dumps (dotnet/runtime#125699).
Changes:
- Adds a Windows pre-build
pwshstep to configure WER LocalDumps forcrossgen2.exe. - Routes any generated dumps into
$(Build.ArtifactStagingDirectory)\BuildLogs\crossgen2-dumpsso they flow out via the existing BuildLogs publishing.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Feel free to reject this or suggest alternatives. We've only seen these crashes sporadically. More generally it would be good to capture crashes from any build tool, especially so ones that we author. |
|
@mmitche any suggestions on who could review this? |
mmitche
left a comment
There was a problem hiding this comment.
Looks reasonable. Is this targeting the correct branch though? It looks like 10;0 is where it shows up most?
|
Good point. Take this and also port it to 10.0? |
…sgen2 Forward-port of dotnet#7279 to release/10.0.4xx. Diagnoses dotnet/runtime#125699; the most recent recurrence (build 3001312, 2026-06-16, Windows_x64) was on this branch. The release branch wraps BuildLogs differently than main (CopyFiles@2 with artifacts/log/**), so dumps go under sourcesPath\artifacts\log\crossgen2-dumps.
|
/backport to release/10.0.1xx |
|
Started backporting to |
Why
dotnet/runtime#125699 tracks an intermittent crash of the shipped
crossgen2during the SDK crossgen layout step (Crossgen.targets(171,5)). Each recurrence FailFasts at the exact same site:with the symptom alternating between
NullReferenceExceptionandAccessViolation— the classic signature of heap/GC corruption rather than a logic bug at that line. So far the crash has only been observed indotnet-unified-buildlegs (VMR), across multiple branches and on bothWindows_x86andWindows_x64:dotnet/dotnet#5533internal/release/10.0.109release/10.0.4xxNo crash dump was captured in any of these runs — only the textual stack — so we have no way to inspect heap state, thread context, or the offending
MethodDesc. Without a dump, root-causing this is essentially blocked.What this PR does
Adds a pre-build step on the Windows leg of
vmr-build.ymlthat configures Windows Error Reporting LocalDumps forcrossgen2.exe:$(Build.ArtifactStagingDirectory)\BuildLogs\crossgen2-dumpsDumpType = 2(MiniDumpWithFullMemory — needed because we suspect heap corruption)DumpCount = 3The dumps ride out via the existing Publish BuildLogs 1ES output (
condition: succeededOrFailed()on$(Build.ArtifactStagingDirectory)/BuildLogs), so no new artifact publish is required.Cost when crossgen2 doesn't crash
Zero — WER only writes dumps on actual unhandled failfast/AV. The registry write itself takes < 100 ms.
continueOnError: truekeeps the build robust if a non-admin agent ever runs the leg.How to remove
Once a dump is captured and
dotnet/runtime#125699is root-caused, revert this commit.Note
Drafted with AI (GitHub Copilot) assistance.