> Mikko Huhtala (aka Bruce) was almost, but not quite, entirely unlike tea:
>> I am getting floating point exceptions seemingly at random on a
>> Pentium 4 / Linux /OpenMosix 2.4.17 box. Programs terminate with
>> floating point exception when doing any fp arithmetic. This is not
>> limited to any one program or input, but occurs at random, i.e. one in
>> ten identical runs may complete correctly whereas the nine others
>> terminated with the exception at different points on the way.
>> The box is in a cluster and both the software and hardware setup is
>> identical to other nodes that are running without problems. The
>> exceptions happen both when processing files on local disks and on
>> network mounted file systems. It looks like hardware failure to me.
>> Can a failing processor or memory chip manifest as floating point
>> exceptions? The box has had a few unexplained system crashes, too.
> Sounds like memory failure. What does a traceback on the code reveal -
> where is it crashing? If it crashes on a function like tan() that
> requires valid input, and the input variable flipped a few bits due to
> dodgy memory, then it can easily go and produce an exception.
>>Is there some system-wide setting controlling fp exceptions?
> What do you mean? Whether you get them? It is a hardware thing, the
> FPU tries to do something and realises it makes no sense, and so
> "excepts".
fp-exceptions raise a signal that can be caught, as far as I'm aware.
If it is memory failure, download memtest86 - do a search at google. It is
definately worth running anyway - very powerful memory checker, runs of a
floppy (only on x86 processors though, which you have unless you have
something else). Also, try running a silly C program to see (forgive the
pun) what's going on:
/* Silly.c */
#include<stdio.h>
int main() {
int i;
float z;
for(i=0; i<10000; i++) {
z = i / 25;
}
printf("That didn't crash.\nTrying to force a crash.\n");
/* This will cause the program to fail - should not harm system */
z = 0 / 0;
printf("Very strange - didn't crash. Something wrong here.\n");
return 0;
Quote:}
See what that does.