Freigeben über


SOS: Commands not working on a mini-dump

Problem

So occasionally I run into people trying to analyze a managed mini-dump and they have problems.  They run a command like !dumpobj and it fails.

Cause

The reason that these commands fail is that the CLR stores all it’s data in virtual memory.  That memory is not written when creating a mini-dump.

Solution

In order to run SOS commands, many CLR data structures need to be traversed. When creating a mini-dump without full memory, special functions are called at dump creation time to bring those structures into the mini-dump, and allow a minimum set of SOS debugging commands to work. At this time, those commands that can provide full or partial output are:

 CLRStack
Threads
Help
PrintException
EEVersion

For a mini-dump created with this minimal set of functionality in mind, you will get an error message when running any other commands. A full memory dump (obtained with ".dump /ma <filename>" in the Windows Debugger) is the best way to debug a managed program at this level.

Comments

  • Anonymous
    July 27, 2008
    PingBack from http://blog.a-foton.ru/2008/07/sos-commands-not-working-on-a-mini-dump/

  • Anonymous
    July 29, 2008
    Hello! How can PrintException work when no Managed Heap is available in the Minidump? Since the Exception instance is located on the managed Heap too?

  • Anonymous
    July 29, 2008
    GProssliner, There was extra data that gets written out that allow these commands to give you some data.  It isn't as full as you would normally see because you are right, the instace is located in the managed heap.