Windows – How to provoke Windows to hang (freeze)


I need to test equipment behaviour in the event that Windows hard hangs/freezes (e.g. frozen screen, no LEDs blinking, no reaction to inputs, including Ctrl+Alt+Del, etc.). In order to have enough experiments in a reasonably short time I need to initiate these hangs either programmatically or otherwise.

I am interested in Windows 10 in particular but any working way for other versions is appreciated.

Every search I've done on this topic not surprisingly brings me to discussions on how to eliminate these situations, not provoke them. So the question may seem odd enough.

I've tried many of the recipes offered in answers and comments. First of all, I was not interested in crashes that bring BSoD (that's why I described a freeze, not a crash).

I must confess that Windows 10 64-bit showed good resistance to many of the ways. It copes with almost any CPU-load method (including fork-bomb, loops, etc.) quite well. Methods that raise immediate errors (most of NotMyFault hang methods) are handled by the OS with reboot or shutdown (which is not what I pursued). The best results were achieved by memory leak methods of NotMyFault β€” real freeze with no chance of reboot.

Finally, I was impressed by amount of documentation by Microsoft that talks about making Windows freeze. Looks like they know this part much better than the opposite (fighting freezes) πŸ˜‰

Best Answer

Maybe this can help: Forcing a System Crash from the Keyboard

With USB keyboards, you must enable the keyboard-initiated crash in the registry. In the registry key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\kbdhid\Parameters, create a value named CrashOnCtrlScroll, and set it equal to a REG_DWORD value of 0x01.

You must restart the system for these settings to take effect.

After this is completed, the keyboard crash can be initiated by using the following hotkey sequence: Hold down the rightmost CTRL key, and press the SCROLL LOCK key twice.

Or you could start a fork bomb: see this SO question

There is also NotMyFault

Notmyfault is a tool that you can use to crash, hang, and cause kernel memory leaks on your Windows system. It’s useful for learning how to identify and diagnose device driver and hardware problems, and you can also use it to generate blue screen dump files on misbehaving systems.