sos

WinDbg/SOS: Explanation of !SyncBlk output

Hi! I am looking of a description of the output generated by the !SyncBlk command of SOS. Particularly I found no useful explanation on the column "MonitorHeld". This column shows high values in a series of crash dumps. Example: 0:000> !SyncBlk Index SyncBlock MonitorHeld Recursion Owning Thread Info SyncBlock Owner ...

Mismatch in object size returned by sos.dll and in-memory process size.

Hello, I have used the following sos command to enumerate all instances of a particular type in a running asp application (hosted on windows xp 4 GB machine). .foreach (obj { !dumpheap -type ::my type:: -short ::start of address space:: ::end of address space:: }) { !objsize ${obj} }. This enumerates all objects of the given type in ...

How to break WinDbg in an anonymous method?

Title kinda says it all. The usual SOS command !bpmd doesn't do a lot of good without a name. Some ideas I had: dump every method, then use !bpmd -md when you find the corresponding MethodDesc not practical in real world usage, from what I can tell. Even if I wrote a macro to limit the dump to anonymous types/methods, there's no ob...

how to see my managed objects on the stack?

I use SOS.dll in VisualStudio to debug my C# program. The program is as below. The debug command is !DumpStackObjects. class Program { static void Main() { Int32 result = f(1); } static Int32 f(Int32 i) { Int32 j = i + 1; return j; <===========BreakPoint is here } } After I...

How does the Garbage Collector decide when to kill objects held by WeakReferences?

I have an object, which I believe is held only by a WeakReference. I've traced its reference holders using SOS and SOSEX, and both confirm that this is the case (I'm not an SOS expert, so I could be wrong on this point). The standard explanation of WeakReferences is that the GC ignores them when doing its sweeps. Nonetheless, my object ...

Automate VisualStudio immediate Window

I'm trying to automate the process of opening crash dumps for managed applications and retrieving the stack trace. Windgb works sometimes, but getting it to load the correct version of sos.dll is a nightmare unless the machine processing the dump is practically identical to the machine where the dump occured. Visual Studio, on the othe...

sourceoffsite - winforms components used

just downloaded SourceOffsite trial version and was impressed by the new winforms UI. i am curious which (third-party) components were used for ribbon/docking etc. If you know, info would be appreciated ;) ...

Is it possible to implement a GC.GetAliveInstancesOf<T>() (for use in debugging)?

Hi, I know this was answered before, but I'd like to pose a somewhat different question. Is there any conceivable way to implement GC.GetAliveInstancesOf(), that can be evaluated in Visual Studio Debug Watch window? Sasha Goldstein shows one solution in this article, but it requires every class you want to query inherit from a specific...

How do I effectively use psscor2 with Visual Studio 2008 to remote debug into a running process?

I am able remote debug into a process that is running both native and managed code on a VM from my host machine. Also, on the VM I have been using the psscor2 extension with windbg to analyze the .net heaps. I find my self jumping back and forth between Visual Studio 2008 in my host and WinDbg in the VM while attempting to locate and f...

Silverlight SOS (Son of Strike) documenation

Is there any microsoft or even non-official documentation for SOS for Silverlight. Other than a few web posts I have seen zero documentation for it on MSDN. Even official documentation for the CLR version of SOS seems hard to find, this ancient article mentions a sos.htm file that is included in the windows SDK but it doesn't appear to...

How can I match up a CLR method table entry with a MethodDesc?

Using sos, I can get the method table entry list for a particular class: !DumpMT -MD 1d3c58 PDB symbol for mscorwks.dll not loaded EEClass: 001d195c Module: 001d2f2c Name: Class1.B mdToken: 02000005 BaseSize: 0xc ComponentSize: 0x0 Number of IFaces in IFaceMap: 0 Slots in VTable: 7 -------------------------------------- MethodDesc Table...

"Failed to request ThreadStore" - WinDbg debugging live process

I am debugging the live process (not dump) of PresentationHost.exe. It used to works fine, but suddenly few days ago I get the above error message. !Threads, !pe, virtually all SOS command doesn't work. All I remember is that I installed Visual Studio 2010 and .NET framework 4.0 before I'm getting that error. Is it related? UPDATE: I ...

Any SoSAssist equivalent free tool for debugging

I had used SosAssistin past and it was awesome, now I i tried to download it again but it is no longer available :( any other tool which can visually show memory/threads/callstack? ...

What's the story behind the name of the SOS (Son of Strike) debugger extension?

The title says it all really. What's the significance of the name "Son of Strike"? Does it serve any meaning or does it just sound cool? ...

Get method name form delegate with WinDbg

Hello, I have the following dump of delegate object: Name: MyEventHandler MethodTable: 132648fc EEClass: 1319e2b4 Size: 32(0x20) bytes Fields: MT Field Offset Type VT Attr Value Name 790fd0f0 40000ff 4 System.Object 0 instance 014037a4 _target 7910ebc8 4000100 8 ......

Windbg with SOS, stopping on the correct exception

I have a windows service that is, intermittently, throwing an exception that sometimes kills its SQLConnection, and other times kills the service completely. It is running live on a customer's site. I have planned to use Windbg + SOS on it to get a crash dump, so that I can debug this at my own leisure. On my first attempt, however, th...

Windbg with SOS, How to dump a c# struct

How do I dump a struct using windbg, is there a dumpstruct command similar to dumpobject? Or can dumpobject dump structs aswell? ...

debug wpf by using sos.dll issue

I am using sos.dll to find memory leak in wpf . And I found a wpf object was not released, then I tried to find out why it is not released by using !gcroot it gave me a warming that: Please note that 6c369950 is not a valid object. snippet of the debugging info !dumpheap -type WPFUILib.MenuWindow Statistics: MT Count To...

Value type vs Reference types via WinDbg

I am new to Windbg and trying to understand a few things about value and refernece types .NET. Here is the code that i am using class Program { struct MyStruct { int x; int y; } class MyClass { int x; int y; } static void Main(string[] args) { MyStruct s ; ...

!ClrStack local variables - is it value type or reference type

How can I determine if the local variable is a value type or a reference type? 0:000> !CLRStack -a OS Thread Id: 0xf74 (0) Child-SP RetAddr Call Site 000000000023e9c0 000007fef6b32012 ConsoleApplication2.Program.Main(System.String[]) PARAMETERS: args = 0x00000000028f3c70 LOCALS: 0x000000000023e...