Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!unmvax!ogccse!schaefer From: schaefer@ogccse.ogc.edu (Barton E. Schaefer) Newsgroups: comp.mail.mush Subject: Re: truncated files? Message-ID: <4326@ogccse.ogc.edu> Date: 22 Aug 89 22:21:50 GMT References: <6744@cs.utexas.edu> Reply-To: schaefer@ogccse.UUCP (Barton E. Schaefer) Organization: Oregon Graduate Center, Beaverton, OR Lines: 27 In article <6744@cs.utexas.edu> fletcher@cs.utexas.edu (Fletcher Mattox) writes: } When mush incorporates newly arrived mail into the temporary } file, I've noticed that it occasionally truncates the new message. } The system mailbox is ok, but the file in $tmpdir is damaged. } } It happens with 6.5.6, though I've seen it as far back as 6.5.1. } This seems to happen only when the system folder gets large, } i.e. 300 messages with 500K data. It's not reproducible. } } Anybody else seen it? This is undoubtedly happening because your MTA is appending new mail onto the end of the mailbox at the same time that mush is reading the mailbox. If mush's read happens to go faster than the MTA's write, mush will see end-of-file before the message is complete. The next version of mush will lock the file whenever possible during loading of new mail to avoid this problem. Unfortunately, the SysV lockf() call only works on files opened for writing, so the precise implementation of this mechanism is still under discussion. There is a preliminary attempt at it in the 6.5.6.13 mushview beta version currently available for ftp from ucbvax. -- Bart Schaefer "And if you believe that, you'll believe anything." -- DangerMouse CSNET / Internet schaefer@cse.ogc.edu UUCP ...{sequent,tektronix,verdix}!ogccse!schaefer