From: Philippe Troin <phil@fifi.org>
To: Kenny Simpson <theonetruekenny@yahoo.com>
Cc: linux-kernel@vger.kernel.org, nfs@lists.sourceforge.net
Subject: Re: [NFS client] NFS locks not released on abnormal process termination
Date: 06 Dec 2003 11:50:55 -0800 [thread overview]
Message-ID: <87n0a5sp28.fsf@ceramic.fifi.org> (raw)
In-Reply-To: <20031206044852.26806.qmail@web20021.mail.yahoo.com>
Kenny Simpson <theonetruekenny@yahoo.com> writes:
> I have a up-to-date RH9 (kernel 2.4.20-24.9, nfs utils 1.0.1-3.9) I'm using as
> an NFS client (the server is a NetApp), and I'm trying to use advisory locking
> of a file.
> If the process that locks the file exits normally, the lock is released, and
> everything is fine.
> However, if the process aborts, the lock is left with no clear way to remove
> it. I must remove the file to get rid of the lock.
>
> Details:
> Here is a test case:
> int main()
> {
> int fd = open("file", O_RDWR);
> if (lockf( fd, F_TLOCK, 0 ) < 0)
> .... print error message query owner
> pause();
> close( fd );
> }
>
> If I run this, when it gets to the pause(), I can clearly see in /proc/locks
> the process owning the lock.
> If I then kill -ABRT <pid>, the entry in /proc/locks goes away, but the lock is
> not removed from the server.
> When I run the program a second time, the lock acquire failes, and it says the
> (now defunct) old process still owns the lock. Since I cannot easily make
> another process with the id of the original, I seem to have no way to
> explicitly release the lock.
I've also seen this behavior witht the stock 2.4.22 and 2.4.23
kernels.
See the thread:
http://sourceforge.net/mailarchive/forum.php?thread_id=3213117&forum_id=4930
> I even ran ethereal to watch which NLM requests were being made. No unlock
> request was ever sent, so I don't think this can be a server issue.
>
> Any ideas? Is it supposed to work this way?
No and no.
Phil.
next prev parent reply other threads:[~2003-12-06 19:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-06 4:48 [NFS client] NFS locks not released on abnormal process termination Kenny Simpson
2003-12-06 19:50 ` Philippe Troin [this message]
2003-12-08 3:39 ` Kenny Simpson
2003-12-08 5:16 ` Trond Myklebust
2003-12-08 17:32 ` Philippe Troin
2003-12-08 19:56 ` Trond Myklebust
2003-12-09 8:15 ` Philippe Troin
2003-12-09 8:42 ` Trond Myklebust
2003-12-09 18:46 ` Philippe Troin
2003-12-10 2:42 ` Kenny Simpson
2003-12-15 1:04 ` Kenny Simpson
2003-12-15 1:14 ` Trond Myklebust
2004-01-08 10:47 ` YAMAMOTO Takashi
2004-01-08 16:50 ` trond.myklebust
2004-01-09 2:56 ` [NFS] " YAMAMOTO Takashi
2004-01-09 3:40 ` trond.myklebust
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=87n0a5sp28.fsf@ceramic.fifi.org \
--to=phil@fifi.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nfs@lists.sourceforge.net \
--cc=theonetruekenny@yahoo.com \
/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;
as well as URLs for NNTP newsgroup(s).