Matthew Reynolds here. My job is to make Windows sing (figuratively) in large enterprises.
If you have a machine which freezes you may need to generate a memory dump in order to find the cause. If you can generate the memory dump before calling Microsoft support you might speed up your diagnosis.
Use this technique if…
· The machine becomes unresponsive (but doesn’t crash to a blue screen) such that you cannot use other diagnostic tools
· The problem is likely to happen again in the future so you have a chance to configure the machine for next time
If you are thinking to yourself now, “what about live remote kernel debug?”, or “what about subtle differences between binary versions”, or “page file sizes are a many-nuanced topic” you are not wrong—you are just reading the wrong post. Exhaustive documentation exists at https://support.microsoft.com/en-us/kb/969028 and linked friends. These cover many more options, edge cases, virtualization and so on. I am writing this post because I recently found that my customers and I needed a quick “try this first” reference for ordinary PCs and servers ( https://youtu.be/pjvQFtlNQ-M ).
Step 1: Configure the Automatic (or Kernel) memory dump setting and page file
Of the various memory dump styles “Kernel” is often the best balance between size and usefulness.
Some keyboards and KVMs prevent the default Control + Scroll Lock + Scroll Lock sequence from working. Where the heck is Scroll Lock on my tiny tablet keyboard?
Fortunately you can change the magic keys. The CrashOnCtrlScroll article linked above alludes to this but leaves much of the implementation to the reader’s imagination. I typically start with examples that others have figured out like http://random-tutorials.blogspot.com/2012/08/manual-crash-dumps-on-windows.html which looks as follows in my registry. Be careful. Control + D + D as configured here is much more likely to be hit accidentally than Control + Scroll Lock + Scroll Lock
Step 3: Retrieve the file and get it to an expert for analysis
Copy or move the memory dump file (located by default at %SystemRoot%\memory.dmp) as needed. If the original hang was blocking boot or logon you may have to use an alternative boot path such as Safe Mode to get there. In my world the target audience for the memory dump is usually an escalation level expert deep inside Microsoft support: https://support.microsoft.com .
In case you decide to have a go at debugging it using windbg.exe or other tools ( https://support.microsoft.com/en-us/kb/315263 ) keep in mind that the cause of your crash is already known. You triggered it manually. I stress this because many debugging tools or guides (e.g., !analyze) assume that you are trying to learn the cause of the crash and will simply report that the crash was triggered by whichever method you used.
Instead your goal is to use the memory dump to find the cause of the unresponsiveness which began prior to the crash. This is going to involve looking for locks, IRPs, critical sections, hung threads, etc. If only there were a cheat code…