Kris Kennaway wrote:
I am trying to use the python bittorrent tracker with python 2.5 and
FreeBSD 8.0, but I am getting a lot of errors from the kqueue reactor in
twisted.
pointyhat# bittorrent-tracker
track: create_serversocket, port= 80
Traceback (most recent call last):
File "/usr/local/lib/python2.5/site-packages/BitTorrent/track.py",
line 925, in track
r.listen_forever()
File
"/usr/local/lib/python2.5/site-packages/BitTorrent/RawServer_twisted.py",
line 790, in listen_forever
reactor.run(installSignalHandlers=False)
File "/usr/local/lib/python2.5/site-packages/BTL/reactor_magic.py",
line 60, in run_default
return old_run(**kw)
File
"/usr/local/lib/python2.5/site-packages/twisted/internet/posixbase.py",
line 220, in run
self.mainLoop()
--- <exception caught here> ---
File
"/usr/local/lib/python2.5/site-packages/twisted/internet/posixbase.py",
line 231, in mainLoop
self.doIteration(t)
File
"/usr/local/lib/python2.5/site-packages/twisted/internet/kqreactor.py",
line 169, in doKEvent
selectable = selectables[fd]
exceptions.KeyError: 4L
Traceback (most recent call last):
File "/usr/local/lib/python2.5/site-packages/BitTorrent/track.py",
line 925, in track
r.listen_forever()
File
"/usr/local/lib/python2.5/site-packages/BitTorrent/RawServer_twisted.py",
line 790, in listen_forever
reactor.run(installSignalHandlers=False)
File "/usr/local/lib/python2.5/site-packages/BTL/reactor_magic.py",
line 60, in run_default
return old_run(**kw)
File
"/usr/local/lib/python2.5/site-packages/twisted/internet/posixbase.py",
line 220, in run
self.mainLoop()
--- <exception caught here> ---
File
"/usr/local/lib/python2.5/site-packages/twisted/internet/posixbase.py",
line 231, in mainLoop
self.doIteration(t)
File
"/usr/local/lib/python2.5/site-packages/twisted/internet/kqreactor.py",
line 169, in doKEvent
selectable = selectables[fd]
exceptions.KeyError: 4L
Traceback (most recent call last):
File
"/usr/local/lib/python2.5/site-packages/BitTorrent/RawServer_twisted.py",
line 790, in listen_forever
reactor.run(installSignalHandlers=False)
File "/usr/local/lib/python2.5/site-packages/BTL/reactor_magic.py",
line 60, in run_default
return old_run(**kw)
File
"/usr/local/lib/python2.5/site-packages/twisted/internet/posixbase.py",
line 220, in run
self.mainLoop()
File
"/usr/local/lib/python2.5/site-packages/twisted/internet/posixbase.py",
line 228, in mainLoop
self.runUntilCurrent()
--- <exception caught here> ---
File
"/usr/local/lib/python2.5/site-packages/twisted/internet/base.py", line
561, in runUntilCurrent
call.func(*call.args, **call.kw)
File
"/usr/local/lib/python2.5/site-packages/BitTorrent/HTTPHandler.py", line
175, in connection_flushed
connection.shutdown(1)
File
"/usr/local/lib/python2.5/site-packages/BitTorrent/RawServer_twisted.py",
line 238, in shutdown
self.transport.loseWriteConnection()
File
"/usr/local/lib/python2.5/site-packages/twisted/internet/abstract.py",
line 244, in loseWriteConnection
self.startWriting()
File
"/usr/local/lib/python2.5/site-packages/twisted/internet/abstract.py",
line 273, in startWriting
self.reactor.addWriter(self)
File
"/usr/local/lib/python2.5/site-packages/twisted/internet/kqreactor.py",
line 107, in addWriter
self._updateRegistration(fd, EVFILT_WRITE, EV_ADD)
File
"/usr/local/lib/python2.5/site-packages/twisted/internet/kqreactor.py",
line 89, in _updateRegistration
kq.kevent([kevent(*args)], 0, 0)
exceptions.OSError: [Errno 9] Bad file descriptor
[...]
i.e. just it is getting exceptions when doing nothing at all, so it
seems to be completely broken.
Have you tried this, or do you know where to begin looking at what might
be wrong?
I know very little about Twisted, but I seem to recall that it offers
a range of different reactors; if you can find where in bittorrent its
deciding to use the kqreactor, you might be able to force it to use an
alternate reactor (such as one based on select() or poll()).
If you can change the reactor and get something that works, that would
suggest some issue with the kqreactor, at least on 8.x.
--
-------------------------------------------------------------------------
Andrew I MacIntyre "These thoughts are mine alone..."
E-mail: [EMAIL PROTECTED] (pref) | Snail: PO Box 370
[EMAIL PROTECTED] (alt) | Belconnen ACT 2616
Web: http://www.andymac.org/ | Australia
_______________________________________________
freebsd-python@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-python
To unsubscribe, send any mail to "[EMAIL PROTECTED]"