lkml.org 
[lkml]   [2004]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [CHECKER] potential NFS deadlock in 2.6.8.1
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?
-
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-03-22 14:06    [W:0.271 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site