All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Dickson <SteveD@redhat.com>
To: M A Young <m.a.young@durham.ac.uk>
Cc: nfs@lists.sourceforge.net
Subject: Re: NFS client fcntl locks going missing on FC6
Date: Sat, 24 Feb 2007 12:19:39 -0500	[thread overview]
Message-ID: <45E073AB.2040005@RedHat.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0702232223170.24593@vega3.dur.ac.uk>

M A Young wrote:
> We have been having problems of files getting mysteriously locked on a
> linux NFS client to a Netapp NFS server (most recently with the
> kernel-2.6.19-1.2911.fc6 package, and ONTAP 7.0.5), and after some
> investigation it seems that the problem is that the linux box is getting a
> lock but not recording it, with the result that the lock is never removed
> from the NetApp server. I reported this in RedHat's bugzilla
> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=229469
> and haven't heard anything from them, but it is possible that it is more
> general than just a RedHat issue.
In the future, when opening bugs like this (bugs against
the kernel) please make sure you added steved@redhat.com
to the cc list. Otherwise the bug will end up in bug
purgatory for a while until gets assigned correctly...

> I have found a way to reproduce the locks being left on the server which
> seems to occur when an attempt to lock a file is cancelled and a second
> attempt to lock the file immediately afterwards succeeds, which results in
> the server locking the file but not the client, and thus the lock never
> being removed from the server.
> My test program to reproduce the bug is attached to the RedHat bug report
> at https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=148693 which can
> be done by running the program twice concurrently from an NFS mount.
> Is this a known bug and is it easy to fix?
Way back when... we had a customer using our 2.4 kernel that was
able to "lose" locks by using some goofy java script...
By lose locks I mean,  the server would grant the lock,
but the lock was never locally recored due to some obscure
failure (like a conflicting locks ) . The failure was never
noted, so an unlock was never sent... thus leaving an lost lock
on the server.

We thought we fixed this by making the client send an unlock when
this obscure failure happen, but his goofy java script was still
able to lose locks but much less infrequently (once every few months)...
The ultimately the fix was using the above kernel patch and having
the script to an unlock() (ignoring the return status) and then
doing the lock... (Can you say hack! :-\ )


Looking at the 2.6.20 kernel, it appears some precautions were
taken for this race since the lock is checked locally for any
conflicts (i.e. do_vfs_lock() is called with fl_flags & FL_ACCESS),
but there still might be an problem since if the second call to
do_vfs_lock() (the one that actually records the lock in the VFS)
fails, a unlock is *not* sent back to the server....
Although  this error condition will be noted with the
following syslog message:
     "nlmclnt_lock: VFS is out of sync with lock manager!"

So are you seeing this type of message in /var/log/messages?

steved.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

  reply	other threads:[~2007-02-24 17:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-23 23:16 NFS client fcntl locks going missing on FC6 M A Young
2007-02-24 17:19 ` Steve Dickson [this message]
2007-02-24 18:06   ` M A Young
2007-02-25  0:32     ` M A Young
2007-03-01  0:51       ` M A Young

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=45E073AB.2040005@RedHat.com \
    --to=steved@redhat.com \
    --cc=m.a.young@durham.ac.uk \
    --cc=nfs@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.