Questions tagged [sos]

SOS is a debugger extension that allows a developer to inspect the managed state of a .NET Core and desktop runtime process. SOS can be loaded by WinDbg/cdb debuggers on Windows and lldb on Linux and macOS.

SOS (Son of Strike) is a debugger extension that allows a developer to inspect the managed state of a .NET Core and desktop runtime process. SOS can be loaded by WinDbg/cdb debuggers on Windows and lldb on Linux and macOS.

Useful links:

344 questions
5
votes
4 answers

Windbg: SOS.dll: !gcroot: DOMAIN(xxx):HANDLE(Pinned):Does it really mean object is pinned?

The documentation on the SOS.dll Windbg extension seems sparse. After issuing a !gcroot
, I am getting something containing the following: DOMAIN(XXX):HANDLE(Pinned):XXX:Root:XXX(System.Object[])-> Does "HANDLE(Pinned)" really mean there…
Mike Murphy
5
votes
2 answers

Inconsistent behavior from ADPlus / CDB - No Runnable Debuggees Error in 'g'

I've set up ADPlus / cdb as the default Just-In-Time debugger on my machine. When any process has an unhandled exception or crashes for any other reason, I want ADPlus to generate a crash dump for me. I'm using an ADPlus config file to set the…
mrranstrom
  • 228
  • 2
  • 10
5
votes
1 answer

Please explain !SyncBlk the windbg command

Firstly, is there a command for getting help and parameters for each sos command in windbg? Secondly, I'd like to understand !syncblk output Index SyncBlock MonitorHeld Recursion Owning Thread Info SyncBlock Owner 201 05b9493c 979 …
bsobaid
  • 955
  • 1
  • 16
  • 36
5
votes
1 answer

F# Debugging. CLR

I want to have a bit more of a look at the resulting ASM (F#->IL->ASM) that is generated for certain functions, purely out of curiosity & learning. Answer in my mind is to use SOS.dll, but I have run into a bit of a hurdle... Let us start with the…
user1158550
4
votes
2 answers

Automating WinDBG or otherwise extracting information from Dump Files?

Let's say I have a memory dump of a process. I want to run a report on it, so essentially I want to open WinDBG, load SOS and run a script that runs some commands, parses the output and then runs some more commands based on that. Apart from hackish…
Michael Stum
  • 177,530
  • 117
  • 400
  • 535
4
votes
3 answers

WinDbg: Copy of SOS.dll x86 4.0.30319.237

I am using WinDbg to look into a process dump. The dump has been taken on an x86 server with .NET 4 SP1 (4.0.30319.237). I'm attempting to debug on my x64 machine using the x86 version of WinDbg, but I get the following issue. 0:000> !EEVersion The…
glendon
  • 163
  • 1
  • 2
  • 8
4
votes
2 answers

How to see managed exception details in WinDBG?

VS2005 C# Compiler crashes during our team's nightly build process. I attach to it with WinDBG, load SOS extensions, print the callstack, but cannot see exception info. I tried !PrintException, as follows: 0:000> !PrintException There is…
GregC
  • 7,737
  • 2
  • 53
  • 67
4
votes
1 answer

Using WinDbg to analyze .NET dump

I am using windbg to perform an analysis on a dump. Following are the commands that I have ran .loadby sos mscorwks - to load the sos dll ~* e !clrstack - to look at all the threads ~18s - changed the context to the thread I want to…
RRR
  • 575
  • 1
  • 11
  • 25
4
votes
2 answers

windbg.exe: Failed to load data access DLL, 0x80004005

I'm trying to debug a 32 bit process dump from a process that ran on an x64 machine. I'm running an x86 version of windbg on my x64 laptop. I've followed the recommendations here, but I'm still getting this: 0:000> .cordll -ve -u -l CLR DLL status:…
friism
  • 19,068
  • 5
  • 80
  • 116
4
votes
1 answer

How to tell if its a managed memory leak or native memory leak?

My .NET process that interops with native dlls is throwing an OutOfMemory Exception. Following is out put of !address -summary and --eeheap-gc coammands. Does this mean if its a managed leak or native leak? 0:000> !address -summary …
Silverlight Student
  • 3,968
  • 10
  • 37
  • 53
4
votes
1 answer

windbg cant load sos clr

I'm not sure that windbg is the right tool, but that's what I'm trying now my asp.net app seems to have a memory leak, it keeps on growing by about 3 MB almost every time a page loads (then it goes back down...) I want to read the entire process…
Yisroel M. Olewski
  • 1,560
  • 3
  • 25
  • 41
4
votes
1 answer

Post-mortem .NET debugging with SOS.dll

I am working on a mixed-mode app (C++/CLI, C++, some C#) and when it crashes in the field a memory dump gets created. I usually get these dumps from the customer and try to figure out what went wrong. The question is - how to handle post-mortem…
Filip Frącz
  • 5,881
  • 11
  • 45
  • 67
4
votes
1 answer

memory area used by unmanaged componet for allocations/deallocations

Let's say a .net managed application interfacts with an unmanaged component via InterOP. If I have to debug a memory issue; where exactly unmanaged component allocates memory? Is it the same heap that is used by GC (which I doubt) or is it some…
Silverlight Student
  • 3,968
  • 10
  • 37
  • 53
4
votes
1 answer

How do I list the values of an enum from a memory dump using SOS and Windbg?

I have a mini dump that I have attached windbg to. The mini dump is from a .NET 4.6.1 ASP.NET site running on IIS. I would like to get the definition of my enum but whenever I get the MethodTable of the Class I am just getting the following. 0:000>…
Max Young
  • 1,522
  • 1
  • 16
  • 42
4
votes
1 answer

who hold reference to these objects

I see that dumpheap -stat command is showing 5 instance of my object. When I run dumpheap -MT , it lists all those 5 instances. In theory there should be only 2 instances. Is there any windbg/sos command to trace who hold the reference to these…
palm snow
  • 2,392
  • 4
  • 29
  • 49