xfs
[Top] [All Lists]

Re: panic - Attempting to free lock with active block list

To: Chris Wright <chrisw@xxxxxxxx>
Subject: Re: panic - Attempting to free lock with active block list
From: Trond Myklebust <trond.myklebust@xxxxxxxxxx>
Date: Wed, 05 Jan 2005 22:54:03 +0100
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-xfs@xxxxxxxxxxx, Eirik Thorsnes <eithor@xxxxxxxxx>, smfrench@xxxxxxxxxxxxx, matthew@xxxxxx
In-reply-to: <20050105123207.J469@build.pdx.osdl.net>
References: <20050105195736.GA26989@ii.uib.no> <20050105123207.J469@build.pdx.osdl.net>
Sender: linux-xfs-bounce@xxxxxxxxxxx
on den 05.01.2005 Klokka 12:32 (-0800) skreiv Chris Wright:
> * Jan-Frode Myklebust (Jan-Frode.Myklebust@xxxxxxxxxxx) wrote:
> > We have a couple of mail-servers running first 2.6.9-1.681_FC3smp
> > and was later upgraded to the Fedora test kernel 2.6.10-1.727_FC3smp
> > which I think is pretty plain 2.6.10 + ac2. But they both keep
> > crashing with the message:
> > 
> >        Kernel panic - not syncing: Attempting to free lock with active 
> > block list
> > 
> > Any ideas how to attack this?

Well, the prevailing theory tends to start along the lines of "find out
how to reproduce the problem...". ;-)

Looking at the NFS code, I can attempt a wild guess about what may be
happening: there may be a race when pressing ^C in the middle of a
blocking NFS lock RPC call, and if so, the following patch will fix it.

Try it, and see whether or not it fixes your problem, but if it doesn't,
then I agree with Chris' suggestion of replacing those "panic()" calls
with BUG_ON()s.

Cheers,
  Trond

 file.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.10/fs/nfs/file.c
===================================================================
--- linux-2.6.10.orig/fs/nfs/file.c
+++ linux-2.6.10/fs/nfs/file.c
@@ -374,7 +374,7 @@ static int do_setlk(struct file *filp, i
                 * the process exits.
                 */
                if (status == -EINTR || status == -ERESTARTSYS)
-                       posix_lock_file(filp, fl);
+                       posix_lock_file_wait(filp, fl);
        } else
                status = posix_lock_file_wait(filp, fl);
        unlock_kernel();


-- 
Trond Myklebust <trond.myklebust@xxxxxxxxxx>


<Prev in Thread] Current Thread [Next in Thread>