Subject: corrupted mailboxes: is 3.91 to blame?

From: Barry Cornelius <[email-masked]>
Date: Mon, 17 Oct 1994 17:46:35 +0100 (BST)

We switched to Pine 3.91 earlier today.  Since then, I have had two users
complain that their inboxes were corrupted.  Closer inspection reveals
that in each case a number of null characters have been written to the
mailbox at the end of one of the messages.  Has anyone else seen this? 

I am unclear at the moment as to whether this is a Pine 3.91 problem or 
something else.

--
Barry Cornelius                      Telephone: (0191 or +44 191) 374 4717
IT Service, Science Site,    IT Service Office: (0191 or +44 191) 374 2892   
University of Durham,                      Fax: (0191 or +44 191) 374 3741
Durham, DH1 3LE, UK                   E-mail: [email-masked]

---

From: [email-masked] (Gunther Anderson)
Date: Tue, 18 Oct 1994 01:54:20 GMT

Barry Cornelius ([email-masked]) wrote:
: We switched to Pine 3.91 earlier today.  Since then, I have had two users
: complain that their inboxes were corrupted.  Closer inspection reveals
: that in each case a number of null characters have been written to the
: mailbox at the end of one of the messages.  Has anyone else seen this? 

Check to see if your ftruncate() call works.  More to the point, look 
through your system-dependent source code in c-client, and see if 
whatever your system uses as a ftruncate() call (SCO, for instance, uses 
chsize()), and test it.  Although chsize() works here fine, I am aware of 
at least one other SCO site where chsize() does nothing at all.  And 
their symptoms are identical to yours.  You see, the NULL's are stuck to 
the end of your mailbox just in case you need them for extra message 
storage.  After the mailbox has been written back out ftruncate() is 
called to shorten it back up, and cut out the trailing nulls, if any.  
Hence, no ftruncate(), you get NULLs.

Gunther Anderson

---

From: Barry Cornelius <[email-masked]>
Date: Wed, 19 Oct 1994 15:35:36 +0100 (BST)

On Tue, 18 Oct 1994, Terry Gray wrote:
> Pine 3.91 fixes some serious problems with address-book handling in 3.90.
> It also fixes lots of other bugs, but the only mailbox corruption report I 
> recall seeing was the one from Barry C. that started this thread, 
> concerning nulls being appended to the inbox.
> We do not yet understand what is causing that particular problem (or even
> if it is in fact a Pine bug), but we have not had any other reports of 
> extraneous nulls. 
> We *believe* that 3.91 is in all respects better than 3.90 (except for 
> not having corrected all the references to 3.90 in the help text, and 
> having broken the local bug reporting facility.)
> If anyone has any contrary experience, please let us and everyone else
> know so (a) the problems can get fixed, and (b) folks can make informed
> deployment decisions. 

Last Monday, we started to use 3.91, and last Monday two users obtained
corrupted mailboxes (aka inboxes).  However, since then we have had no
problems.  My current view is that this was all a coincidence.

We run Pine 3.91 mainly on SunOS 5.x and HP-UX 9.01 boxes.  As I write,
there are currently 73 IMAP processes (/etc/rimapd) running on the
computer holding mailboxes, and on that computer there are 5744 mailboxes
in /var/spool/mail (but not all of these are accessed using IMAP from
Pine).  We use Berkeley mail format (aka mbox) and some version of
sendmail. 

With all this usage of Pine 3.91, in my view there is currently no
evidence to suggest that the corrupted mailboxes were caused by Pine 3.91. 
I'm sorry if I started a false rumour.  I was panicing a bit at the time!