SOS commands fail while debugging a process in which several CLR versions are loaded

I have an ASP.net 2.0 application that I am trying to debug live using Windbg and SOS.dll. When I attach the debugger to the process, I see that it is loading versions 2.0 and 4.0 for the CLR. [Mscorwks.dll and CLR.dll]. I load SOS using .loadby sos mscorwks. After that, none of my SOS commands work. I get "Failed to request threadstore", "Unable to retrieve information from the system domain", etc.

I found out that this is due to a mismatch in mscordacwks.dll for another version of the CLR. But all the solutions that I found on google to download the correct version of mscordacwks using the cordll command failed to solve my problem. In particular, I used .cordll -ve -lp, but it doesn't seem to make any difference. After doing the β€œ! Threads” combats again, I get

"CLR DLL State: Loaded DLL C: \ WINDOWS \ Microsoft.NET \ Framework \ v4.0.30319 \ mscordacwks.dll

Failed to request threadstore "

I saw another entry in stackoverflow around this issue. But fortunately for him, the problem disappeared before a solution was proposed, and this is also not a duplicate of this entry.

Any key that will help me use the SOS header with two versions of the CLR loaded into my process is welcome.

The behavior of loading versions of MSCORDACWKS is as follows:

**0:033>** .cordll -e CLR DLL status: Loaded DLL C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\mscordacwks.dll **0:033>** .cordll -ve -u -lp C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscordacwks.dll CLR DLL status: No load attempts **0:033>** .cordll -e CLR DLL status: No load attempts **0:033>** !threads CLRDLL: Loaded DLL C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\mscordacwks.dll Failed to request ThreadStore 
+6
windbg sos
source share
5 answers

I had a case open on this with MS, and the answer I got is

"this is a problem with the debugger, and now the development team is working on it."

I think I will have to wait until the upcoming windbg releases are fixed or other tools are learned!

Thanks!

0
source share

I had the same problem and I had contact with Microsoft. Using the latest version of windbg that was released during the BUILD conference, I was able to download the version of the .net 2 data access library.

A version of Windbg is included in the driver package for Windows 8 . I was able to load the mscorwks data access library using the following command:

 .cordll -I mscorwks -lp <path to mscorwks dll> 
+1
source share

Today I also have the same problem, all the commands that I could find just do not work :(

Then I tried to load the dump with the old debugger, it works. My version is 6.7.5.0, fortunately, some old versions are available on my machine :)

+1
source share

I am still facing this problem today.

I found the solution works for me (suppose that mscordacwks.dll and sos.dll are stored in the folder "C: \ sos"):

 .cordll -I mscorwks -lp "C:\sos" .loadby sos mscorwks !clrstack 

This solution works for WinDbg of the following versions:

  • 10.0.15063 (from the Windows 10 bundles)
  • 6.2.9200 (from the Windows 8.0 bundles)

It has been tested on Win7 x86 and Win10 x64.

0
source share

All Articles