Archiving fails when creating new file

Bug #265359 reported by Angelo Turetta
2
Affects Status Importance Assigned to Milestone
GNU Mailman
Fix Released
Medium
Barry Warsaw

Bug Description

See bug 108837, it says fixed in 2.0b4, but something related to it
happened to me in 2.0b6, freshly installed on a FreeBSD 4.1-STABLE machine
(I mean no upgrade from previous mailman version).

Basically, when the archiver has to create an empty file, it goes on but
then fails while trying to find the LF: if the file il empty, it cannot
seek one char before the end of file. I guess the error checking code that
should protect the seek statement doesn't cover all the cases for FreeBSD.

The net effect is that delivery of messages to subscribers is postponed
until I write a LF to the file.

I can test patches in case you need.

Here is an excerpt of the mailman error log:

Oct 06 20:45:05 2000 (1308) Archive file access failure:
        /usr/local/mailman/archives/private/direttivo.mbox/direttivo.mbox
(0, 'Error')
Oct 06 20:45:05 2000 (1308) Delivery exception: (0, 'Error')
Oct 06 20:45:05 2000 (1308) Traceback (most recent call last):
  File "/usr/local/mailman/Mailman/Handlers/HandlerAPI.py", line
82, in do_pipeline
    func(mlist, msg, msgdata)
  File "/usr/local/mailman/Mailman/Handlers/ToArchive.py", line
47, in process
    mlist.ArchiveMail(msg, msgdata)
  File "/usr/local/mailman/Mailman/Archiver/Archiver.py", line
189, in ArchiveMail
    self.__archive_to_mbox(msg)
  File "/usr/local/mailman/Mailman/Archiver/Archiver.py", line
160, in __archive_to_mbox
    mbox.AppendMessage(post)
  File "/usr/local/mailman/Mailman/Mailbox.py", line 41, in
AppendMessage
    self.fp.seek(-1, 2)
IOError: (0, 'Error')

Hope this helps

[http://sourceforge.net/tracker/index.php?func=detail&aid=217170&group_id=103&atid=100103]

Revision history for this message
Barry Warsaw (barry) wrote :

This has been fixed for 2.0rc1.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.