Collecting Information for Application Hang

Application hangs typically occur in two scenarios.

1) When there is a deadlock

2) When there is an infinite loop.

Where there is infinite recusion involved, the application will most likely crash because the stack will overflow.

So when the hang occurs we would basically generate pdbs just like for crashes and then start the application and run it till the point where the problem occurs. Once the hang occurs, we would need to generate memory dumps at different intervals. After getting a set of dumps, then we would examine it to see if we are stuck at a certain point and that will give us an idea of the problem. So lets say the app hangs and stays there for around 10 mins. Now when we need to get around 4 dumps at intervals of 2 mins. So we would go to the folder where the debgging tools are installed and then run the following command

adplus -hang -pn "App.exe"

The help that is part of the debugging tools has information about the different command line options for adplus.

When we run the above command, we would get a folder "Hang_Mod_Date..Time.." which will have the dump file, but this time, there will be just one dmp file. You would then run the hang command this way for 4 times at regular intervals to get enough data so that we can load them up in the debugger and see where we are stuck.

I guess now I will start talking about using windbg and how to look at the dump files using various commands.


Comments (1)
  1. Mari0000 says:

    keep it coming. I’m a systems engineer trying to learn some of the debugging skills to help troubleshoot problems for our internal apps which include vb6, in c#. I’ve subscribed to your feed via newsgator.

Comments are closed.

Skip to main content