Subject: Memory? Not!
To: None <port-pmax@NetBSD.ORG>
From: Kim G. S. \yhus <kim@iq.pvv.ntnu.no>
List: port-pmax
Date: 04/19/1998 22:46:07
Well, I have now done further testing on my cranky decstation 3100.
The symptoms were: "primes" coredumping after a while, compiler errors,
and other weird behaviour.
The longer the machine is on, the higher probability of those errors.
The lower indoor temperature, the lower probability.
I managed to compile emacs by turning off all heating, and opening
a real window.
I tested harddisc and copying, by copying several megabytes of random
data several times, and comparing. No problem. It worked flawlessly,
even when "primes" and other programs stopped shortly after being
started. So, it is obviously not a SCSI, DMA, or processor copying
problem, nor buffer problem.
Then I made a small program to test memory, 12MB of the 16MB. The program
is supplied below, in case you would like to use it. It fills memory
with pseudorandom data, and reads it all back later to see if it
has changed. Result: No problem, after more than 250 tries.
I have now incrased the memorysize in the memory-test-program to
80MB in order to test the working of the swap systems.
It is going slowly, but so far, there is no errors, and the machine
is operating O.K.
Well, it is temperature dependent, and it is not memory, not disk,
and probably not processor, since the testprogram works O.K., apparently.
Any suggestions? Could it be the math processor? Does "primes" use
floating point arithmetic? I better check the source.
Kim0
/* Memorytester, by Kim OEyhus kim@pvv.org 1998.4 */
#include "stdio.h"
/* 12 MB */
#define SIZE 3000000
int a[SIZE];
main()
{
int n, i, b, c;
printf("Start\n");
c=1;
for(i=0; i<1000; i++)
{
b=c;
for(n=0; n<SIZE; n++)
{
a[n]=b;
b= (b<<1) ^ (b>>31) ^ (b>>27) ^ (b>>5);
}
b=c;
for(n=0; n<SIZE; n++)
{
if(a[n]!=b) { printf("Error! %d/n", n); exit(0); }
b= (b<<1) ^ (b>>31) ^ (b>>27) ^ (b>>5);
}
printf("O.K. Pass:%d\n",i);
c=b;
}
}