The Craziest F***ing Bug I've Ever Seen
yehudakatz.com
yehudakatz.com
Good way of looking at it. So the ultimate crazy bug would be an error in the laws of physics? Actually, one better than that would be discovering an error in the laws of math.
And that's why I don't like systems with > 2 layers (J2EE, I'm talking to you).
As long as you don't need to break out the logic analyzer or resort to sifting through a stack of 4" of fanfold assembly printouts you're doing just fine :)
Bugs like that are always grounded in the assumption that lower layers are reliable. Hint: they're not, they contain tons of bugs, the conditions to trigger them get more and more rare the longer a platform has been in production. That means that the 'hardest' bugs are going to be the last and if you find something in a platform that has been operational for a while you can bet your life it's not going to be easy to track down.
Interrupt triggered bugs are usually really hard to find as are subtle timing issues in high speed serial links. If it takes you less than a week to track it down it may be the hardest bug you've ever seen but in the greater scheme of things you're not in real trouble yet.
Very true. Anything that is reproducible is fairly easy to debug. Something that is hard to reproduce is even harder to figure out.
Here's a good scenario, on a good old Apple II: you'd call a subroutine. The processor would put your address on the stack, to know where to return. So when the processor returns, you can peek at the data just below the stack pointer to figure out your own address. Works 99.999999% of the time. Except if an interrupt occured exactly on the return instruction, erasing the old stack data.
With that kind of frequency (interrupts would happen at about 60 Hz on an Apple II), you'd freeze the computer after several minutes. Good luck figuring it out.
That's not a bug. That's a feature.
I've blown up a chip in a switch once by doing some benchmarking using this rig: http://clustercompute.com/ (it cracked in to two pieces right across the middle) but I've yet to see a cpu explode.
Eproms give a nice flash when you put them the wrong way around in their socket though :(
I don't consider a bug to be "crazy" unless the word "volatile" is involved :)
(This is not to put down weird volatile bugs, of course.)
Yuck, MRI (Matz's Ruby Interpreter) uses a global variable for that? (Yes OK, it's actually thread-local, but that's effectively the same thing.) Awful style begets awful bugs. That's what you get for having such a messed up interface.
If we're going to be pedantic, it's a "Ruby Interpreter" or "Ruby implementation", but not "Ruby VM". Ruby implementations can use a VM-based design, but it's certainly not required.
I'd be tempted to ask "why distinguish between vcalls and normal calls?", but in general I don't think it's possible to build a system that is completely non-ugly, and all areas of ugliness have the potential for bugs.
I'm sure the above is a simplification of the actual scenario in MRI, but I bet the same general schematic can be applied, even if the implementation details are a bit more complicated in a real-world interpreter like MRI.
Netgear router -> Linksys range expander -> Netgear switch -> a set of machines.
Problem is that in that set there is a Vista machine that randomly kills the wireless network for some reason. The Linksys connection light turns red and both the router and range expander wireless disappears. Everything has to be powercycled numerous times to get it back up. No other machines (Windows or Linux) do this to the network...
Trying to track down a "problem" across multiple hardware/software vendors is not fun :)
So Im gonna claim the craziest fing bug crown :)
Somehow I'd opened a second editing window for the file, exactly on top of the first window - and the editor was saving with a slightly different name.