Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!decwrl!ucbvax!THUMPER.BELLCORE.COM!nsb From: nsb@THUMPER.BELLCORE.COM (Nathaniel Borenstein) Newsgroups: comp.soft-sys.andrew Subject: AMS Loses mail Message-ID: Date: 13 Jul 90 12:09:01 GMT References: <0abH1IUB0KGWALFBpP@holmes.parc.xerox.com> Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The Internet Lines: 33 Given Bill Janssen's belated bug report that he actually lost mail once with AMS back in version 6.XX, I've gone to the code to see how it could happen. It does in fact appear possible that if you're running without AMS delivery and your home directory is full, you could lose mail. The problem is that in ams/libs/ms/cvtold.c, there are a couple of calls to writeall() which DO NOT CHECK THEIR RETURN VALUE!!! (These are at lines 251 and 257 in my version.) The fix is simple and essential, since this is what I'd consider a very major bug. The fix is to make sure that writeall is returning an integer that is the same as its third argument. If it isn't, we should error out with code something like this: if (writeall(...) != ...) { errsave = errno; fclose(fp); close(wfd); if (AMS_StrictStandaloneLocking) rmlock(CurLock, LockFD); AMS_RETURN_ERRCODE(errsave, EIN_WRITE, EVIA_CONVERTINCOMING); } I hope you'll make this fix in an upcoming patch. Thanks. -- Nathaniel PS -- Bill, as far as the other problem is concerned (where several messages were appended together), there are three possibilities. One is that you've got AMS configured wrong -- there are several ways to tell AMS how to find the boundaries between messages in /usr/spool/mail, because there are several known formats for different UNIX variants. Another is that you had a particularly pathological case, for which we'd need to see the messages in question. Another, of course, is that there is an AMS bug. I'd encourage you to send us the appended-together mesages if you still have them, or if this ever happens to you again. -- Nathaniel