Possible NFSv4 locking bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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).
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.

Thanks for your time,

    -- Koshi
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux