Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Download SOS.dll by version number

I got a mini dump that requires SOS.dll 4.0.30319.1008, however the winDBG failed to download the correct dll. The symbol path has already been set to SRV*C:\symcache*http://msdl.microsoft.com/download/symbols

Does anyone know where to download the SOS.dll by providing the version number? I decided to download the dll manually and replace it to the Microsoft.net fold under windows.

like image 730
mind1n Avatar asked Jul 15 '14 17:07

mind1n


People also ask

How do I find SOS DLL?

You can find it in C:\WINDOWS\Microsoft.NET\Framework\v4. 0.30319\sos. dll path. To get SOS automatically downloaded you need to have the Microsoft symbol servers set up in the _NT_SYMBOL_PATH environment variable.

What is Windows SOS?

The SOS Debugging Extension (SOS. dll) helps you debug managed programs in Visual Studio and in the Windows debugger (WinDbg.exe) by providing information about the internal Common Language Runtime (CLR) environment. This tool requires your project to have unmanaged debugging enabled.


2 Answers

Update: I published a blog post on how to open snapshots collected on other machines


Please try to do following steps if you do not have needed SOS & CLR assemblies from target machine:

  • .sympath c:\symbols //[setSymPath]
  • .symfix+ //[perform a try to download needed assemblies. Would take ages for the first time
  • .cordll -ve -u -l // try to load needed assemblies automatically
  • .reload // just-in-case

If it does not work [rare case], a set of steps to be performed:

  1. SOS an CLR assemblies are included into Microsoft updates, so you need to pull the same update that is installed on the target machine ( where memery dump was captured ). Here is a link to repo : http://www.mskbfiles.com/sos.dll.php
  2. Download needed update and unzip it a couple of times [ f.e. you will get 'GDRGDR.cab' and 'QFEGDR.cab' files -> unzip them too ]
  3. The resulting folders would have needed assemblies named like: 'clr_dll_amd64' -> should rename to clr.dll
  4. You will need to find needed ones ( CPU architecture, bitness matters )
  5. You may load it into the Windbg using .load c:\mytempfolder\NDP40-KB2835393-x64\QFEGDR\sos [Only exact assembly match would work]
  6. Upon files are loaded, use .reload command just-in-case

Hope this helps =)

like image 74
Nikolay Mitikov Avatar answered Sep 17 '22 03:09

Nikolay Mitikov


I have not investigated in full detail, but it seems that WinDbg downloads SOS.dll for a .NET dump if you type !analyze -v. Also, DebugDiag seems to load SOS.dll when you do a dump analysis.

If none of the options works, run Mscordacwkscollector on the machine where the dump was created.

I also maintain an archive of debugging DLLs.

like image 37
Thomas Weller Avatar answered Sep 21 '22 03:09

Thomas Weller