Welcome to MSDN Blogs Sign in | Join | Help

Exchange Pre-Deployment Testing

(for sharing hands-on experience in trustworthy computing)
Use AdPlus to troubleshoot process hangs

AdPlus hang-mode creates a directory in the current directory (or the output directory if specified) called Hang_Mode__Date_mm-dd-yyyy__Time_HH-MM-SS. This means you can continue to run the same ADPlus command line repeatedly without losing your data.

1. Install Debugging Tools for Windows 64-bit Version --- Download 6.6.7.6 , or
    Install Debugging Tools for Windows 32-bit Version --- Download 6.6.7.6

2. (optional) Execute this adplus crash-mode command to take a full memory dump of process exits (normal and abnormal exits):

     D:\Debuggers\adplus.vbs -c CRASH-BreakOnExitProcess.xml -pn JetstressWin.exe

3. Execute this adplus hang-mode command to take a full memory dump of process hangs:

    D:\Debuggers\adplus.vbs -hang -pn JetstressWin.exe , or
    D:\Debuggers\adplus.vbs -c Hang-Dump.xml -pn JetstressWin.exe

NOTE: I assume that you have Debugging Tools installed at D:\Debuggers.

The Hang-Dump.xml has custom actions to log unmanaged handles, managed threads, managed stacks, and managed objects (over 100 bytes in size).

If you wanted to be hard-core, you could use debugger commands to take snaps for 2nd chance managed exception (clr) and process exit (epr) events.

cdb.exe -pn JetstressWin.exe

.logopen /t D:\Debuggers\Jetstress.log 

sxi -c ".loadby sos mscorwks; !eeversion; !threads; !clrstack; !pe; gc" -c2 "!threads; ~*e!clrstack; .dump /ma /u D:\\Debuggers\\Crash.dmp; gn" clr

sxi -c ".loadby sos mscorwks; !eeversion; !handle 0 f; !threads; ~*e!clrstack; !dumpheap -stat -min 100; .dump /ma /u D:\\Debuggers\\ProcessExit.dmp" epr

gc

... ... ... as time goes by ... ... ... ... ... ... ... ... ... ... ... ... ... ...

Press {Ctrl} + {Break} to break the process, and then you could use debugger commands to take snaps for process hangs.

.loadby sos mscorwks; !eeversion; !handle 0 f; !threads; ~*e!clrstack; !dumpheap -stat -min 100; .dump /ma /u D:\\Debuggers\\ProcessHang.dmp; gc

NOTE: I assume that you want to keep .log and .dmp files at D:\Debuggers.

KB 286350: How to use ADPlus to troubleshoot "hangs" and "crashes"

Posted: Tuesday, March 20, 2007 10:12 PM by hmlee
Filed under: ,

Attachment(s): HANG-Dump.xml

Comments

No Comments

Anonymous comments are disabled
Page view tracker