Linux RAID subsystem development
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: Jon Nelson <jnelson-linux-raid@jamponi.net>
Cc: linux-raid@vger.kernel.org
Subject: Re: mdadm --stop goes off and never comes back?
Date: Sat, 22 Dec 2007 22:58:57 +1100	[thread overview]
Message-ID: <18284.64513.783072.915203@notabene.brown> (raw)
In-Reply-To: message from Jon Nelson on Wednesday December 19

On Wednesday December 19, jnelson-linux-raid@jamponi.net wrote:
> On 12/19/07, Jon Nelson <jnelson-linux-raid@jamponi.net> wrote:
> > On 12/19/07, Neil Brown <neilb@suse.de> wrote:
> > > On Tuesday December 18, jnelson-linux-raid@jamponi.net wrote:
> > > >
> > > > I tried to stop the array:
> > > >
> > > > mdadm --stop /dev/md2
> > > >
> > > > and mdadm never came back. It's off in the kernel somewhere. :-(

Looking at your stack traces, you have the "mdadm -S" holding
an md lock and trying to get a sysfs lock as part of tearing down the
array, and 'hald' is trying to read some attribute in
   /sys/block/md....
and is holding the sysfs lock and trying to get the md lock.
A classic AB-BA deadlock.

> 
> NOTE: kernel is stock openSUSE 10.3 kernel, x86_64, 2.6.22.13-0.3-default.
> 

It is fixed in mainline with some substantial changes to sysfs.
I don't imagine they are likely to get back ported to openSUSE, but
you could try logging a bugzilla if you like.

The 'hald' process is interruptible and killing it would release the
deadlock.

I suspect you have to be fairly unlucky to lose the race but it is
obviously quite possible.

I don't think there is anything I can do on the md side to avoid the
bug.

NeilBrown

  reply	other threads:[~2007-12-22 11:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-18 21:11 mdadm --stop goes off and never comes back? Jon Nelson
2007-12-20  1:45 ` Neil Brown
2007-12-20  2:05   ` Jon Nelson
2007-12-20  2:07     ` Jon Nelson
2007-12-22 11:58       ` Neil Brown [this message]
2007-12-22 13:01         ` Jon Nelson

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=18284.64513.783072.915203@notabene.brown \
    --to=neilb@suse.de \
    --cc=jnelson-linux-raid@jamponi.net \
    --cc=linux-raid@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