Operating System - HP-UX
1833832 Members
2260 Online
110063 Solutions
New Discussion

fcntl system call hangs when using F_SETLK with NFS file

 
SOLVED
Go to solution
Jan Zalman
Advisor

fcntl system call hangs when using F_SETLK with NFS file

Hi, this is the problem:
Program that runs the system call fcntl with F_SETLK flag will hang if the file being locked is on a NFS mount. It works fine if the file is on a local F/S. Tusc shows [sleeping] on this system call.

I found exactly same question appeared
year ago, http://forums1.itrc.hp.com/service/forums/questionanswer.do?admit=716493758+1071163790076+28353475&threadId=109430

Is there any solution now?
Thanks,
Jan
Time and loyalty cannot be bought.
4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor

Re: fcntl system call hangs when using F_SETLK with NFS file

Since you don't bother to identify your OS, it's difficult to answer. On 11.00, for example, PHNE_29210 addresses some hangs of lockd. I would make sure that lockd gets launched with -l to initiate logging so that more troubleshooting can be done. Man lockd for details.
If it ain't broke, I can fix that.
Jan Zalman
Advisor

Re: fcntl system call hangs when using F_SETLK with NFS file

Sorry, I just forgott. It runs on hp-ux 11.11, 64 bit wide.
Time and loyalty cannot be bought.
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: fcntl system call hangs when using F_SETLK with NFS file

In that case the patch is PHNE_29211. Although mandatory locking is not supposed to be implemented on NFS files, I would also check to make certain that the setgid bit is not set on the actual file on the remote host -- that might lead to unanticipated behavior.
If it ain't broke, I can fix that.
Jan Zalman
Advisor

Re: fcntl system call hangs when using F_SETLK with NFS file

Thanks for advice, I'll test it.
Time and loyalty cannot be bought.