[Twisted-Python] Bad file descriptor traceback when deamonnizing kqueue reactorwith twistd
Werner Thie
wthie at thiengineering.ch
Fri Feb 6 04:02:16 MST 2009
Hi
When I run the following command (as root) on FreeBSD all is well with
twistd -rpoll -o ftp
I get a running ftp server process on port 2121.
Everything is also up and running (no daemonizing) after
twistd -rkqueue -no ftp
Not so with (daemonized)
twistd -rkqueue -o ftp
The process dies with the attached traceback in twisted.log
Shall I file a ticket for this?
Thanks, Werner
2009-02-06 11:45:01+0100 [-] Log opened.
2009-02-06 11:45:01+0100 [-] twistd 8.2.0 (/usr/local/bin/python 2.5.2)
starting up.
2009-02-06 11:45:01+0100 [-] reactor class:
twisted.internet.kqreactor.KQueueReactor.
2009-02-06 11:45:01+0100 [-] twisted.protocols.ftp.FTPFactory starting
on 2121
2009-02-06 11:45:01+0100 [-] Starting factory
<twisted.protocols.ftp.FTPFactory instance at 0x803d7ff38>
2009-02-06 11:45:01+0100 [-] Traceback (most recent call last):
2009-02-06 11:45:01+0100 [-] File "/usr/local/bin/twistd", line 21, in
<module>
2009-02-06 11:45:01+0100 [-] run()
2009-02-06 11:45:01+0100 [-] File
"/usr/local/lib/python2.5/site-packages/twisted/scripts/twistd.py", line
27, in run
2009-02-06 11:45:01+0100 [-] app.run(runApp, ServerOptions)
2009-02-06 11:45:01+0100 [-] File
"/usr/local/lib/python2.5/site-packages/twisted/application/app.py",
line 694, in run
2009-02-06 11:45:01+0100 [-] runApp(config)
2009-02-06 11:45:01+0100 [-] File
"/usr/local/lib/python2.5/site-packages/twisted/scripts/twistd.py", line
23, in runApp
2009-02-06 11:45:01+0100 [-] _SomeApplicationRunner(config).run()
2009-02-06 11:45:01+0100 [-] File
"/usr/local/lib/python2.5/site-packages/twisted/application/app.py",
line 423, in run
2009-02-06 11:45:01+0100 [-] self.postApplication()
2009-02-06 11:45:01+0100 [-] File
"/usr/local/lib/python2.5/site-packages/twisted/scripts/_twistd_unix.py",
line 206, in postApplication
2009-02-06 11:45:01+0100 [-] self.startApplication(self.application)
2009-02-06 11:45:01+0100 [-] File
"/usr/local/lib/python2.5/site-packages/twisted/scripts/_twistd_unix.py",
line 311, in startApplication
2009-02-06 11:45:01+0100 [-]
service.IService(application).privilegedStartService()
2009-02-06 11:45:01+0100 [-] File
"/usr/local/lib/python2.5/site-packages/twisted/application/service.py",
line 273, in privilegedStartService
2009-02-06 11:45:01+0100 [-] service.privilegedStartService()
2009-02-06 11:45:01+0100 [-] File
"/usr/local/lib/python2.5/site-packages/twisted/application/internet.py",
line 85, in privilegedStartService
2009-02-06 11:45:01+0100 [-] self._port = self._getPort()
2009-02-06 11:45:01+0100 [-] File
"/usr/local/lib/python2.5/site-packages/twisted/application/internet.py",
line 116, in _getPort
2009-02-06 11:45:01+0100 [-] *self.args, **self.kwargs)
2009-02-06 11:45:01+0100 [-] File
"/usr/local/lib/python2.5/site-packages/twisted/internet/posixbase.py",
line 356, in listenTCP
2009-02-06 11:45:01+0100 [-] p.startListening()
2009-02-06 11:45:01+0100 [-] File
"/usr/local/lib/python2.5/site-packages/twisted/internet/tcp.py", line
875, in startListening
2009-02-06 11:45:01+0100 [-] self.startReading()
2009-02-06 11:45:01+0100 [-] File
"/usr/local/lib/python2.5/site-packages/twisted/internet/abstract.py",
line 262, in startReading
2009-02-06 11:45:01+0100 [-] self.reactor.addReader(self)
2009-02-06 11:45:01+0100 [-] File
"/usr/local/lib/python2.5/site-packages/twisted/internet/kqreactor.py",
line 125, in addReader
2009-02-06 11:45:01+0100 [-] self._updateRegistration(fd,
EVFILT_READ, EV_ADD)
2009-02-06 11:45:01+0100 [-] File
"/usr/local/lib/python2.5/site-packages/twisted/internet/kqreactor.py",
line 116, in _updateRegistration
2009-02-06 11:45:01+0100 [-] self._kq.kevent([kevent(*args)], 0, 0)
2009-02-06 11:45:01+0100 [-] OSError: [Errno 9] Bad file descriptor
More information about the Twisted-Python
mailing list