Re: memory corruption under heavy load?

Bernd Schmidt (crux@pool.informatik.rwth-aachen.de)
Thu, 4 Apr 1996 10:34:40 +0200 (MET DST)


On Tue, 2 Apr 1996, Marek Michalkiewicz wrote:

[make -j generates lots of SIGSEGVs]

I tried it, and I found the same problems. At the end of this message, you'll
find a shell script that will demonstrate them. Basically, it starts cpp 100
times (on a copy of /usr/src/linux/kernel/sysctl.c). Copy the script into an
empty directory and run it. The symptoms are segmentation faults and other
strange errors from the compiler. I tested this script in two environments
(same machine, i486DX2-66):

Test 1:
Linux 1.3.15, BIOS settings: all caches on, SRAM timing: "Turbo", DRAM timing:
"Fast".
After a few hours, make exited successfully and all files had been made. No
problems.

Test 2:
Linux 1.3.82, BIOS settings: all caches off, DRAM timing as slow as possible.
After a few minutes, the first processes got fatal signals (mostly signal 11,
but occasionally signal 6 and once signal 7). Some processes complain about
errors in the headers (NUL characters, etc.)

If you look at the BIOS settings, it seems _very_ unlikely that this is caused
by a hardware problem. The machine I tried this on has been running reliably
for two years now, and this script generates about one segmentation fault per
minute. I tried a few "make -j"s on another machine (which has never crashed
without a reason either) and got similar crashes from the compiler. I'm fairly
confident that this is a problem with recent kernels. (It also happens with
1.3.77 for me, I did not try any others).

---- Cut here
#! /bin/sh

cp /usr/src/linux/kernel/sysctl.c sysctl-0.c
cat >Makefile <<\EOF
OBJS=\
EOF
NUM=0
while [ $NUM != 100 ]; do
echo "sysctl-$NUM.i \\" >>Makefile
NEWNUM=`expr $NUM + 1`
ln sysctl-$NUM.c sysctl-$NEWNUM.c
NUM=$NEWNUM
done
cat >>Makefile <<\EOF

.SUFFIXES: .i .c
all: $(OBJS)

clean:
rm sysctl-*.[ci]
rm Makefile

%.i: %.c
gcc -E $< -o $@
EOF
make -j