I tried to print a doc in word, and word froze. Is there any way for me to see what resource it's waiting for?
I'm using windows XP and word 2007 (though I imagine the answer doesn't depend on the process that froze)
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
This requires a little technical knowledge, but it is possible to analyze hangs with the (free) Windows debugger WinDbg. It requires some work to install, attach to the process, and to get the symbols set up (very important!) but then you can find the cause of the hang with a single WinDbg command (emphasis mine):
analyze -v -hang
This is the one which I hadn’t come across before. Run this after opening a dump from a hung process, and it will determine which thread was responsible for the hang and what it was waiting for. I knew windbg could let you examine handles, show all locks open in each thread, and let you examine them all in detail. But I didn’t realise that with !analyse, windbg can do the hard work for me – examining locks held open by all threads, determining which threads are waiting for which others, and build up an order to work out which was initially responsible for the hang.
Also Advanced Windows Debugging by Mario Hewardt, Daniel Pravat is a very good book to get you started with WinDbg: The first few chapters give a very detailed overview of debuggers, and how to use WinDbg specifically. The rest of the book is filled with detailed debugging case studies, which you don't have to read. I think there is a case study describing how to debug a hang which will be of interest to you, however.
After you find the cause of the hang, you may even be able to unhang it with more advanced debugging techniques^^
You may want to look into Process Explorer. You can see what files/folders processes have a lock on.
As far as I know, there isn't. You could hook up something like Wireshark to see if you could find something in the network traffic to indicate what it's waiting for, but it's quite a bit overkill and hardly likely you'd find anything.
Watch the process explorer videos "The case of the 200x" in which the author shows diagnosing several troubleshooting scenarios including hangs. This is also where the ctrl-scrolllock-scrolllock forced crash can help with diagnosis.