Have you ever had a system that is running a Windows operating system either freeze or hang for no apparent reason? Has it ever become so low on resources that you can barely navigate through the menus? If you have found yourself in this situation recently, then the option of forcing a system crash from the keyboard just may help you discover and diagnose the underlying source of the problem.
In recent times I had to deal with a few of my Terminal Services servers that were hanging or becoming very unresponsive. And the problem was difficult to investigate because the system was not creating a crash dump since the servers weren’t technically crashing. Once I configured my servers to allow me to force a crash and create a dump file, I was able to begin the journey of resolving the issue. For a quick overview on the different types of dump files please check out this article.
After a few days of waiting for the problem to reoccur I was able to force a crash on one of the servers. It worked just as I had planned. With the help of the software vendor whose product was responsible for the problem at hand, we were able to fix the issue and the servers have been problem free ever since that time.
As you can see from this article, configuring your Windows based system to crash upon typing a hotkey sequence is very easy. There are only two changes that need to be made. They are:
- Enable the Kernel or Complete Memory Dump option in the Startup and Recovery tab under the Advanced tab which can be accessed in the System Properties. Either of these choices will give you the greatest amount of information in the dump file.
- Add and enable one of the following registry keys depending on keyboard type:
A. USB Keyboard -KEY_LOCAL_MACHINE\System\CurrentControlSet\Services\kbdhid\Parameters, create a DWORD (32bit) value named CrashOnCtrlScroll and set the value to 1.
B. PS/2 Keyboard - HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\i8042prt\Parameters, create a DWORD (32bit) value named CrashOnCtrlScroll and set the value to 1.
Once those options are set, reboot the system for the changes to take effect and then wait for the slowness or hang to reoccur. When it does you will be able to hold down the right Control key and press the Scroll Lock key twice to force a crash of the system.
TIP – For this to work, it is best to be physically located at the console of the system on which you are performing this hotkey sequence. Running it from a local, remote or IP KVM may prevent the key sequence from being triggered correctly.
You can use Microsoft’s Debugging Tools for Windows (WinDbg) to analyze the crash dump file. Once you have the debug tool installed you will need to set up the symbols server which you can find instructions on how to set up here. From there open the application and choose to open a Crash Dump.
If you have any questions about this article or need additional help in forcing the system to crash or analyzing the crash dump please leave a comment for me and I will respond as soon as possible.