Skip to content

Collecting crash snapshot via ProcDump

Nikolay Mitikov edited this page Aug 2, 2017 · 3 revisions

Agenda

.NET Application crashes randomly - need to figure out why.

Symptoms

Unhandled exception popup:

site_crash_message

Hard restarts (process didn't receive a restart notice from hosting environment) are reported in Sitecore Logs:

hard_restart

Action plan

Setup automatic snapshot collection

ProcDump is a tool to collect full memory snapshot once unhandled exception occurs in the application process.

All it needs is:

  • To be launched with administrator privileges
  • To know which process to monitor:

correct_appid

arrange_procdump

-e param specifies an unhandled exception triggers capturing

-ma param specifies full memory dump is requested instead of mini

9460 is the process ID to monitor. We can also specify process name.

Once all set up, the monitoring is active:

procdump_active

Wait till memory dump is collected

The snapshot would be collected to the same folder from which ProcDump had been executed:

capture_on_unhandled

Open the snapshot and locate the code that had thrown an exception

WinDBG notifies you about an exception inside:

This dump file has an exception of interest stored in it.

The stored exception information can be accessed via .ecxr.

You'll need to load .NET Framework files from target machine to execute !DumpStack command.

It will print the code that has thrown the exception:

analyze_crash

Clone this wiki locally