Skip to content

Comments

[cDAC] Add infrastructure to run cDAC tests using CLRMD and dumps on Helix reusing runtime builds#124656

Draft
max-charlamb wants to merge 35 commits intodotnet:mainfrom
max-charlamb:cdac-dumptests-helix-combined
Draft

[cDAC] Add infrastructure to run cDAC tests using CLRMD and dumps on Helix reusing runtime builds#124656
max-charlamb wants to merge 35 commits intodotnet:mainfrom
max-charlamb:cdac-dumptests-helix-combined

Conversation

@max-charlamb
Copy link
Member

No description provided.

max-charlamb and others added 30 commits February 18, 2026 13:33
The artifactFileName used $(archiveExtension) which resolves to the
downloading platform's archive format (.zip on Windows, .tar.gz on
Linux). When downloading cross-platform dumps, this produces the wrong
filename — e.g., a Linux agent looks for CdacDumps_windows_x64.tar.gz
but the artifact was uploaded from Windows as CdacDumps_windows_x64.zip.

Hardcode the correct extension for each platform's artifact so the
ExtractFiles glob matches regardless of which platform downloads it.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The dump artifacts are consumed cross-platform, but the upload used
the platform-specific archive format (zip on Windows, tar.gz on Linux).
This caused the Linux agent to fail extracting Windows .zip artifacts
because unzip is not installed on the build image.

Force tar.gz for all dump artifact uploads so both platforms can
extract them without additional tooling.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
max-charlamb and others added 5 commits February 19, 2026 16:41
The send-to-helix-inner-step.yml template call was missing the _Creator
environment variable, causing 'Creator is required when using anonymous
access' errors on .Open Helix queues. All other Helix jobs in the repo
pass _Creator: dotnet-bot through the environment.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request introduces a comprehensive infrastructure for running cDAC (Diagnostic Data Contract) dump-based integration tests using CLRMD on Helix. The infrastructure enables testing cDAC contracts against real crash dumps from both locally-built runtimes and released .NET versions, while reusing existing runtime builds from CI to minimize build times.

Changes:

  • Adds a new DumpTests project with integration tests for all major cDAC contracts (Thread, StackWalk, GC, Object, Loader, Exception, EcmaMetadata, RuntimeInfo, RuntimeTypeSystem)
  • Creates 7 debuggee applications that crash intentionally to produce dumps with known states for testing
  • Implements Helix integration to run dump generation and tests on real hardware across Windows, Linux, and macOS (x64/arm64)
  • Adds PowerShell scripts for local testing and CI dump archive support
  • Updates build infrastructure to support the new test subset (tools.cdacdumptests)

Reviewed changes

Copilot reviewed 36 out of 36 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/native/managed/cdac/tests/Microsoft.Diagnostics.DataContractReader.Tests.csproj Excludes DumpTests directory from main test project
src/native/managed/cdac/tests/DumpTests/Microsoft.Diagnostics.DataContractReader.DumpTests.csproj Main DumpTests project file with Helix payload preparation target
src/native/managed/cdac/tests/DumpTests/DumpTests.targets MSBuild targets for building debuggees and generating crash dumps
src/native/managed/cdac/tests/DumpTests/DumpTestBase.cs Base class providing dump loading, cDAC target creation, and conditional test skipping
src/native/managed/cdac/tests/DumpTests/ClrMdDumpHost.cs CLRMD wrapper for reading dump memory and locating contract descriptors
src/native/managed/cdac/tests/DumpTests/*DumpTests.cs 9 test files covering Thread, StackWalk, ServerGC, Object, Loader, Exception, EcmaMetadata, RuntimeInfo, and RuntimeTypeSystem contracts
src/native/managed/cdac/tests/DumpTests/Debuggees/*/Program.cs 7 debuggee applications (BasicThreads, TypeHierarchy, StackWalk, ServerGC, MultiModule, GCRoots, ExceptionState)
src/native/managed/cdac/tests/DumpTests/Debuggees/Directory.Build.props Shared build properties for all debuggees
src/native/managed/cdac/tests/DumpTests/cdac-dump-helix.proj Helix SDK project for sending dump generation and tests to Helix queues
src/native/managed/cdac/tests/DumpTests/RunHelixLocally.ps1 Script to simulate Helix workflow locally for testing
src/native/managed/cdac/tests/DumpTests/RunDumpTests.ps1 Script for local dump generation and test execution with CI archive support
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Data/Thread.cs Adds TryGetValue pattern for platform-specific UEWatsonBucketTrackerBuckets field
eng/pipelines/runtime.yml Adds two CI jobs for cDAC dump tests (x64 reusing CoreCLR_Libraries build, arm64 with full build)
eng/Versions.props Adds MicrosoftDiagnosticsRuntimeVersion package reference
eng/Subsets.props Adds tools.cdacdumptests subset

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants