[Mailman-Users] Strange error with Mailman 2.1.9

Mark Sapiro mark at msapiro.net
Mon Dec 1 18:03:43 CET 2008


Richard Hartmann wrote:

>Even more info (should have stated that in the first email):
>
>This is a NFS share. So it might 'just' be a crappy net connection.
>
>Any thoughts about this patch which I plan to apply locally?
>Beware evil GMail linebreaks..
>
>
>--- /usr/lib/mailman/Mailman/Queue/Switchboard.py.orig  2008-12-01
>11:46:31.524425955 +0100
>+++ /usr/lib/mailman/Mailman/Queue/Switchboard.py       2008-12-01
>11:48:39.676765175 +0100
>@@ -134,7 +134,19 @@
>                 fp.write(msgsave)
>                 cPickle.dump(data, fp, protocol)
>                 fp.flush()
>-                os.fsync(fp.fileno())
>+                # os.fsync(fp.fileno())
>+                # Sometimes, the sync to our NFS share fails. This retries
>+                # nine times and then gives up -- RichiH 081201
>+                for trial in xrange(10):
>+                    try:
>+                        os.fsync(fp.fileno())
>+                    except OSError, e:
>+                        if trial == 9 or e.errno != errno.EIO:
>+                            raise
>+                        time.sleep(1)
>+                        continue
>+                    else:
>+                        break
>             finally:
>                 fp.close()
>         finally:


The patch looks OK. Let us know how it works.

-- 
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