mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Herbert Poetzl <herbert@13thfloor.at>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: linux-kernel@vger.kernel.org
Subject: Re: lock issues
Date: Tue, 12 Oct 2004 16:29:16 +0200	[thread overview]
Message-ID: <20041012142916.GA8513@DUMA.13thfloor.at> (raw)
In-Reply-To: <1097539708.5432.64.camel@lade.trondhjem.org>

On Tue, Oct 12, 2004 at 02:08:28AM +0200, Trond Myklebust wrote:
> På ty , 12/10/2004 klokka 00:57, skreiv Herbert Poetzl:
> > Hi Trond!
> > 
> > experiencing the following panic on a linux-vserver
> > kernel (2.6.9-rc4, no modifications to locking)
> 
> Which filesystem? Is this NFS or CIFS (which both have an f_op->lock()
> routine)?

NFS v3  options should be rw,intr,tcp,nfsvers=3
(not 100% sure)

> > it's the locks_free_lock(file_lock); at the end of 
> > fcntl_setlk64() and I'm asking myself if something
> > like in sys_flock()
> > 
> >         if (list_empty(&lock->fl_link)) {
> >                 locks_free_lock(lock);
> >         }
> > 
> > would help here or just paper over the real issue?
> 
> Actually, the sys_flock() thing looks a lot more iffy to me: why should
> list_empty(lock->fl_link) mean that you are responsible for freeing that
> lock? Couldn't a sibling or child thread have released it from
> underneath you?

btw, once the following messages where observed
right before the panic()

nlmclnt_lock: VFS is out of sync with lock manager!
nlmclnt_lock: VFS is out of sync with lock manager!
nlmclnt_lock: VFS is out of sync with lock manager!

but that was jsut in one case of many ...

> Anyhow, that would indeed be papering over an issue in the posix lock
> case. 

thought so .. but why the check for sys_flock() ?
(disclaimer: don't know the locking code)

> By the time we get to the end of fcntl_setlk64(), the file_lock
> should not be on any lists. If it got added to somebody else's block
> list, it should either have been unblocked when the region was freed, or
> in case of a signal, we remove it from the block list manually. Unlike
> the flock case, file_lock itself never gets added to the active list.

best,
Herbert

> Cheers,
>   Trond

  reply	other threads:[~2004-10-12 14:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-11 22:57 Herbert Poetzl
2004-10-12  0:08 ` Trond Myklebust
2004-10-12 14:29   ` Herbert Poetzl [this message]
2004-10-12 17:58     ` Olivier Poitrey

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=20041012142916.GA8513@DUMA.13thfloor.at \
    --to=herbert@13thfloor.at \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trond.myklebust@fys.uio.no \
    /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®