2004-07-17 21:24:05

by Marc Eshel

[permalink] [raw]
Subject: NFSv3 blocking locks broken in 2.6.7





Hi,

There appears to be a problem with blocking locks granted by lockd
(observed on 2.6.7 and some previous versions of 2.6). An NFS client
waiting for a blocking lock unlocks the file incorrectly right after being
granted the lock even though the application still holds the lock; thereby
allowing another NFS client or local fcntl locks to be granted. This
problem will not manifest itself while using two processes from the same
NFS client because of the local locking on the client machine.

The problem can be easily reproduced using two different NFS client
machines and issuing the following sequence of locking calls (assume that
/mnt is the NFS mount point on both NFS clients in the example):

Client 1: fcntl(F_SETLK) /mnt/f1 granted and held
Client 2: fcntl(F_SETLKW) /mnt/f1 blocked
Client 1: fcntl(F_UNLC
Client 1: fcntl(F_UNLCK) /mnt/f1 unlocked on Machine 1; granted on Machine
2
Client 2: After a delay, lock granted and held
Client 1: fcntl(F_SETLK) /mnt/f1 granted (should be DENIED)

The problem also occurs when the first process is executing the fcntl locks
locally.

Thanks, Marc.



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs