mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Dawson Engler <engler@coverity.dreamhost.com>
Cc: linux-kernel@vger.kernel.org, developers@coverity.com
Subject: Re: [CHECKER] potential NFS deadlock in 2.6.8.1
Date: Wed, 08 Sep 2004 13:08:13 +1000	[thread overview]
Message-ID: <413E779D.4050608@yahoo.com.au> (raw)
In-Reply-To: <Pine.LNX.4.58.0409071949070.28006@coverity.dreamhost.com>

Dawson Engler wrote:
> Hi All,
> 
> below is a possible deadlock in the linux-2.6.8.1 NFS found by a static
> deadlock checker I'm writing.  Let me know if it looks valid and/or
> whether the output is too cryptic.
> 
> Thanks,
> Dawson
> 
> ------------------------------------------------------------------
> 
> ERROR:DEADLOCK: 2 thread cycle:
>      lock_kernel  <<===>>  client_sema
> 

Hi Dawson, your tool looks nice. I don't think the output is too
cryptic.

However, I think these deadlocks may be incorrect because
lock_kernel is not a normal lock. It gets dropped when the
thread blocks, so I *think* it is basically invisible to any
sort of blocking lock when it comes to deadlock cycles.

So if your threads interleave like this:
1			2
lock_kernel();
			down(semaphore);
			lock_kernel();
down(semaphore);

Then thread 2 will spin on the lock_kernel lock (bkl) until
thread 1 hits down(semaphore) and goes to sleep, releasing
the bkl. Thread 2 takes the bkl and proceeds.

I think?

  reply	other threads:[~2004-09-08  3:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-08  2:49 Dawson Engler
2004-09-08  3:08 ` Nick Piggin [this message]
2004-09-08  3:29 ` Greg Banks

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=413E779D.4050608@yahoo.com.au \
    --to=nickpiggin@yahoo.com.au \
    --cc=developers@coverity.com \
    --cc=engler@coverity.dreamhost.com \
    --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

all inboxes | Powered by JetHome®