179
59
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.
Feedback: 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) ;-)
Comments are not for extended discussion; this conversation has been moved to chat.
– DavidPostill – 2017-11-04T16:38:35.6233There is a calculation you could do using calculator, which freezes the core on the CPU until it's completed it. On a quad core machine you'd do it four times obviously. But I can't for the life of me remember the maths equation that causes it. – mickburkejnr – 2017-11-06T16:15:25.403
6@mickburkejnr It's factorial of 100000. Switch to "Scientific View" type 100000 and press "n!". This worked well on old Windows versions. Nowadays you'll get a warning that this calculation may take a long time and you can cancel it. – duenni – 2017-11-07T07:08:19.590
@duenni Mine will refuse to calculate it and yells 'overflow' instead. – None – 2017-11-07T14:01:54.560
@mickburkejnr I did this lots of times with WinXP calc, and it never froze my system. If you machine froze because of it, the CPU must have been overheating and shutting down to prevent thermal damage. – Ruslan – 2017-11-07T15:03:01.173
26Just start using it. – samazi – 2017-11-08T05:57:50.453
I would totally need an answer to the opposite question. – IllidanS4 wants Monica back – 2017-11-08T15:57:12.513
The most common way I've had my computer freeze on me was to write a python script that (accidentally) uses unbounded memory. Running such a script from IDLE has never failed to freeze my computer. – Justin – 2017-11-08T19:57:20.503
Perhaps https://arstechnica.com/information-technology/2017/05/in-a-throwback-to-the-90s-ntfs-bug-lets-anyone-hang-or-crash-windows-7-8-1/ ?
– jamesdlin – 2017-11-10T00:19:02.6676Installing upgrades always worked for me. – Daniel R Hicks – 2017-11-10T03:29:31.387