[Mailman-Developers] What to do with a corrupt config.db?

Barry A. Warsaw barry@zope.com
Wed, 3 Oct 2001 11:27:03 -0400

    JCL> I suspect that not only did the new Python version not like
    JCL> your old Mailman install, it also didn't like your old Python
    JCL> version's config.db streamed objects, and that this is the
    JCL> source of the problem.  Simple non backward compatibility.
    JCL> Bad, but understandable.  Barry may be able to comment on
    JCL> this further (I haven't followed Python in detail for years
    JCL> and I gave up on Red Hat entirely even longer ago).

I don't remember Aaron saying what version of Python he upgraded from,
and what version he upgraded to, but I don't /think/ that should
matter.  I'm assuming he was using Python 1.5.2 (anything earlier
isn't compatible with Mailman 2.0) and that he upgraded to some later

The config.db file is a marshalled Python dictionary...

[Aside for non-Pythonistas: a dictionary is a mapping between keys and
values.  Keys can be any immutable type and values can be any Python
object.  In Mailman's case keys are always strings and values are
almost always primitive data structures like lists, tuples, strings,
and numbers.

"Marshal" is a fairly low level Python protocol for serializing and
de-serializing Python objects, implemented in the marshal module.  It
doesn't handle objects well -- for that use pickle or cPickle.
marshal is platform independent, but not guaranteed to be backwards
compatible with earlier versions of Python.  However, I'm not aware of
any incompatibilities between Python 1.5.2's marshal format and later
Python's format (although I'm offline at the moment and can't double

I doubt that either the upgrade to Python or to Mailman caused your
corruption.  config.db should be compatible with both upgrades and
Mailman should convert the config.db to the latest file version
automatically.  In any event, if Mailman cannot load your config.db,
it will try to load config.db.last and only rotate them if everything
was successful.  The fact that your config.db.last file is corrupt
indicates to me a problem wit the file system or OS.

Like any valuable resource, I recommend backing up your Mailman data
files regularly. ;)

Musing: it might make sense to change config.db over to a Python
pickle to guarantee compatibility with future Python versions.  As
mentioned, I don't think there are known breakages, but there may be
in the future...