Freigeben über


Error loading sos.dll

Many times you get this error when you do .load sos

0:080> .load sos

The call to LoadLibrary(sos) failed, Win32 error 0n2
"The system cannot find the file specified."
Please check your debugger configuration and/or network access.
You can solve this by doing  .loadby sos clr, this means you are trying to load sos.dll from the same location you loaded clr.dll from.

This is a different error
 

0:091> .loadby sos clr

Unable to find module 'clr'

The first question I ask myself is whether I am debugging a 32 bit application with 64 bit debugger, if not the I do lm to list all loaded modules

In this case I saw that clr.dll is not loaded, but mscorwks is this is because the application I am debugging is using .net framework 2.0

0:091> lm

start             end                 module name

00000000`1b6d0000 00000000`1b9cf000   System_Data   (deferred)            

00000000`1e230000 00000000`1e279000   System_Transactions   (deferred)            

00000000`714b0000 00000000`71556000   System_Core   (deferred)            

00000000`77610000 00000000`777b9000   ntdll      (private pdb symbols)  d:\symbols\ntdll.pdb\15EB43E23B12409C84E3CC7635BAF5A32\ntdll.pdb

00000642`ffaf0000 00000642`ffb09000   mscorsec   (deferred)            

000007fe`dae40000 000007fe`db68b000   System_Data_ni   (deferred)            

000007fe`e07b0000 000007fe`e0945000   System_DirectoryServices_ni   (deferred)            

000007fe`e0950000 000007fe`e0a5d000   System_EnterpriseServices_ni   (deferred)            

000007fe`e0a60000 000007fe`e0b45000   System_Transactions_ni   (deferred)            

000007fe`eb380000 000007fe`ec25c000   mscorlib_ni   (deferred)            

000007fe`ec260000 000007fe`ecbfc000 mscorwks (deferred)             

...

0:091> .loadby sos mscorwks

That worked!

Unfortunately sometimes is it not that simple, I get this nasty error a lot 

Failed to load data access DLL, 0x80004005 
Verify that

                          1) you have a recent build of the debugger (6.2.14 or newer)  

            2) the file mscordacwks.dll that matches your version of mscorwks.dll is 
                in the version directory 
            3) or, if you are debugging a dump file, verify that the file 
                mscordacwks_<arch>_<arch>_<version>.dll is on your symbol path.  
            4) you are debugging on the same architecture as the dump file.  
                For example, an IA64 dump file must be debugged on an IA64 
                machine.

.cordll -ve -u -l  works most of the time

if that still doesn't work, try following the steps here

Hope that helps!

Comments

  • Anonymous
    June 16, 2013
    Thanks for solution. i have resolved the same problem.