You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[CI] SOS.UnitTests desktop.cli tests fail with 'Failed to load data access module' (mscordacwks.dll mismatch) #5757
15 SOS.UnitTests with config: desktop.cli (and 2 DualRuntimes tests) are consistently failing on all Windows rolling CI legs (diagnostics-public-ci, definition 25) since approximately Mar 10, 2026. The pipeline is currently red — the last 2 consecutive rolling builds both failed.
Root Cause
All failing tests hit the same error from CDB/SOS:
Failed to load data access module, 0x80004002
Verify that 1) you have a recent build of the debugger (10.0.18317.1001 or newer)
2) the file mscordacwks.dll that matches your version of clr.dll is
in the version directory or on the symbol path
The SOS commands (!PrintException, !ClrStack, !DumpObj, etc.) produce no diagnostic output because the DAC cannot be loaded for the .NET Framework CLR in the debuggee process. The test regex verification then fails because there is no output to match.
This occurs 17 times across the test suite in a single run. The failure is deterministic — identical tests fail on both x64 and x86 with the same error.
Likely Cause
A .NET Framework servicing update on the CI agent machines introduced a new clr.dll version, but the matching mscordacwks.dll is not available on the configured symbol path. See closed issue #4625 for a prior occurrence of missing mscordacwks symbols.
The Microsoft symbol server is not added to the CDB-level sympath for desktop tests. .sympath+ for the runtime symbols path is only configured for triage dumps (line 554–558), and !SetSymbolServer -ms (the SOS-level symbol server) is only added for single-file apps (line 1024).
So when .NET Framework gets a servicing update on the CI agents:
CDB sees the new clr.dll in the debuggee process
.cordll -l tries to find the matching mscordacwks.dll
It only searches the debuggee binary directory — no symbol server
→ Failed to load data access module, 0x80004002
Possible fix: Add .sympath+ srv*https://msdl.microsoft.com/download/symbols to the initial CDB commands for desktop tests, so CDB can download the matching DAC from the Microsoft symbol server. This would make the tests resilient to .NET Framework servicing updates on CI machines.
Alternatively, the .cordll -lp path could be pointed at the local .NET Framework installation directory where mscordacwks.dll lives alongside clr.dll.
After the initial PR still showed failures, I dug deeper into the CI logs and found the actual root cause.
What's Really Happening
CDB 10.0.26100.1 (the cdb-sos NuGet package) introduced SecureLoadDotNetExtensions, a security feature that verifies digital signatures of DAC DLLs before loading them. The test infrastructure at SOSRunner.cs:568 was conditionally enabling this:
For rolling CI builds (non-nightly, non-private), this evaluates to true. CDB then rejects DAC DLLs because their signatures cannot be verified:
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.
Even after adding the Microsoft symbol server to the sympath (so CDB could download mscordacwks.dll), the downloaded copy also fails signature verification:
Failed to verify signature of file: ...\sym\mscordacwks_AMD64_AMD64_4.8.9037.00.dll\...\mscordacwks_AMD64_AMD64_4.8.9037.00.dll
Affected Tests
Category
Count
Why
desktop.cli
13
.NET Framework DAC rejected
projectk.sdk.prebuilt (DualRuntimes)
2
Desktop CLR in dual-runtime dump rejected
projectk.cli.singlefile (8.0.23)
1
.NET 8 servicing DAC rejected
Nightly runtime tests pass because shouldVerifyDacSignature = false when IsNightlyBuild() = true.
Fix
PR #5758 (updated) disables SecureLoadDotNetExtensions unconditionally for CDB and DacSignatureVerification for dotnet-dump. Can be re-enabled once the DAC signing compatibility with CDB 10.0.26100.1 is resolved.
As long as SOS is debugging a live debuggee or a dump that was generated on the same machine then mscordacwks.dll is already on the machine in same directory where clr.dll is. I'd recommend using that one rather than adding a symbol server dependency. Network dependencies are slower and less reliable.
As long as SOS is debugging a live debuggee or a dump that was generated on the same machine then mscordacwks.dll is already on the machine in same directory where clr.dll is. I'd recommend using that one rather than adding a symbol server dependency. Network dependencies are slower and less reliable.
I agree. I think of this as a stop-gap until we fix the actual problem.
Activity
steveisok commentedon Mar 14, 2026
After investigating the test infrastructure in
SOSRunner.cs, the root cause is clearer:The CDB symbol path for
desktop.clitests does not include a symbol server.In
SOSRunner.cs(~line 534), the initial sympath for CDB is set to only the debuggee binary directory:The Microsoft symbol server is not added to the CDB-level sympath for desktop tests.
.sympath+for the runtime symbols path is only configured for triage dumps (line 554–558), and!SetSymbolServer -ms(the SOS-level symbol server) is only added for single-file apps (line 1024).So when .NET Framework gets a servicing update on the CI agents:
clr.dllin the debuggee process.cordll -ltries to find the matchingmscordacwks.dllFailed to load data access module, 0x80004002Possible fix: Add
.sympath+ srv*https://msdl.microsoft.com/download/symbolsto the initial CDB commands for desktop tests, so CDB can download the matching DAC from the Microsoft symbol server. This would make the tests resilient to .NET Framework servicing updates on CI machines.Alternatively, the
.cordll -lppath could be pointed at the local .NET Framework installation directory wheremscordacwks.dlllives alongsideclr.dll.Add Microsoft symbol server to CDB sympath for desktop CLR tests
Disable CDB SecureLoadDotNetExtensions and add symbol server to sympath
steveisok commentedon Mar 14, 2026
Updated Root Cause: CDB SecureLoadDotNetExtensions
After the initial PR still showed failures, I dug deeper into the CI logs and found the actual root cause.
What's Really Happening
CDB 10.0.26100.1 (the
cdb-sosNuGet package) introducedSecureLoadDotNetExtensions, a security feature that verifies digital signatures of DAC DLLs before loading them. The test infrastructure atSOSRunner.cs:568was conditionally enabling this:For rolling CI builds (non-nightly, non-private), this evaluates to
true. CDB then rejects DAC DLLs because their signatures cannot be verified:Even after adding the Microsoft symbol server to the sympath (so CDB could download
mscordacwks.dll), the downloaded copy also fails signature verification:Affected Tests
desktop.cliprojectk.sdk.prebuilt(DualRuntimes)projectk.cli.singlefile(8.0.23)Nightly runtime tests pass because
shouldVerifyDacSignature = falsewhenIsNightlyBuild() = true.Fix
PR #5758 (updated) disables
SecureLoadDotNetExtensionsunconditionally for CDB andDacSignatureVerificationfor dotnet-dump. Can be re-enabled once the DAC signing compatibility with CDB 10.0.26100.1 is resolved.Disable CDB SecureLoadDotNetExtensions and add symbol server to sympath
noahfalk commentedon Mar 14, 2026
As long as SOS is debugging a live debuggee or a dump that was generated on the same machine then mscordacwks.dll is already on the machine in same directory where clr.dll is. I'd recommend using that one rather than adding a symbol server dependency. Network dependencies are slower and less reliable.
steveisok commentedon Mar 14, 2026
I agree. I think of this as a stop-gap until we fix the actual problem.
Disable tests affected by CDB/dotnet-dump DAC signature verification …
Disable desktop CLR and single-file DAC tests blocked by CDB SecureLo…
Retire legacy Overflow and MiniDumpLocalVarLookup scripts (#6129)