Reading .NET 4.0 dump files in WinDBG
Asked Answered
B

2

1

I'm familiar with the WinDBG paradigm. Been reviewing a lot of dump files using WinDBG x64 version. For the most part dump files were .NET 2.0 applications and psscor2.dll. Current WinDBG version I am using is 6.12.0002.633. Recently, I've been trying to open x64 dump IIS dump files generated from a .NET 4.0 application pool using psscor4.dll. Any command I run returns, "Failed to request information"

  1. I've mscordacwks.dll from c:\Windows\Microsoft.NET\Framework64\v4.0.30319 on the server
  2. Renamed to mscordackwks_AMD64_AMD64_4.0.30319.xxxx.dll. xxxx matches the compiled version in the file
  3. Open WinDBG, open the dump file and add the path to the above DLL to exepath
  4. Run a basic command !eeversion to check all is fine and I get GC Heap not initialized, so GC mode is not determined yet In plan phase of garbage collection
  5. Next I type !threads and get, Failed to request ThreadStore
  6. Next !threadpool and I get, Failed to request ThreadpoolMgr information

I done some basic google search with these error messages and they all point to not having the correct mscordacwks.dll or opening x86 files in WinDBG x64 or x64 files in WinDBG x86. Didn't sound relevant to me

Any help/guidance is much appreciated

Borg answered 31/8, 2013 at 16:27 Comment(2)
What is the exact version of the CLR in the dump? Do SOS commands work?Arteriole
4.0.30319.17929. No SOS commands give the same errorBorg
A
2

The build number 4.0.30319.17929 is a .NET 4.5 build number. PSSCOR4 will not debug 4.5. You need to use a 4.0 SOS and/or SOSEX, which works for all version of .NET 2.0-4.5.

Arteriole answered 2/9, 2013 at 21:3 Comment(4)
Thanks Steve. I think you are right. I finally got sos working by downloading the CLR.dll from the server. Now, I can run SOS commands but psscor4 failsBorg
I have sosex4 and I keep getting failures as well. I love depth of sosex. Do you have it working? Any special steps for .NET 4.5?Borg
Sosex works for .NET 4.5. Ping me offline for help if you're having problems with it.Arteriole
@Borg , you can try this one for 4.5 (worked for me): stevestechspot.com/SOSEXUpdatendashReadyForNET45.aspx (I had to unload Sos.dll in order to work with sosex)Outgroup
O
1

I have found in the past that there are 3 dlls you need to have the correct version of for debugging .Net.

sos.dll mscorwks.dll mscordacwks.dll

here's how I usually go about getting these dll's http://sjbdeveloper.blogspot.com.au/, although it sounds as though you are using a server based application which means you could possibly just grab them from your production box, assuming you have access to it, or a staging box if you don't.

Osteopath answered 2/9, 2013 at 1:56 Comment(1)
Just want to point out, your link is for .NET v2.0 and you only need 2 mscorwks.dll and mscordacwks.dll However, it seems different for v4.0, there is no mscorwks.dll. It is replaced with clr.dll. Also, sos.dll is not mandatory for both versionsBorg

© 2022 - 2024 — McMap. All rights reserved.