lockf()/lockd problems

Mike Krogh krogh at talon.ncsa.uiuc.edu
Wed Mar 20 06:41:10 AEST 1991


There is a bug with lockf() with respect to NFS files.  You can obtain a
lock on such a file, but if the file size equals zero after locking, the
file will appear to contain binary garbage from then on.  Deleting the file
or rebooting the system is the cure.  This occurs on 3.3.2.  If you're
running 3.3.1, then you only need to set the lock for the problem to
occur.  The file size does not need to equal zero.

This can real make reading email a pain if your mail is on a NFS partition.

This was reported to SGI and is bug #10894


As a side note, if you plan on using lockf(), make sure that lockd and statd
are running (see 'man lockd').

Mike Krogh
NCSA
krogh at ncsa.uiuc.edu



More information about the Comp.sys.sgi mailing list