• Stars
    star
    220
  • Rank 174,833 (Top 4 %)
  • Language
    C#
  • License
    MIT License
  • Created almost 9 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Write minidumps of .NET processes with full memory, only CLR heaps, or no memory at all

Minidumper

Minidumper is a command-line tool that can capture dump files of .NET processes in three modes: minimal, which is enough just for basic triage; heap, which includes managed heap information and other data required to diagnose more intricate .NET issues; and full, which creates a complete dump file.

What makes Minidumper interesting is the heap mode. For large applications, especially with a lot of modules or when unmanaged memory and code are involved, dumps generated by the heap mode can be 5x or 10x smaller than full memory dumps, but will still allow complete investigation of many .NET issues by tools like Visual Studio and WinDbg (SOS).

Head over to the releases section to download precompiled binaries if that's your thing.

DumpWriter

Also included is a stand-alone library (DumpWriter) that can be added to any project to capture dumps of arbitrary processes. The DumpWriter project also contains the full interop signatures for the Win32 MiniDumpWriteDump API and all associated data structures, including callback input and output structures.

NOTES

  • To create dumps of 32-bit processes, make sure to use the 32-bit version of the application -- and vice versa for 64-bit.
  • MiniDumper has gone through very minimal testing. Although it is unlikely that it will cause any damage to the target process (if dump generation fails, MiniDumper exits and the target continues running), but YMMV.
  • The --async option will not necessarily speed up dump generation if you are using a fast disk.

Usage

The command line options resemble those from procdump (not all features are yet implemented) so if you are familiar with that tool you should find yourself easily in minidumper.

  -m              Required. Create a dump file, second paramer:
    -mm
                  minidump enough to diagnose crashes and display call
                  stacks.
    -mh dump file with the CLR heap, but without
                  module code or unmanaged memory contents
    -ma complete
                  dump file with the full memory address space

  --async         Write dump chunks to disk asynchronously. Reduces process
                  suspension time at the expense of higher memory usage.

  -e              Write a dump when the process encounters an unhandled
                  exception. Include the 1 to create dump on first chance
                  exceptions, include the 2 to create dump on second chance
                  exceptions.

  -l              Display the debug logging of the process + diagnostics info
                  from the minidumper.

  --maxmem        Memory commit threshold in MB at which to create a dump.

  --minmem        Trigger when memory commit drops below specified MB value.

  -f              Filter on the content of exceptions and debug logging.
                  Wildcards (*) are supported.

  -x              Launch the specified image with optional arguments.

  -n              (Default: 1) Number of dumps to write before exiting.

  -t              Write a dump when the process terminates.

  -c              Start the process in a new console window.

  --help          Display this help screen.

  --version       Display version information.

  value pos. 0    Required. PID or process name

  value pos. 0    Arguments for the process to start

Articles about minidumper

More Repositories

1

linux-tracing-workshop

Examples and hands-on labs for Linux tracing tools workshops
HTML
1,225
star
2

windbg-extensions

Various extensions for WinDbg
C
163
star
3

etrace

Command-line tool for ETW tracing on files and real-time events
C#
144
star
4

msos

Command-line environment a-la WinDbg for executing SOS commands without having SOS available.
C#
95
star
5

shmemq-blog

Shared memory queue benchmarks and tracing for blog
C
68
star
6

template-metaprogramming-day

Materials for the C++ Template Metaprogramming one-day workshop
C++
61
star
7

LiveStacks

Collect, aggregate, and display live stack traces for ETW events, including CPU sampling, of native and .NET processes.
C#
52
star
8

simd-workshop

Exercises and sample code for a C# SIMD (vectorization) workshop
C#
34
star
9

spark-workshop

Labs and data files for a full-day Spark workshop
Shell
24
star
10

Memory

Test program for allocating various kinds of memory
C++
23
star
11

dntrace

Trace .NET Core runtime events and summarize them
Python
22
star
12

jobrun

Run a process in a job and control its resource quotas
C++
21
star
13

marshalfx

Extensions for the Visual Studio C++/CLI marshaling framework
C++
17
star
14

AdvancedDotNetDebugging

Slides and demos for my Advanced .NET Debugging with WinDbg and SOS talk.
11
star
15

rentahome

Rent a Home demo application for Android, iOS, Windows Phone 8, and Windows 8. Used as a demo in Windows Azure Mobile Services presentations.
Objective-C
10
star
16

wams-android

Windows Azure Mobile Services unofficial Android SDK
Java
9
star
17

libstapsdt-jni

Java wrapper for libstapsdt: enables JVM applications to create USDT probes dynamically
C++
8
star
18

production-diagnostics-day

Materials and hands-on labs for a production diagnostics workshop
C#
5
star
19

cool-cpp-things

C++
4
star
20

docker-aci-workshop

Docker and Azure Container Instances workshop
HTML
3
star
21

pinvoke-stack-bug

Demo code for a P/Invoke bug caused by structure packing in output parameters overwriting an unrelated stack variable
C#
2
star
22

sosloader

Automatically loads SOS based on information present in the dump file
C#
2
star
23

ETLFlameGraph

Generate flame graphs from Event Tracing for Windows (ETW) stack trace recordings
C#
2
star
24

swift-simple-weather

Simple weather iOS app in Swift that demonstrates unit tests and UI tests with SBTUITestTunnel
Swift
2
star
25

r-workshop

R workshop with tutorial and data exploration exercises
HTML
2
star
26

offset2source

A tool that converts module (and optional method) instruction offsets back to the .cpp source file and line number.
C++
1
star
27

playground

Sasha's Git Playground
JavaScript
1
star
28

wbext

Example WinDbg extension written in C#
C#
1
star
29

dotfiles

My dotfiles (Vim, bash, screen, etc.)
Vim Script
1
star
30

PostPCDemos

Demos from PostPC HUJI course
Java
1
star
31

invtsc

Print the CPU clock cycle counter as reported by rdtsc on Intel processors, and report invariant TSC availability
C
1
star