Subject: Re: corrupted mailboxes: is 3.91 to blame?

From: Michael Warren <[email-masked]>
Date: Tue, 18 Oct 94 9:53:35 CDT

>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
I take it Gunther you are talking about me? (:
Yes, I had this problem with Pine3.90. After I read a new peice of mail or
deleted some mail, it would add a bunch of NULLS to the end of my mailbox.
After some research and conversation with Gunther, it was found out that the
'chsize' function did not work on our system. (Still don't know why to this day)
However, I went and wrote my own, and I now have no more corruption of the mail
box.
I did notice another problem, which is more than likely to be the fault of our
system, of Pine3.90 deleting every other message when consecutive messages were
tagged for deletion.  I looked in the code, and the algorithm seemed to work
like this:
    It would search for the first message with a delete flag.
    It would delete this message.
    It would move all following messages down the array, making message
            #6 to be #5 now.
    It then seemed to increase the Index (some int that points to an
                                          array element).
    With this increasing of the index, it would skip the #5 message.
    All I did to fix this problem was to not increase the index integer when
        a message had been deleted.
Anyone else ever experience this problem?
I am using Pine3.90 for SCO.
Anyways Barry, we seem to have some of the same problems.  If you have any
other questions, please feel free to ask me or Gunther.
Michael
[email-masked]
-- 
--------------------------------------------------------------------------------
 | | "NI!"                "Bring us a shrubbery"                            | |
 | |            Alabama                         Michael Warren       "NI!"  | |
 | |          Class of '93                    [email-masked]            | |

---

From: "Paul G. Leo Jr." <[email-masked]>
Date: Tue, 18 Oct 1994 12:15:13 -0600 (MDT)

I think I may have inavertently deleted the reply from the pine team...

would one of the pine team please let me know if there is a problem with 
corrupted mailboxes, or adress books in pine v3.91 -- 

I was under the impression that both of these problems had been fixed in 
version 3.91 -- I'm ready to release v 3.91 to the masses, and just want 
to verify the status of above

thanks

Paul Leo				e-mail	[email-masked]
University of Utah Medical School		[email-masked]
Eccles Institute of Human Genetics	
Building 533 Room 2100			phone	801-585-3653
Salt Lake City, Utah 84106		fax	801-585-3910

favorite quote(s):

"I always have a good day, I don't let nuthin eva bottha me"
	Just Jeeps counter person
	Georgetown, Grand Cayman Island, BWI

---

From: Terry Gray <[email-masked]>
Date: Tue, 18 Oct 1994 15:11:44 -0700 (PDT)

Paul,
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. 

-teg