[Twisted-Python] KeyError when an errback is triggered within a conch TCP tunnel
Sorry I have not been able to find a better title, please see the
attached example which may be more descriptive.
Here is what it does:
* set up an SSH connection
* open a TCP forwarding channel through this connection
* do something through the tunnel that will trigger an errback (in the
example, try to do an XMLRPC call with no one listening on the
tunnel's end)
This scenario gives me the following traceback (tested with Twisted
8.1.0 and 8.2.0):
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
File
"/usr/lib/python2.5/site-packages/Twisted-8.2.0-py2.5-linux-i686.egg/twisted/python/log.py",
line 84, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File
"/usr/lib/python2.5/site-packages/Twisted-8.2.0-py2.5-linux-i686.egg/twisted/python/log.py",
line 69, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File
"/usr/lib/python2.5/site-packages/Twisted-8.2.0-py2.5-linux-i686.egg/twisted/python/context.py",
line 59, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File
"/usr/lib/python2.5/site-packages/Twisted-8.2.0-py2.5-linux-i686.egg/twisted/python/context.py",
line 37, in callWithContext
return func(*args,**kw)
File
"/usr/lib/python2.5/site-packages/Twisted-8.2.0-py2.5-linux-i686.egg/twisted/internet/selectreactor.py",
line 156, in _doReadOrWrite
self._disconnectSelectable(selectable, why, method=="doRead")
File
"/usr/lib/python2.5/site-packages/Twisted-8.2.0-py2.5-linux-i686.egg/twisted/internet/posixbase.py",
line 193, in _disconnectSelectable
selectable.connectionLost(f)
File
"/usr/lib/python2.5/site-packages/Twisted-8.2.0-py2.5-linux-i686.egg/twisted/internet/tcp.py",
line 520, in connectionLost
protocol.connectionLost(reason)
File
"/usr/lib/python2.5/site-packages/Twisted-8.2.0-py2.5-linux-i686.egg/twisted/conch/ssh/forwarding.py",
line 129, in connectionLost
self.channel.loseConnection()
File
"/usr/lib/python2.5/site-packages/Twisted-8.2.0-py2.5-linux-i686.egg/twisted/conch/ssh/channel.py",
line 253, in loseConnection
self.conn.sendClose(self)
File
"/usr/lib/python2.5/site-packages/Twisted-8.2.0-py2.5-linux-i686.egg/twisted/conch/ssh/connection.py",
line 491, in sendClose
self.channelsToRemoteChannel[channel]))
exceptions.KeyError:
participants (1)
-
Luper Rouch