How to Crash Linux
How To Crash Linux
There are many ways to disable an operating system, but usually these leave fairly obvious as to what you did wrong; or the system dies in a somewhat reasonable, graceful manner by printing a panic message and halting or restarting. A true crash is not graceful. It is sudden and abrupt. No error messages are printed. No obvious clues appear in log files. Disks buffers are not flushed. You don't get a kernel oops even get a kernel panic or a restart. The system is just suddenly dead. A system with a hardware watchdog monitor may restart, but software watchdogs will likely be useless.
fill a tmpfs filesystem
- Create a tmpfs filesystem with a size equal to physical memory.
- Begin to fill the tmpfs with data.
- Wait for Linux to lock-up.
A filesystem driver runs at the kernel level so it is able to do whatever it wants. The tmpfs does whatever it wants and it has no safety protection or limits built in. A tmpfs filesystem will let you completely fill memory without complaint. When memory gets low the OOM Killer may start to kill processes, but it can't do anything about a filesystem driver since it is not a process; it's a driver that runs protected in the kernel. Eventually the system does not have enough memory to even die properly. The system does not even panic; it will just freeze, which I find surprising. I would have thought that as the last few kilobytes of RAM are used that something in the memory manager or kernel would see that there isn't enough free RAM to service any process so do something drastic -- a kernel oops wouldn't apply since no process is at fault, so result to a kernel panic. In all my tests Linux kernel version 3.2.0 just locks up.