Anyone know how to debug software hangs/freezes?

Coldblackice

[H]ard|Gawd
Joined
Aug 14, 2010
Messages
1,152
Anyone know how to debug/diagnose software hangs/freezes down to the "nitty gritty level" level? I mean like going into something like Process Explorer/Monitor and digging through threads and process trees.
 
Thats exactly where you start...

Fire up procmon, get really good at filtering. But you have to be careful because sometimes you can filter out too much.

Start by filtering to the process and see if it's doing anything while it's hung. Then look at what happened just before it hung. Then take a peek at all processes to see if anything happened just before it hung.

You can also enable debug symbols so you can look at the process stack. Sometimes you can get a clue about what is going on by the function that is being called....

It's almost more of an art than a science!
 
Thats exactly where you start...

Fire up procmon, get really good at filtering. But you have to be careful because sometimes you can filter out too much.

Start by filtering to the process and see if it's doing anything while it's hung. Then look at what happened just before it hung. Then take a peek at all processes to see if anything happened just before it hung.

You can also enable debug symbols so you can look at the process stack. Sometimes you can get a clue about what is going on by the function that is being called....

It's almost more of an art than a science![/QUOTE

Guys, what if we ask the moderator to make this thread sticky? Everyone has some freeze/stall issue sometime.
 
A sitcky would be great.... assuming we get a bunch of responses in here. I'd wait to ask until it had more information...
 
The best way is to have the source code available and have the code compiled in debug mode.

And even then sometimes compiling in debug mode will make the program work fine while compiling in release mode will mess up.

Without the source and having it compiled in debug mode, what you see when trying to figure out what it going wrong is not going to be that fruitful.

At least that has been my experience.

What is it you are wanting to debug?
 
Based on the forum (Operating Systems), I was assuming that we're discussing third party applications. My guess is the source code and debug libraries are unavailable.
 
The best way is to have the source code available and have the code compiled in debug mode.

And even then sometimes compiling in debug mode will make the program work fine while compiling in release mode will mess up.

Without the source and having it compiled in debug mode, what you see when trying to figure out what it going wrong is not going to be that fruitful.

At least that has been my experience.

What is it you are wanting to debug?

I'm guessing the OP is not trying to debug a utility or application. He is trying to find the exe or the dll that is causing the freeze. OP, am I guessing right?
 
Back
Top