Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!uwm.edu!linac!mp.cs.niu.edu!ux1.cso.uiuc.edu!talon!krogh From: krogh@talon.ncsa.uiuc.edu (Mike Krogh) Newsgroups: comp.sys.sgi Subject: Re: lockf()/lockd problems Message-ID: <1991Mar19.204110.9999@ux1.cso.uiuc.edu> Date: 19 Mar 91 20:41:10 GMT Article-I.D.: ux1.1991Mar19.204110.9999 References: <1991Mar18.163241.13680@helios.physics.utoronto.ca> Sender: krogh@talon (Mike Krogh) Distribution: na Organization: NCSA Lines: 18 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@ncsa.uiuc.edu