[Mailman-Users] sendgiest cron job failure

Xueshan Feng sfeng at stanford.edu
Wed Jun 13 20:38:55 CEST 2007


We have 18K mailing lists. The "senddigest" cron job runs at noon daily.
It came to our attention that many lists don't get digests. I put some
debugging code in "senddigest", and I found out that there were two
lists's digests had  TypeError while being processed and 'senddigest"
job just bailed out on the exception. No further lists will be processed
for digest.

Since this happens only to two lists out of 18K lists, I suspect this
might not be a general system configuration error, but I wanted to
confirm that.

The work-around I have now is to have exception handling in "senddigest"
code which skips the bad digest and log the error in mailman's error
log. 

Both the patch and the digest error messages are included below.

Anyone knows if the problem is fixable? 

Thanks,

Xueshan

--- senddigests 2007-06-13 10:48:54.000000000 -0700
+++ senddigests.orig    2007-06-12 10:53:08.000000000 -0700
@@ -38,7 +38,6 @@
 from Mailman import Utils
 from Mailman import MailList
 from Mailman.i18n import _
-from Mailman.Logging.Syslog import syslog
 
 # Work around known problems with some RedHat cron daemons
 import signal
@@ -83,12 +82,9 @@
         mlist = MailList.MailList(listname, lock=0)
         if mlist.digest_send_periodic:
             mlist.Lock()
-           try:
-                try:
-                    mlist.send_digest_now()
-                    mlist.Save()
-               except (ValueError, TypeError), e:
-                    syslog ('error', 'Broken digest: %s: %s', listname,
e)
+            try:
+                mlist.send_digest_now()
+                mlist.Save()
             finally:
                 mlist.Unlock()


The digest error messages are two types:


1. Traceback (most recent call last):
  File "./senddigests", line 95, in ?
    main()
  File "./senddigests", line 87, in main
    mlist.send_digest_now()
  File "/var/lib/mailman/Mailman/Digester.py", line 60, in
send_digest_now
    ToDigest.send_digests(self, mboxfp)
  File "/var/lib/mailman/Mailman/Handlers/ToDigest.py", line 142, in
send_digest
s
    send_i18n_digests(mlist, mboxfp)
  File "/var/lib/mailman/Mailman/Handlers/ToDigest.py", line 324, in
send_i18n_d
igests
    msg = scrubber(mlist, msg)
  File "/var/lib/mailman/Mailman/Handlers/Scrubber.py", line 372, in
process
    t = unicode(t, partcharset, 'replace')
TypeError: coercing to Unicode: need string or buffer, NoneType found

2.Traceback (most recent call last):
  File "./senddigests", line 95, in ?
    main()
  File "./senddigests", line 87, in main
    mlist.send_digest_now()
  File "/var/lib/mailman/Mailman/Digester.py", line 60, in
send_digest_now
    ToDigest.send_digests(self, mboxfp)
  File "/var/lib/mailman/Mailman/Handlers/ToDigest.py", line 142, in
send_digests
    send_i18n_digests(mlist, mboxfp)
  File "/var/lib/mailman/Mailman/Handlers/ToDigest.py", line 324, in
send_i18n_digests
    msg = scrubber(mlist, msg)
  File "/var/lib/mailman/Mailman/Handlers/Scrubber.py", line 306, in
process
    url = save_attachment(mlist, part, dir)
  File "/var/lib/mailman/Mailman/Handlers/Scrubber.py", line 483, in
save_attachment
    if os.path.exists(path):
  File "/usr/lib/python2.3/posixpath.py", line 174, in exists
    st = os.stat(path)
TypeError: stat() argument 1 must be (encoded string without NULL
bytes), not str





More information about the Mailman-Users mailing list