-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Add linux_arm and windows_x86 to cDAC dump test platforms #125793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
e4e95ea
54a72fb
d05aff6
3011ff9
6d51b30
0ba94b3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,9 +38,11 @@ steps: | |
|
|
||
| $queue = switch ("$(osGroup)_$(archType)") { | ||
| "windows_x64" { "$(helix_windows_x64)" } | ||
| "windows_x86" { "$(helix_windows_x64)" } | ||
| "windows_arm64" { "$(helix_windows_arm64)" } | ||
| "linux_x64" { "$(helix_linux_x64_oldest)" } | ||
| "linux_arm64" { "$(helix_linux_arm64_oldest)" } | ||
| "linux_arm" { "$(helix_linux_arm32_oldest)" } | ||
|
Comment on lines
39
to
+45
|
||
| "osx_x64" { "$(helix_macos_x64)" } | ||
| "osx_arm64" { "$(helix_macos_arm64)" } | ||
| default { Write-Error "Unsupported platform: $(osGroup)_$(archType)"; exit 1 } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| <Project> | ||
|
|
||
| <!-- | ||
| On Windows, heap dumps (type 2) require the DAC (mscordaccore.dll) which is unsigned | ||
| in local/CI builds. Set the DisableAuxProviderSignatureCheck registry value so that | ||
| MiniDumpWriteDump accepts the unsigned DAC. Windows 11+ / Server 2022+ only. | ||
|
|
||
| The key must be set in both the native (64-bit) and WoW64 (32-bit) registry views. | ||
| Without /reg:32, x86 processes running under WoW64 read from | ||
| HKLM\SOFTWARE\WOW6432Node\... and miss the key, producing degraded dumps. | ||
| --> | ||
|
|
||
| <PropertyGroup> | ||
| <_DacRegKey>HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\MiniDumpSettings</_DacRegKey> | ||
| <_DacRegAdd>reg add "$(_DacRegKey)" /v DisableAuxProviderSignatureCheck /t REG_DWORD /d 1 /f</_DacRegAdd> | ||
| <_DacRegAdd32>$(_DacRegAdd) /reg:32</_DacRegAdd32> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- | ||
| MSBuild target for local/CI builds (opt-in via /p:SetDisableAuxProviderSignatureCheck=true). | ||
| --> | ||
| <Target Name="_EnableUnsignedDacWindows" | ||
| BeforeTargets="GenerateAllDumps" | ||
| Condition="'$(HostOS)' == 'windows' AND '$(SetDisableAuxProviderSignatureCheck)' == 'true'"> | ||
| <Exec Command="$(_DacRegAdd)" IgnoreExitCode="true" IgnoreStandardErrorWarningFormat="true" /> | ||
| <!-- WoW64 view only needed for x86 processes --> | ||
| <Exec Command="$(_DacRegAdd32)" IgnoreExitCode="true" IgnoreStandardErrorWarningFormat="true" | ||
| Condition="'$(TargetArchitecture)' == 'x86'" /> | ||
| <Message Text="Note: If heap dump generation fails on Windows, ensure the DisableAuxProviderSignatureCheck registry key is set. Run as admin or set manually: $(_DacRegAdd)" | ||
| Importance="normal" /> | ||
| </Target> | ||
|
|
||
| </Project> |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -63,6 +63,7 @@ | |||||||||
| derived from each debuggee's DumpTypes property (Heap->heap/2, Full->full/4). | ||||||||||
| --> | ||||||||||
| <Import Project="$(DumpTestsPayload)/debuggee-metadata.props" /> | ||||||||||
| <Import Project="$(MSBuildThisFileDirectory)EnableUnsignedDac.props" /> | ||||||||||
|
|
||||||||||
| <!-- | ||||||||||
| Helix work item command: generate dumps then run tests (or tar + upload). | ||||||||||
|
|
@@ -83,7 +84,8 @@ | |||||||||
| <!-- Windows: test mode tail command --> | ||||||||||
| <PropertyGroup Condition="'$(TargetOS)' == 'windows' AND '$(DumpOnly)' != 'true'"> | ||||||||||
| <_TestCommand>%HELIX_CORRELATION_PAYLOAD%\dotnet.exe exec --runtimeconfig %HELIX_WORKITEM_PAYLOAD%\tests\Microsoft.Diagnostics.DataContractReader.DumpTests.runtimeconfig.json --depsfile %HELIX_WORKITEM_PAYLOAD%\tests\Microsoft.Diagnostics.DataContractReader.DumpTests.deps.json %HELIX_WORKITEM_PAYLOAD%\tests\xunit.console.dll %HELIX_WORKITEM_PAYLOAD%\tests\Microsoft.Diagnostics.DataContractReader.DumpTests.dll -xml testResults.xml -nologo</_TestCommand> | ||||||||||
| <_FullCommand>$(_DumpGenCommands) & $(_DumpInfoCommand) & $(_TestCommand)</_FullCommand> | ||||||||||
| <_TarCommand>tar -czf %HELIX_WORKITEM_UPLOAD_ROOT%\dumps.tar.gz -C %HELIX_WORKITEM_PAYLOAD%\dumps .</_TarCommand> | ||||||||||
| <_FullCommand>$(_DumpGenCommands) & $(_DumpInfoCommand) & $(_TestCommand) & $(_TarCommand)</_FullCommand> | ||||||||||
|
||||||||||
| <_FullCommand>$(_DumpGenCommands) & $(_DumpInfoCommand) & $(_TestCommand) & $(_TarCommand)</_FullCommand> | |
| <_FullCommand>set "_testExitCode=0" & $(_DumpGenCommands) & $(_DumpInfoCommand) & $(_TestCommand) & set "_testExitCode=%ERRORLEVEL%" & $(_TarCommand) & exit /b %_testExitCode%</_FullCommand> |
Copilot
AI
Mar 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the Windows test-mode command chain, appending the tar step with & will overwrite the %ERRORLEVEL% from the xUnit run (and potentially from earlier steps) with tar's exit code. That can cause Helix to report the work item as successful even when tests fail. Consider capturing the test exit code before running tar and exiting with that original code after tar completes (while still tarring for diagnostics).
| <_FullCommand>$(_DumpGenCommands) & $(_DumpInfoCommand) & $(_TestCommand) & $(_TarCommand)</_FullCommand> | |
| <_FullCommand>cmd /v:ON /c "$(_DumpGenCommands) & $(_DumpInfoCommand) & $(_TestCommand) & set _testExitCode=!ERRORLEVEL! & $(_TarCommand) & exit /b !_testExitCode!"</_FullCommand> |
Copilot
AI
Mar 19, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Unix, _FullCommand ends with ; $(_TarCommand), so the work item’s exit status becomes the tar exit status (not the dumpgen/dumpinfo/xunit chain). This can hide failures (e.g., xunit crash/OOM, missing runtimeconfig, etc.) if tar succeeds. Capture/propagate the original exit code (e.g., save $? before tar and exit with it) so Helix reliably fails the work item when the test command fails.
| <_FullCommand>$(_DumpGenCommands) && $(_DumpInfoCommand) && $(_TestCommand) ; $(_TarCommand)</_FullCommand> | |
| <_FullCommand>$(_DumpGenCommands) && $(_DumpInfoCommand) && $(_TestCommand) ; exit_code=$? ; $(_TarCommand) ; exit $exit_code</_FullCommand> |
Copilot
AI
Mar 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the Unix test-mode command chain, using ; $(_TarCommand) will make the overall shell command exit with tar's status, not the xUnit run's status. This can mask test failures if tar succeeds. Preserve the xUnit exit code (e.g., save $? before tarring and exit with it afterward) so Helix correctly fails the work item while still producing dumps.tar.gz.
| <_FullCommand>$(_DumpGenCommands) && $(_DumpInfoCommand) && $(_TestCommand) ; $(_TarCommand)</_FullCommand> | |
| <_FullCommand>$(_DumpGenCommands) && $(_DumpInfoCommand) && $(_TestCommand) ; test_exit=$? ; $(_TarCommand) ; exit $test_exit</_FullCommand> |
Copilot
AI
Mar 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The updated comment says dumps are tarred “for download on failure”, but _TarCommand is executed unconditionally in the test-mode _FullCommand on both Windows and Unix. Either adjust the comment to reflect the unconditional tar, or gate tar creation to failure if that’s the intent.
Copilot
AI
Mar 19, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In test mode, the work item now always creates dumps.tar.gz and requests it via DownloadFilesFromResults. Given dump sizes (multi-GB full dumps), this will upload/download large artifacts even on successful runs, which can significantly increase Helix time, storage, and pipeline bandwidth. If the intent is “download on failure”, consider only creating/downloading the tar when tests fail (or gate it behind a property), and keep the default path lightweight for passing runs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new "windows_x86" case currently maps to
$(helix_windows_x64)(which is the latest Windows x64 alias), even though this PR introduces a dedicatedhelix_windows_x86variable (Windows 10 queue) and the PR description calls out Windows.10.Amd64.Open. Switch the case to use$(helix_windows_x86)so queue selection matches the intended x86 coverage/OS baseline.