From: James Drews <drews@engr.wisc.edu>
To: linux-nfs@vger.kernel.org
Subject: NFS Kernel Bug
Date: Thu, 18 Sep 2014 08:02:29 -0500 [thread overview]
Message-ID: <541AD7E5.8020409@engr.wisc.edu> (raw)
[-- Attachment #1: Type: text/plain, Size: 1383 bytes --]
Good morning!
I believe we have found a bug in the NFS kernel area. The "bug" is a
leak of a file handle where the NFS client never tells the server to
close the file. The problem is very similar to one we had reported and
got a fix for previously. We are using that patch, but ran in to another
case where the client sends out an OPEN_DOWNGRADE but never sends a CLOSE.
Attached is a simple c program that we have been able to reproduce the
bug with, along with a packet capture of what we see on the wire.
To reproduce the bug:
-compile the c code
-execute the c code with:
./test ; cat testfile3 > /dev/nul
-now if we try to remove the file we get a file in use error (server is
using mandatory locking)
Things to note:
-if you just run the program without the immediate cat'ing of the file,
the bug does not happen
suggesting a timing issue
-If you alter the program so the code mimics the cat of the file, the
bug does not happen (ie, add an open, read file, close to the code).
-If you run the program as described above, and then run it again
without the "; cat testfile3 > /dev/nul", the kernel squeaks out the
file close to the server when the code does the close.
The attached packet capture is us doing:
./test ; cat testfile3 > /dev/null
rm testfile3
./test
rm testfile3
where we are denied the rm the first time, but not the second.
Thanks
James
[-- Attachment #2: test.c --]
[-- Type: application/softgrid-c, Size: 450 bytes --]
[-- Attachment #3: nfsbug.zip --]
[-- Type: application/x-zip-compressed, Size: 6106 bytes --]
next reply other threads:[~2014-09-18 13:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-18 13:02 James Drews [this message]
2014-09-18 14:31 ` NFS Kernel Bug Trond Myklebust
2014-09-18 16:00 ` Trond Myklebust
2014-09-19 17:15 ` Ken Hahn
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=541AD7E5.8020409@engr.wisc.edu \
--to=drews@engr.wisc.edu \
--cc=linux-nfs@vger.kernel.org \
/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