From: "J. Bruce Fields" <bfields@fieldses.org>
To: Rick Koshi <nfs-bug-report@more-right-rudder.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: Possible NFSv4 locking bug
Date: Tue, 1 Mar 2011 10:53:08 -0500 [thread overview]
Message-ID: <20110301155308.GB20599@fieldses.org> (raw)
In-Reply-To: <201102281527.p1SFRNst010559@hope.more-right-rudder.com>
On Mon, Feb 28, 2011 at 10:27:23AM -0500, Rick Koshi wrote:
>
> Hi all, I hope this is the right place for this.
>
> I'm using NFSv4, server and client both running 2.6.36.
>
> I've found that when I lock an NFS-mounted file on a client, the server
> reserves an open file descriptor (as seen in /proc/sys/fs/file-nr).
So it looks like that's the total number of allocated struct file's
across the system?
> The server never releases this descriptor, even if the client process
> explictly releases the lock or exits.
>
> In my case, I noticed this because I have a monitoring process which
> runs every 5 seconds and runs 'rrdtool' to log some status to a file
> on an NFS-mounted filesystem. This allocated 720 files per hour, and
> eventually caused my server to run out of file descriptors and become
> unusable. I experimented with a test program, and found that it's the
> fcntl64(3, F_SETLK, {type=F_WRLCK, ...}) system call that triggers
> the behavior, and that unlocking the file explictly doesn't help.
>
> Stopping the NFS service (including the lockd) does not release the
> open files. Only rebooting resets the state.
>
> I'm no kernel expert. Perhaps you can tell me if this is a necessary
> side effect of some part of the NFS implementation. But to me, it looks
> like a bug.
Looks like I can reproduce something similar. Yes, looks like a bug to
me.
Is there any earlier kernel where you know this problem *didn't* occur?
--b.
next prev parent reply other threads:[~2011-03-01 15:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-28 15:27 Possible NFSv4 locking bug Rick Koshi
2011-03-01 15:53 ` J. Bruce Fields [this message]
2011-03-01 22:31 ` Rick Koshi
2011-03-02 19:15 ` J. Bruce Fields
2011-03-03 6:20 ` J. Bruce Fields
2011-03-04 14:16 ` Rick Koshi
-- strict thread matches above, loose matches on Subject: below --
2011-03-06 17:34 Ivo Přikryl
2011-03-06 23:59 Ivo Přikryl
2011-03-07 18:21 ` J. Bruce Fields
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=20110301155308.GB20599@fieldses.org \
--to=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
--cc=nfs-bug-report@more-right-rudder.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).