*BSD News Article 4132


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!manuel!munnari.oz.au!uunet!sparky!kent
From: kent@sparky.imd.sterling.com (Kent Landfield)
Subject: Re: lockd on 386BSD
Message-ID: <1992Aug25.214437.12699@sparky.imd.sterling.com>
Organization: Sterling Software
References: <BtFxC8.3r0@chinet.chi.il.us> <1992Aug23.205117.5204@fcom.cc.utah.edu> <BtHnEo.GpE@chinet.chi.il.us>
Date: Tue, 25 Aug 1992 21:44:37 GMT
Lines: 42
X-Md4-Signature: 7fa61a2eec82b99dfd8e79d02889d7e7

In article <BtHnEo.GpE@chinet.chi.il.us> randy@chinet.chi.il.us (Randy Suess) writes:
>In article <1992Aug23.205117.5204@fcom.cc.utah.edu> terry@cs.weber.edu (A Wizard of Earth C) writes:
>>2)	The append failure is not a result of NFS.  It's a result of a rather
>>	loose interpretation of the "a" and "a+" modes in POSIX 1003.1.  You
>>	would be better off fixing the shell, or you're bound to repeat the
>>	performance later with some other box.
>
>	Problem is, it is not just the shell.  I use the archive program,
>	rkive to archive the sources groups.  I used to have the archives
>	directory mounted on my main system.  Now that the archives file
>	system has grown to over 200 megs (os2 is a prolific os!)
>	I mounted it on the BSD system.  Since then, nothing but garbage.
>	rkive appends to log, index and a few other house keeping files.
>	All these files are complete garbage since moving to BSD.
>	I temporarily moved the archive to my Novell 3.11/NFS system, and
>	things are fine.

The problem is not rkive's.  Yeah, right.. You knew I'd say that... :-) But
it isn't.  Archives have been maintained by rkive via NFS in quite a few 
places, on different platforms and have been for years now.  

>> The particular ambiguity I am referring to was discussed here before;
>> in particular, if you open a file in append mode, the file pointer is
>> set to the end of the file.  If you seek to a different offset prior
>> to the EOF point, the seek places the pointer at EOF, not at the requested
>> location.  In combination with the create flag, this can cause full
>> truncation.

Rkive just opens the file a+ (why the '+ is there, I do not know but that is 
another question) and does not move the file pointer. Just an open and a 
fprintf().

This sounds like a real NFS daemon bug...

PS. I'm removing the '+' on the opens since its not needed.  Next release...

			-Kent+
---
Kent Landfield                   INTERNET: kent@IMD.Sterling.COM
Sterling Software, IMD           UUCP:     uunet!sparky!kent
Phone:    (402) 291-8300         FAX:      (402) 291-4362
Please send comp.sources.misc-related mail to kent@uunet.uu.net.