lkml.org 
[lkml]   [2005]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectdd hangs with SIGINT
Hi,

With recent linux distributions (using NPTL), I noticed that dd can hang
waiting on a futex when being killed. The problem sould be reproduceable
with the following script :

-------$<-------$<-------$<-------$<-------$<-------$<-------$<--------

#!/bin/sh

echo 'When you only see "dd frozen" in a loop the problem is present'

while : ; do
dd if=/dev/zero of=/dev/null bs=1000 count=200 &> /dev/null
echo -n "."
done &

# Don't leave useless dd processes
CHILD=$!
trap "kill $CHILD; killall dd" EXIT

while : ; do
killall -INT dd &> /dev/null
usleep 10000
PIDOF_DD1=$(pidof dd)
usleep 10000
PIDOF_DD2=$(pidof dd)
if [ -n "$PIDOF_DD1" ] && [ "$PIDOF_DD1" = "$PIDOF_DD2" ]; then
echo "dd frozen"
else
echo -n "+"
fi
done

-------$<-------$<-------$<-------$<-------$<-------$<-------$<--------

I can reproduce it on Fedora Core [1-3] on x86, even with recent kernels
like 2.6.12-rc1-bk3,,but it goes away with LD_ASSUME_KERNEL=2.4. It
seems to exploit a race condition somewhere, so the problem may need
some time (or some load) before triggering.


Hopefully someone can reproduce and look into it.
Kind regards.

--
Guillaume

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-04-06 13:31    [W:0.024 / U:0.792 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site