You just saw "Segmentation fault (core dumped)" or a message like "Unexpected Signal 11 ". Why? Short answer: it's most likely hardware unless you wrote the program or just now installed it on your machine.
If you are trying to install an OS from a CD, it could be that the people who created that OS are idiots, but it's much more likely that bad hardware is involved: bad media, a cheap cd burner, a faulty download, or the hardware you are installing on. It doesn't matter if that hardware has been running Windows flawlessly for years: it *still* may be bad hardware. If you insist that it isn't, and refuse to even contemplate that possibility, you might spend a lot of time chasing solutions that aren't going to help you one bit.
I did an install a few years back for a local company. The install kept failing reading from the CD, but not at the same place. Segmentation errors mostly, but sometimes other complaints. I asked them to switch out the CD reader, but met resistance: nothing wrong with that CD, I was told, we've used it for years. I pointed out that they were paying me $150.00 an hour and that it was my opinion that we needed different hardware, but I could keep foolishly attempting to install if that's what they insisted upon. Reluctantly, they coughed up a new CDROM and (of course) the install worked flawlessly.
If you've transfered a program from some other machine, you may have corrupted the file in the transfer - run sum on that file on both machines and see if they agree. If you used a Windows box to ftp a file, did you remember that most Windows ftp programs are too stupid to set binary mode unless you tell them to?
If you wrote the program, did you write it in C? Congratulations: you've made the first of many pointer errors you will make while learning. If you wrote it in a higher level language like Perl, it's unlikely to be your fault unless you are extraordinarly creative.
Did you get this compiling a Linux kernel? Almost certainly hardware; see the excellent Signal 11 while compiling the kernel page.
Your machine has been running for years and suddenly stuff like this starts happening. It's hardware, and you'll probably have a kernel panic soon enough.
If you are ready to accept that it just might be hardware, the number one most likely area to cause a segmentation fault is memory. Yes, you might have a bad CPU, but CPU's do extremely rigorous self testing and are unlikely to let themselves start with any defect. It can happen, and you could get hit by a meteorite this afternoon too. CPU's are seldom just randomly flaky. Memory, however, is. The "memory test" that happens as the machine boots is roughly similar to walking across a wooden plank to see if its strong enough for the load of bricks you plan to have it carry later. If it cracks under your weight, sure, it wouldn't have worked with the bricks. But it can also carry you just fine and dump the bricks all over the place later. There are better memory tests out there, but given how cheap memory is today, and how valuable your time is, it's often better to just rip the stuff out and replace it. Maybe when you have some spare time you can figure out which chips were good and which were bad, but if the new memory takes the problem away, you just saved yourself a lot of time and trouble.
Heat affects electronics. If cooling the place down 20 degrees or blowing a fan on the motherboard "fixes" the problem, you have a rather obvious hardware problem. Again, probably memory.
The memory isn't always RAM. It can be cache corruption. It can also be bad disk blocks putting garbage into perfectly good memory. Sometimes it can be hellishly difficult to find, so you really have to think about the cost of your time chasing it vs. the cost of tossing this box away and starting over with something else. Sometimes that's worth doing even if you have no intention of actually using the other hardware: it's just a test bed to prove what is or isn't happening.
Got something to add? Send me email.
More Articles by Anthony Lawrence © 2011-03-18 Anthony Lawrence