Skip to contentSkip to conversation

Q: backport of the free_pgtables tlb fixes to 2.4

DISCUSSION Roland Fehrenbacher 1 participant 1 message May 31, 2002

lore
Share & tools
lore
#0 lore raw

Hi all,

we actually also ran into this bug on a dual xeon (2GHz Prestonia) with Hyperthreading enabled. Without Hyperthreading, it was hard to reproduce the problem. The following script (requires bash >= 2.0.5) provokes the problem in a very short time. With the patch from Intel, the problem is gone (patched into 2.4.18), no side effects discovered so far.

Thanks to Hugh Dickins <[email protected]> for pointing out the patch to us.

Cheers,

Roland

Here is the script:
-----------------------
#!/bin/sh

# Small script to provoke a SIGSEV on SMP machines with kernel problem

# requires bash > 2.0.5. The script fails e.g. on dual xeon systems without
# Intel patch (Message title: Illegal instruction failures fixes for 2.4.18 in # kernel mailing list, 22.5.2002).
# Script simply executes a couple of mktemp loops in the background, and tries
# to read the generated file back.
# 

# Author: Roland Fehrenbacher, [email protected]
base_out=/tmp/test-sigsev
maxprocs=5

myname=basename $0
pids=""
files=""

trap 'killall $myname; rm -f $files ${base_out}??????;' 0 1 2 3 15

for (( num=1; num <= $maxprocs; num++ )); do
while true; do

    file=`mktemp ${base_out}XXXXXX` || { echo mktemp failed; break; }
    cat $file || { echo open $file failed; break; }
    rm -f $file

done > ${base_out}-${num}.out 2>&1 &
pids="$pids $!"
files="$files ${base_out}-${num}.out"
done

printf "PIDS running = $pids\n--\n"
printf "No further output should appear if no bug is present. Run script for\n" printf "a couple of hours to be sure everything is ok. Ctrl-C to stop.\n--\n"

i=1
while true; do
echo $i: ok >> ${base_out}-${num}.out
for pid in $pids; do

    ps -p $pid > /dev/null 2>&1 || \
      { echo "count = $i: Pid $pid died" >> ${base_out}-${num}.out; \
	pids=`echo $pids | sed -e s/$pid//g`; }

done
sleep 10
((i++))
done &

files="$files ${base_out}-${num}.out"

sleep 1
tail -f $files | grep "count ="