Random crashes during compilation

Hi,

I installed FreeBSD 7.0 a few days ago, but when I try to do something intensive like kernel compilation, I get random crashes -- most often Internal Compiler Error: Segmentation Fault.

Now, this is usually a sign of some sort of hardware problem. The only thing that puzzles me is that my Linux installation on the same box can compile away for hours without a single ICE or anything of that sort. I tried the usual: checking RAM, underclocking CPU, cleaning the dust from the case, twiddling with BIOS settings, unplugging almost everything I don't necessarily need, and checking the disk. None of these helped in any way.

So I'm wondering if this could perhaps be a software error after all -- FreeBSD is the only OS that's having this kind of problems on this hardware. Perhaps it's just some driver misbehaving that could easily be fixed by changing its settings or something.

The box is an AMD Athlon 64 3000+ on M2NPV-MX motherboard with two 512 MB Kingston DDRAM sticks, two PATA HDDs and nVidia GeForce 7300 GT. It's a 32-bit installation so that I can have nVidia graphics drivers even though the CPU is 64-bit.

Anyway, I'd love to hear some suggestions -- are there any known problems with that set of hardware? Any tips on system settings that could help tracking the problem down? I'm really out of ideas what to try with the hardware itself...
 
I have SAME problem - only when compilink kernel. After "make" it crashes 4-5 times (same way),but RANDOMLY (source is ok,it fails every time compiling different files). Only thing that helps - runnung "make" again (not cleaning dir,etc) continues build from that point - so finally it can be completed (i don't know - if this is very BAD way to do such things).
I'm running on old PIII AMD Duron 800MHZ with 384MB SDRAM (to be honest - cpu was overclocked to 921MHz, but when i turned it back - it doesn't help) FreeBSD 7.2.
I tried to run in bash instead of csh - the same. I even tried to set "sysctl kern.maxfiles=65000" (ever thinked about this?) - the same.
is there way to try compile with an other compiler ? Would system run after it ?
And second - why application can run long (uptime = 10hours on my desktop) without any "fault" but compiler fails every 10 minutes ?
it's important for me to complete resolution of this problem.
And again one question - when compiling kernel - i can set cpu tu 686, but i don't know howto enable features like 3dnow,mmx (thereis several lines on console when running make - someting like tish"cc ........ --mno-mmx --mno-3dnow ... --mNO-OTHER_THINGS.... /../XXX.c")
Thanks
 
Oh, I didn't really expect anyone to revive this thread. But I sorted it out already, and can happily compile away for hours on end now.

My problem was -- surprise! -- faulty CPU. More concretely, my L2 cache was bad -- it was ECC checked, so I guess about 90% of the time, the CPU corrected the invalid data from the cache, but the remaining 10% caused these crashes. I got suspicious that my CPU may be faulty when I saw lots of messages like "Machine check events logged" in dmesg on my previous Debian. (I still wonder how it managed to run on a failed CPU for months without problems...) I replaced the CPU and all is working now.

I can't tell you if this is your case too. From what I read CPU failures are rather rare, but if memtest turns up nothing already, I guess it can't hurt to try and diagnose the CPU (and its caches) somehow.
 
Good you've solved it. And thanks for sharing the solution :D


papanyanz said:
And second - why application can run long (uptime = 10hours on my desktop) without any "fault" but compiler fails every 10 minutes ?
This is simply because compiling is a very intensive process that uses a lot of memory, processor power and I/O. Especially when building world or the kernel.

Since it's a rather old computer, check if the temperature is still ok (fans still running and clean? etc). Compiling tends to heat up pretty much everything and this might be the cause of the crashes.
 
I've solved problem too - just to downgrade RAM bus frequency (it was running at maximum speed (but allowed)). And second thing - some errors disappeared after it (like checksum errors when trying to install apps from packages - what is interesting ,that these errors were not RANDOM - for examples gnome-screensaver package ALWAYS caused error - others were working fine...)

Never minded that hardware can do such a STRANGE thing.
I'll be carefull next time.
Thanks to all.
 
Back
Top