Bugs in Utils.py and pythonlib/smtplib.py (Mailman 1.1)
Here are a couple of patches to fix file descriptor leaks in Utils.py, and pythonlib/smtplib.py. I looked at the new beta of Mailman, and it didn't seem as if these bugs had been fixed - so probably nobody has hit these but me.
The bugs are seen when sending too much to sendmail and sendmail decides to close up shop for about 15 seconds. Then, fds are leaked, and eventually run_queue crashes and leaves a lock file around (locking problem again).
I'd suggest someone work these patches into the new Mailman code; sorry I can't do it myself. -Dan
-- Dan A. Dickey ddickey@wamnet.com
*** Utils.py.orig Thu Dec 9 08:48:41 1999 --- Utils.py Mon Apr 24 10:31:46 2000
*** 25,30 **** --- 25,31 ----
import sys import os
- import time import string import re from UserDict import UserDict
*** 333,338 **** --- 334,341 ---- if log_hint: l.write(' %s\n' % log_hint) l.flush()
l.close()- time.sleep(1.0)
*** pythonlib/smtplib.py.orig Thu Dec 9 08:48:44 1999 --- pythonlib/smtplib.py Mon Apr 24 10:09:28 2000
*** 213,219 **** if not port: port = SMTP_PORT self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) if self.debuglevel > 0: print 'connect:', (host, port) ! self.sock.connect(host, port) (code,msg)=self.getreply() if self.debuglevel >0 : print "connect:", msg return (code,msg) --- 213,224 ---- if not port: port = SMTP_PORT self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) if self.debuglevel > 0: print 'connect:', (host, port) ! try: ! self.sock.connect(host, port) ! except: ! if self.debuglevel > 0: print 'connect failed, raising sock.error' ! self.close() ! raise socket.error, "connect failed" (code,msg)=self.getreply() if self.debuglevel >0 : print "connect:", msg return (code,msg)
participants (1)
-
Dan A. Dickey