What's you're favorite Infinite Loop bug?
The best feature of my dual proc machine is the ability to kill off bad processes that attempt to spike the cpu. When a process goes crazy on the dual proc, the machine becomes slightly sluggish. Checking taskman tends to show a process hovering at exactly 50% cpu usage. A single threaded app (or 1 thread in a multi-threaded app) is in an infinite loop. On a single proc machine the bad process can take so much cpu that it simply isn't feasible to identify and kill the process.
This 'feature' works because most applications are single threaded. To seriously hang a dual proc machine you need to have two threads that both contribute to the 'infinite loop'. Even if you have a multi-threaded application, and a bug or two that would cause an infinite loop on two threads, there is still one layer of protection. Multi-threaded applications are hard to write, so most fail to achieve significant parallelism. There is a reasonable chance one thread will end up blocked waiting on the other thread to finish. Herb Sutter thinks this happy accident is something that needs to be fixed. He's probably right ... but I'll miss my favorite feature.
As an undergrad, I made my own 'infinite loop' bug that would still toast my dual proc machine today. I was using an HPUX box that had a gigantic harddrive. It was something like 1 Gig, allowing for lots of virtual memory. I was writing some visualization code for computational chemists. The code would use fork() to run the chemist's FORTRAN code in another process while an XWindows application would grab the stdout. This allowed them to do visualization for things like Monte Carlo simulations, but continue making their code as command line Executables in FORTRAN. Early in development I had this nice bug where the process would fork twice then die. This had the interesting feature of creating an exponential cascade of processes with no easy way to kill it off. It took about 10 minutes for the massive amount of virtual memory to be exhausted and the machine to reboot. I was remotely logged in so I couldn't just hit the big red button. Fortunately the chemist's were not running any of their week-long simulations at the time.
Do you have any stories of infinite loop bugs?