Description:
Sometimes a problem is sufficiently complex or vague in cause that the products internal tracing is not sufficient and we need to capture crash and dump files on the OS level. This is the proper procedure to do that.
Solution:
NOTE: Along with the diagnostics information generated using this document it is very important that DSMInfo is also collected while the logs were set in DETAIL. The tracing for ITCM can be set to DETAIL using the following command:
cftrace -c set -l DETAIL -s 40000 -ln 6
Common items to trace and the tools available for each.
I. Process Crash
The most important diagnostic information for a process crash is dump of the crash.
To collect a dump of a crashing process, various tools/utilities can be used. We recommend using/trying the following tools in the order given below.
1.1 Userdump
Userdump can be used to generate a dump for a crashing process.
For detailed information on obtaining and installing this tool, visit the following link:
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=E089CA41-6A87-40C8-BF69-28AC08570B7E&displaylang=en
Once userdump is installed it can be configured to create a dump for the crashing process using the following steps.
Now userdump is monitoring the process for any exceptions. As soon as an exception is generated a dump file will be created in the directory specified in "Dump File Folder". Send us this dump file.
For detailed information regarding using userdump, visit the following link:
http://support.microsoft.com/kb/241215
There are however, many type of crashes and tools that can be used to collect the relevant info. Here are several more scenarios and tools:
1.2 Dr Watson
Dr. Watson is a legacy tool supplied with WinXP and earlier versions of Windows which can be used to generate dump for crashing processes.
To configure Dr. Watson to create dumps use the following steps.
By default the dump is created in the file:
C:\Documents and Settings\All Users\Application Data\Microsoft\Dr Watson\user.dmp
This can be changed if you want to create the dump in a different folder. Dr Watson will overwrite the dump file if another crash occurs. So it's better if the user.dump file is backed after each crash. Send us the dump file.
For detailed information on using Dr Watson, visit the following link:
http://support.microsoft.com/kb/275481
1.3 DebugDiag
DebugDiag tool can be used to generate memory dumps for process crash.
Use the steps mentioned below to install and configure DebugDiag:
Note: If the process is crashing on x64 (64 bit machine) you still need to use x86 version of debugDiag since the process to be debugged is 32 bit.
1.4 AdPlus
AdPlus is a VB script supplied with "Debugging Tools for Windows". Adplus can be used in crash mode to generate a dump for a crashing process.
To get AdPlus you will have to install "Debugging Tools for Windows" from the following link:
http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx#b
The current release of "Debugging Tools for Windows" is included in the "Windows SDK". To download "Windows SDK" go to the following link:
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=6b6c21d2-2006-4afa-9702-529fa782d63b&displaylang=en
In the installation of "Windows SDK", during the "Installation Options" dialog ensure that you select only "Debugging Tools for Windows" under "Common Utilities".
By default the "Debugging Tools for Windows" will get installed in "C:\Program Files\Debugging Tools for Windows (x86)"
To generate a dump of a crashing process use the following steps:
For detailed information regarding AdPlus, visit the following link:
http://support.microsoft.com/kb/286350/
II. Hung Process
Just like process crash the most important diagnostic information for a process hang is dump of the hanging process.
To collect a dump of a hanging process various tools/utilities can be used. We recommend using/trying the following tools in the order given below.
2.1 Userdump
Userdump can be used to generate a dump for a hanging process.
For detailed information on obtaining and installing this tool, visit the following link:
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=E089CA41-6A87-40C8-BF69-28AC08570B7E&displaylang=en
Once userdump is installed it can be configured to create a dump for the hanging process using the following steps.
For detailed information regarding using userdump, visit the following link:
http://support.microsoft.com/kb/241215
2.2 AdPlus
AdPlus is a VB script supplied with "Debugging Tools for Windows". Adplus can be used in hang mode to generate a dump for a hanging process.
To get AdPlus you will have to install "Debugging Tools for Windows" from the following link:
http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx#b
The current release of "Debugging Tools for Windows" is included in the "Windows SDK". To download "Windows SDK" go to the following link:
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=6b6c21d2-2006-4afa-9702-529fa782d63b&displaylang=en
In the installation of "Windows SDK", during the "Installation Options" dialog ensure that you select only "Debugging Tools for Windows" under "Common Utilities".
By default the "Debugging Tools for Windows" will get installed in "C:\Program Files\Debugging Tools for Windows (x86)"
To generate a dump of a hanging process, use the following steps:
For detailed information regarding AdPlus, visit the following link:
http://support.microsoft.com/kb/286350/
III. Process Memory Leak
To debug memory leak problems we can use various tools/utilities. We recommend using/trying the following tools in the order given below.
Before we use various tools/utilities to debug memory leak problems, it is required to set/enable the "Create user mode stack trace database" flag for the leaking process. This flag can be set using the following command:
gflags -i <processName> +ust
For example if you want to set the flag for cmEngine.exe then the command would be:
gflags -i cmEngine.exe +ust
Once this flag is set it is necessary to restart the process so that the new setting is picked up by the operating system.
3.1 DebugDiag
DebugDiag tool can be used to generate memory dumps for memory and handle leak.
Use the steps mentioned below to install and configure DebugDiag:
Note: If the process is leaking on x64 (64 bit machines) you still need to use x86 version of debugDiag since the process to be debugged is 32 bit.
3.2 UMDH
UMDH (User Mode Dump Heap) is supplied with "Debugging Tools for Windows". UMDH can be used to find out memory leaks in a process.
To get UMDH you will have to install "Debugging Tools for Windows" from the following link:
http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx#b
The current release of "Debugging Tools for Windows" is included in the "Windows SDK". To download "Windows SDK" goes to the following link:
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=6b6c21d2-2006-4afa-9702-529fa782d63b&displaylang=en
In the installation of "Windows SDK", during the "Installation Options" dialog ensure that you select only "Debugging Tools for Windows" under "Common Utilities".
By default the "Debugging Tools for Windows" will get installed in "C:\Program Files\Debugging Tools for Windows (x86)"
Use the steps mentioned below to generate data using UMDH:
For detailed information regarding UMDH, visit the following link:
http://msdn.microsoft.com/en-us/library/ff560206(VS.85).aspx
As always, it is best to confirm all details with support before implementing. Many scenarios require customizations to several of these processes and they will not always be completely useful as is.