[Mailman-Developers] FYI -- problems with my newinstall...
Dan A. Dickey
ddickey@wamnet.com
Tue, 31 Oct 2000 09:50:25 -0600
This is a multi-part message in MIME format.
--------------3D3D106F4EC8D41A8A1F6716
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Chuq Von Rospach wrote:
> At 3:28 PM -0600 10/30/00, Dan A. Dickey wrote:
> >I'm not sure if this is relevant or not, but I did report some time
> >ago a problem in python's smtplib.py that leaked fd's, and brought
> >about a bug in MailList.py (Mailman 1.1).
> >As far as I'm aware, this bug was not fixed in Mailman's copy of
> >smtplib.py,
> >nor in the new version of Python. It lost file descriptors when
> >sendmail
> >quit accepting connections due to too high of a load.
> > -Dan
>
> and when you run out of fd's, you get an error attempting to connect
> and exit. I'll bet that's it, Dan.
I won't bet on it, but I will go so far as to say it has a possibility.
barry@wooz.org wrote:
> I'm still having trouble reproducing dups. I set SMTPPORT=9999 in
> mm_cfg.py, sent a bunch of messages into the system, and manually ran
> cron/qrunner a bunch of times. They all fail as expected (connection
> refused), and I see the log messages in smtp/post, exactly as I
> expect. The .db files look right -- they all have entries for
> `pipeline' which start with SMTPDirect.py.
>
> I comment out the SMTPPORT, re-run qrunner and all the messages go
> through exactly once.
>
> ;(
>
> Any other ideas? Do you see any other relevant messages in any of the
> other log files?
Running out of fd's is somewhat of a problem. It was a bit tricky
to find - since, once you are out of fds - you can't really open up
a file to drop a log message into it.
Bleah. I was just looking around for my patches so I could attach them,
and I'm sorry for a bit of misinformation - the problem is not in
MailList.py; that was a different change I made to Mailman.
The problem is indeed directly in smtplib.py.
The patch I made to it to fix the fd leak problem is attached.
If this fixes the problem, you win your bet Chuq. :)
-Dan
P.S. - Please keep in mind that this patch was against
pythonlibs/smtplib.py
from Mailman 1.1. I have yet to move up to 2.0 (waiting for it to
become stable).
P.P.S - Yes, this bug and patch needs to get to the Python group.
Sooner the better I'd say.
--
Dan A. Dickey
ddickey@wamnet.com
--------------3D3D106F4EC8D41A8A1F6716
Content-Type: text/plain; charset=us-ascii;
name="smptlib.fdleak.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="smptlib.fdleak.patch"
*** 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)
--------------3D3D106F4EC8D41A8A1F6716--