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.
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