Skip to content

Disable desktop CLR and single-file DAC tests blocked by CDB SecureLoadDotNetExtensions#5759

Merged
steveisok merged 6 commits intodotnet:mainfrom
steveisok:fix/sos-disable-secure-load-extensions
Mar 18, 2026
Merged

Disable desktop CLR and single-file DAC tests blocked by CDB SecureLoadDotNetExtensions#5759
steveisok merged 6 commits intodotnet:mainfrom
steveisok:fix/sos-disable-secure-load-extensions

Conversation

@steveisok
Copy link
Member

@steveisok steveisok commented Mar 14, 2026

Summary

Contributes to #5757

CDB 10.0.26100.1 introduced SecureLoadDotNetExtensions which verifies digital signatures of DAC DLLs before loading them. Both the .NET Framework mscordacwks.dll (from local Framework directory and symbol server) and servicing .NET Core DAC DLLs fail this verification, causing 16 test failures across all Windows legs:

Failed to verify signature of file: C:\Windows\Microsoft.Net\Framework64\v4.0.30319\mscordacwks.dll
Error code - 0x000021BE
Debugger.Settings.EngineInitialization.SecureLoadDotNetExtensions is enabled, set to false to disable.
Failed to load data access module, 0x80004002

Root Cause

The test infrastructure conditionally enables SecureLoadDotNetExtensions=true for non-nightly, non-private builds. CDB then rejects the DAC DLLs because their signatures cannot be verified:

  • .NET Framework DACmscordacwks.dll from C:\Windows\Microsoft.Net\Framework64\v4.0.30319\ and from the symbol server
  • Servicing .NET Core DAC — for .NET 8.0 servicing runtimes

This affects three test categories:

  • 13 desktop.cli tests — desktop CLR DAC signature verification fails
  • 2 projectk.sdk.prebuilt tests (DualRuntimes) — desktop CLR portion of dual-runtime dump fails
  • 1 projectk.cli.singlefile test (StackAndOtherTests) — .NET 8.0 servicing DAC fails

Changes

All changes are in SOS.cs — disable the affected tests until the CDB signing issue is resolved:

  1. Exclude desktop CLR configurations from SOS.Configurations — filters out IsDesktop configs that rely on mscordacwks.dll
  2. Skip StackAndOtherTests for single-file on Windows — .NET 8.0 servicing DAC signature verification fails under CDB
  3. Skip DualRuntimes on Windows — desktop CLR DAC portion of dual-runtime dump fails

Impact

CDB 10.0.26100.1 introduced SecureLoadDotNetExtensions which verifies digital
signatures of DAC DLLs before loading them. Both the .NET Framework
mscordacwks.dll (from local Framework directory and symbol server) and servicing
.NET Core DAC DLLs fail this verification, causing all desktop.cli,
DualRuntimes, and singlefile servicing SOS tests to fail with:

  Failed to verify signature of file: ...mscordacwks.dll
  Error code - 0x000021BE
  Failed to load data access module, 0x80004002

This disables SecureLoadDotNetExtensions for CDB and DacSignatureVerification
for dotnet-dump until the DAC signing issue is resolved. Also adds the Microsoft
symbol server to the CDB sympath so mscordacwks.dll can be downloaded when
needed.

Fixes dotnet#5757

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 14, 2026 05:56
@steveisok steveisok requested a review from a team as a code owner March 14, 2026 05:56
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 PR updates SOS.UnitTests debugger startup configuration to work around CDB 10.0.26100.1 DAC signature verification failures and ensure the .NET Framework DAC can be resolved during desktop CLR debugging on Windows.

Changes:

  • Add the Microsoft public symbol server to CDB’s initial symbol path (-y) to enable downloading mscordacwks.dll when needed.
  • Unconditionally disable CDB SecureLoadDotNetExtensions to bypass DAC signature checks that reject .NET Framework and servicing .NET DACs.
  • Unconditionally disable dotnet-dump DAC signature verification via runtimes --DacSignatureVerification:false.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Copy link
Member

@noahfalk noahfalk left a comment

Choose a reason for hiding this comment

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

I'm guessing the signing changes alone are sufficient to resolve the issue without introducing symbol server. If for some reason it isn't then we should try to explicitly put the directory where clr.dll is installed on the symbol path.

arguments.AppendFormat(@" -y ""{0}""", debuggeeConfig.BinaryDirPath);
// the .nuget cache) and set to just the directory containing the debuggee binaries
// plus the Microsoft symbol server so CDB can download mscordacwks.dll for desktop CLR debugging.
arguments.AppendFormat(@" -y ""{0};srv*https://msdl.microsoft.com/download/symbols""", debuggeeConfig.BinaryDirPath);
Copy link
Member

Choose a reason for hiding this comment

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

We shouldn't need the symbol server, mscordacwks.dll is already on the machine in the directory adjacent to clr.dll. Symbol server will add perf overhead and is an extra potential failure point.

Copy link
Member Author

Choose a reason for hiding this comment

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

We will need to look into the machines to see why things started tanking. Can this be a temporary workaround so that we don't fail the tests?

Copy link
Member

Choose a reason for hiding this comment

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

I'm fine if its a temporary workaround, but is it even necessary? Disabling the verification alone wasn't enough to make it work?

Copy link
Member

Choose a reason for hiding this comment

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

I am not a fan of disabling checks since that's our prod scenario. Loading from local should be enough. If that didn't fix this, then the issue probably lies elsewhere.

Remove the Microsoft symbol server from CDB sympath — mscordacwks.dll
should already be available locally. Fix comment on DacSignatureVerification
to correctly attribute it to dotnet-dump instead of CDB.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
steveisok and others added 3 commits March 16, 2026 17:27
Restore the original conditional DacSignatureVerification logic for
dotnet-dump — only CDB tests are failing, not dotnet-dump tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…failure

Temporarily skip tests that fail because CDB SecureLoadDotNetExtensions and
dotnet-dump DacSignatureVerification reject DAC DLLs:

- Filter desktop CLR configs from Configurations (13 desktop.cli tests)
- Skip DualRuntimes on Windows (desktop CLR DAC fails in dotnet-dump)
- Skip StackAndOtherTests single-file on Windows (.NET 8 servicing DAC fails)

Fixes dotnet#5757

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…nsions' into fix/sos-disable-secure-load-extensions
@steveisok steveisok changed the title Disable CDB SecureLoadDotNetExtensions and add symbol server to sympath Disable desktop CLR and single-file DAC tests blocked by CDB SecureLoadDotNetExtensions Mar 18, 2026
The disabled tests no longer exercise the CDB SecureLoadDotNetExtensions
or dotnet-dump DacSignatureVerification code paths, so the original
conditional logic can remain as-is.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Member

@max-charlamb max-charlamb left a comment

Choose a reason for hiding this comment

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

Seems reasonable to temporarily disable these test runs until we have a more permanent fix.

@steveisok steveisok merged commit fc9d9cd into dotnet:main Mar 18, 2026
16 of 18 checks passed
@steveisok steveisok deleted the fix/sos-disable-secure-load-extensions branch March 18, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants