Enable cDAC-only dump analysis mode and add CI test legs#5755
Draft
max-charlamb wants to merge 3 commits intodotnet:mainfrom
Draft
Enable cDAC-only dump analysis mode and add CI test legs#5755max-charlamb wants to merge 3 commits intodotnet:mainfrom
max-charlamb wants to merge 3 commits intodotnet:mainfrom
Conversation
When ForceUseContractReader is set: - RuntimeWrapper.GetClrDataProcess() tries cDAC even when caller doesn't pass UseCDac flag, and skips legacy DAC fallback. - DumpTargetFactory.OpenDump() allows cross-platform dump analysis since the cDAC is a host-native NativeAOT binary. - Runtime.GetLibraryPath() skips platform filter for cDAC discovery. - Runtime.GetLocalPath() falls back to RuntimeModuleDirectory for cDAC, enabling user-provided paths via setclrpath. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The testsoscdac.cmd/sh scripts filtered tests by CDACCompatible category, but no tests were ever marked with this trait. Replace with the new SOS_TEST_CDAC environment variable approach that enables cDAC-only mode for all dotnet-dump tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ef207bf to
65cd2f6
Compare
- SOSRunner sends 'runtimes --forceusecdac' to dotnet-dump when SOS_TEST_CDAC is set, enabling cDAC-only mode for dump tests. - build.yml gains a useCdac parameter that passes -useCdac to the build script, setting SOS_TEST_CDAC=true. - Add Windows_cDAC (build+test) and Ubuntu_22_04_cDAC (test-only) CI legs running Release x64 with cDAC-only mode. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
65cd2f6 to
bd67374
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Enable SOS to load and operate on dumps using only the cDAC (no legacy DAC dependency). This enables cross-platform dump analysis and provides CI coverage for cDAC-only mode.
Changes
Commit 1: Enable cDAC-only dump analysis mode
When
ForceUseContractReaderis set (viaruntimes --forceusecdac):UseCDacflag, and skips legacy DAC fallbackDebugLibraryKind.CDacRuntimeModuleDirectoryfor cDAC, enabling user-provided paths viasetclrpathCommit 2: Remove outdated CDACCompatible test scripts
The
testsoscdac.cmd/shscripts filtered byCDACCompatiblecategory, but no tests were ever marked with this trait.Commit 3: Add cDAC-only CI test legs
runtimes --forceusecdacto dotnet-dump whenSOS_TEST_CDACis setbuild.ymlgains auseCdacparameter that passes-useCdacto the build scriptTesting
Verified locally with
dotnet-dump analyzeusing cDAC-only mode against runtime cDAC dump test fixtures:clrstack— full managed stack trace ✅threads— lists all threads ✅dumpheap -stat— graceful error (cDAC feature gap in ClrMD, tracked separately) ✅Related
ICLRContractLocatornot exposed inDacDataTargetCOM.ComputeVtables)