[Mailman-Users] Cron <mailman at acm> /usr/bin/python /home/mailman/cron/gate_news (fwd)

Harald Meland Harald.Meland at usit.uio.no
Mon Feb 15 17:36:19 CET 1999

[John Rizzo]

> Hey guys.. this error occured on my system the other day.. I didn't get
> the actual error from the page but here is what I got anyway in hopes that
> it will help make mailman more stable.

I don't believe anyone else has answered this, and I really don't know
enough about Python internals to fully understand what's going on.
However, the traceback:

> Traceback (innermost last):
>   File "/home/mailman/cron/gate_news", line 119, in ?
>     main()
>   File "/home/mailman/cron/gate_news", line 58, in main
>     mlist = MailList.MailList(name, lock=0)
>   File "/home/mailman/Mailman/MailList.py", line 59, in __init__
>     self.Load()
>   File "/home/mailman/Mailman/MailList.py", line 710, in Load
>     raise mm_cfg.MMBadListError, 'Failed to unmarshal config info'
> AttributeError: MMBadListError

originates from this piece of code in $prefix/Mailman/MailList.py:

	    file = open(os.path.join(self._full_path, 'config.db'), 'r')
	except IOError:
	    raise mm_cfg.MMBadListError, 'Failed to access config info'
	    dict = marshal.load(file)
	except (EOFError, ValueError, TypeError):
	    raise mm_cfg.MMBadListError, 'Failed to unmarshal config info'

The first try-except construct (which opens the file for reading)
works OK.  The second one bombs out as marshal.load() doesn't
understand the file it was given (i.e. the list config for some list
has been corrupted).

Whenever the list config (in $prefix/lists/LIST_NAME/config.db) is
updated, the previous version is saved to .../config.db.last.
Recovering from your problem should therefore be as easy as

  cp $prefix/lists/LIST_NAME/config.db{.last,}

[ From reading the documentation for the "marshal" module, I don't
  really understand why Mailman uses the seemingly (mildly) inferior
  "marshal" module for persistant objects, when e.g. "pickle" and
  "shelve" are readily available.  OTOH, it could be me reading too
  much into the wording of the documentation... ]

There is one other thing I don't quite understand -- I can't find any
"MMBadListError" attribute of the mm_cfg module, but there is one in
the Mailman.Errors module.

Is the correct fix for that to have mm_cfg (or Defaults) import
Errors, or should the "raise" statements be changed to

	    raise Errors.MMBadListError, 'Error message'


More information about the Mailman-Users mailing list