[spambayes-dev] [ spambayes-Bugs-757131 ] "Bad file descriptor" starting pop3proxy_service

SourceForge.net noreply at sourceforge.net
Thu Jun 19 04:27:24 EDT 2003

Bugs item #757131, was opened at 2003-06-19 10:27
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 

Category: pop3proxy
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Steve Tregidgo (smst)
Assigned to: Nobody/Anonymous (nobody)
Summary: "Bad file descriptor" starting pop3proxy_service

Initial Comment:
(Running SpamBayes alpha2 release under Python 2.2.3
(Win2k) with the additional module pop3proxy_service.py.)

I tried to diagnose a 'hdrtxt' AttributeError (which
has now disappeared, so I have no traceback -- I
remember only that it was raised explicitly by
Message.__getattr__ for a FileMessage instance) while
reviewing messages through the pop3proxy interface. I
stopped the pop3proxy service (using Win2k's "Services"
panel), enabled the verbose option in
bayescustomize.ini and started the service again.

The service silently failed to start; in the Event
Viewer was the following traceback:

The instance's SvcRun() method failed 
line 635, in SvcRun
  File "C:\Program
line 68, in SvcDoRun
  File "C:\Program Files\spambayes-1.0a2\pop3proxy.py",
line 1198, in createWorkers
  File "C:\Program
Files\spambayes-1.0a2\spambayes\Corpus.py", line 264,
in removeExpiredMessages
    for msg in self:
  File "C:\Program
Files\spambayes-1.0a2\spambayes\Corpus.py", line 230,
in __iter__
    yield self[key]
  File "C:\Program
Files\spambayes-1.0a2\spambayes\Corpus.py", line 216,
in __getitem__
  File "C:\Program
Files\spambayes-1.0a2\spambayes\Corpus.py", line 173,
in cacheMessage
  File "C:\Program
Files\spambayes-1.0a2\spambayes\Corpus.py", line 180,
in unCacheMessage
    print 'Flushing %s from corpus cache' % (key) 
exceptions.IOError: [Errno 9] Bad file descriptor

Starting pop3proxy from a command prompt worked fine,
with the print statement being executed properly. I
suspected that the running of pop3proxy as a service was 
causing sys.stdout to be broken somehow, but restarting
through "Services" again, catching the IOError and
raising information about stdout gives the following,
which seems reasonable:
 <open file '<stdout>', mode 'w' at 0x008D7708> 

I can continue to run the service with 'verbose' set to
False of course, but it would be handy to be able to
switch that flag back on in case my 'hdrtxt' error returns.


You can respond by visiting: 

More information about the spambayes-dev mailing list