I just wonder. I have two processes on two different servers. Those processes write information to the same file and use locking via fcntl for synchronization. What happen if one of processes will be aborted and it owned file lock? How NFS server will be notified that this process died?
Read http://man7.org/linux/man-pages/man2/fcntl.2.html
Record locking and NFS Before Linux 3.12, if an NFSv4 client loses contact with the server for a period of time (defined as more than 90 seconds with no communication), it might lose and regain a lock without ever being aware of the fact. (The period of time after which contact is assumed lost is known as the NFSv4 leasetime. On a Linux NFS server, this can be determined by looking at /proc/fs/nfsd/nfsv4leasetime, which expresses the period in seconds. The default value for this file is 90.) This scenario potentially risks data corruption, since another process might acquire a lock in the intervening period and perform file I/O.
Since Linux 3.12, if an NFSv4 client loses contact with the server,any I/O to the file by a process which "thinks" it holds a lock will fail until that process closes and reopens the file. A kernel parameter, nfs.recover_lost_locks, can be set to 1 to obtain the pre-3.12 behavior, whereby the client will attempt to recover lost locks when contact is reestablished with the server.Because of the attendant risk of data corruption, this parameter defaults to 0 (disabled).
If process terminates then all locks hold by process will be released.
I think this the answer you were expected