public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Guillaume Chazarain <guichaz@yahoo.fr>
To: linux-kernel@vger.kernel.org
Subject: dd hangs with SIGINT
Date: Mon, 04 Apr 2005 15:14:02 +0200	[thread overview]
Message-ID: <42513D9A.80001@yahoo.fr> (raw)

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


                 reply	other threads:[~2005-04-04 13:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42513D9A.80001@yahoo.fr \
    --to=guichaz@yahoo.fr \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox