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.

Published 28 July 08 06:00 by Tom
Filed under: , ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# a-foton &raquo; SOS: Commands not working on a mini-dump said on July 28, 2008 6:36 AM:

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

# GProssliner said on July 29, 2008 11:29 AM:

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?

# Tom said on July 29, 2008 11:09 PM:

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.

Leave a Comment

(required) 
(optional)
(required) 

Search

Go

This Blog

Syndication

Page view tracker