[Mailman-Developers] Uncaught exceptions on corrupt files
(mailman 2.1.4)
Barry Warsaw
barry at python.org
Sun Feb 29 12:07:50 EST 2004
On Thu, 2004-02-26 at 08:09, Huw Lynes wrote:
> Hi Guys,
>
> Due to running out mailman server on dodgy old hardware with a geriatric
> version of XFS we are quite often seeing corrupt .db an .pck files.
> This is Mailman 2.1.4 on Python 2.3.3
> that except statement should include cPickle.UnpicklingError?
Yep, I added that in cvs. Note that the Load() method should already
log the file that couldn't be loaded, which you should see once that
exception is also caught.
Side note: You might want to turn on SYNC_AFTER_WRITE.
> So in HyperDatabase.py the load method of DumbBTree
>
> def load(self):
> try:
> fp = open(self.path)
> try:
> self.dict = marshal.load(fp)
> finally:
> fp.close()
> except IOError, e:
> if e.errno <> errno.ENOENT: raise
> pass
> except EOFError:
> pass
> else:
> self.__sort(dirty=1)
>
> Nothing there to catch ValueError:
>
> I have to say that I don't understand HyperDatabase.py because it doesn't
> appear to do anything with exceptions.
I haven't checked this one in, but you should try adding that exception
clause and see if it fixes your problem. But you're right that
HyperDatabase.py might need other fixes, which I don't have time for
right now.
-Barry
More information about the Mailman-Developers
mailing list