[Mailman-Users] config.pck files

Mark Sapiro mark at msapiro.net
Thu Oct 30 20:52:30 CET 2014

On 10/30/2014 09:03 AM, Christopher Adams wrote:
> Hello all,
> A list that is hosted here reported that the membership list and other
> settings had reverted to previous content.
> I took a look at the files and see this:
> -rw-rw---- 1 mailman mailman 14526 Oct 30 08:00 config.pck
> -rw-rw---- 1 mailman mailman 48950 Sep 29 13:15 config.pck.corrupt
> -rw-rw---- 1 mailman mailman 14526 Oct 30 08:00 config.pck.last
> -rw-rw---- 1 apache  mailman 49499 Sep 29 16:38 config.pck.safety

Where there any config.db.* files? A problem is that between Mailman 2.0
and 2.1 this file changed from a marshal (config.db) to a pickle
(config.pck). The upgrade process migrated the file, but if the
config.db* files were not then manually removed, what can happen is
later (perhaps years later) the config.pck files become somehow
corrupted. Mailman tries the files in the order config.pck,
config.pck.last, config.db and config.db.last, and the first one it can
successfully load is used. This can be a config.db which rolls back the
list to a possibly way earlier state.

> It looks like the config.pck file was corrupt. Just for clarification, what
> are the other config.pck* files ?

Every time Mailman saves a list's state, it makes a file named
config.pck.tmp.<hostname>.<pid> and saves the list's state there and
then removes config.pck.last, renames config.pck to config.pck.last and
finally renames config.pck.tmp.<hostname>.<pid> to config.pck.

So there is always a current config.pck and the immediately prior

When Mailman tries to load a config.pck and has to fall back to a prior
file, it logs that fact in the 'error' log which see, and it renames the
current config.pck to config.pck.corrupt and also copies the recovered
file to config.pck and to config.pck.safety.

> Since teh config.pck.safety looks like it
> is much larger in size, and I ran ./dumpdb to read it and it appears to be
> more current data, I am thinking that I can use it to overwrite the
> config.pck, which apparently was used because the file was corrupt.
> Can someone explain how these files work when the file becomes corrupt?

See above, and see all the error log messages relating to this.

It is unclear exactly what the issue was here. It apparently occurred on
Sept 29. The error log from that time may help understand the sequence.

> Can I just copy the config.pck.safety to config.pck ?

If you can successfully dump it with bin/dumpdb, you can copy it to
config.pck and that should work. To be absolutely safe, you could run
'bin/withlist -l <listname>' to lock the list, then do the copy from
another terminal and then type control-D to exit the withlist session
and unlock the list. Otherwise you run the risk that Mailman or the web
UI is updating the list just as you do the copy.

Also, when you're done and the list works, remove or move aside the
config.db* files if any and the .corrupt and .safety files.

Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the Mailman-Users mailing list