xpra icon
Bug tracker and wiki

Opened 4 months ago

Closed 4 months ago

#2378 closed defect (fixed)

paramiko + SIGINT proxycommand errors

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: major Milestone: 3.0
Component: client Version: 2.5.x
Keywords: Cc:

Description

I can hit various ugly stacktraces using this entry in my .ssh/config:

Host test
  ProxyCommand ssh -v localhost nc 127.0.0.1 22

This command:

xpra start ssh://test/ --start=xterm -d ssh

And then hitting control-c.

ie:

2019-08-05 23:53:45,624 SSH EOF on stderr of run-xpra
2019-08-05 23:53:45,625 Connection lost
2019-08-05 23:53:45,627 error closing ssh socket: None <- test:22
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/xpra/net/protocol.py", line 1133, in close
    c.close()
  File "/usr/lib64/python2.7/site-packages/xpra/net/bytestreams.py", line 351, in close
    s.close()
  File "/usr/lib/python2.7/site-packages/paramiko/channel.py", line 671, in close
    self.transport._send_user_message(m)
  File "/usr/lib/python2.7/site-packages/paramiko/transport.py", line 1804, in _send_user_message
    self._send_message(data)
  File "/usr/lib/python2.7/site-packages/paramiko/transport.py", line 1780, in _send_message
    self.packetizer.send_message(data)
  File "/usr/lib/python2.7/site-packages/paramiko/packet.py", line 431, in send_message
    self.write_all(out)
  File "/usr/lib/python2.7/site-packages/paramiko/packet.py", line 336, in write_all
    n = self.__socket.send(out)
  File "/usr/lib/python2.7/site-packages/paramiko/proxy.py", line 75, in send
    raise ProxyCommandFailure(" ".join(self.cmd), e.strerror)
ProxyCommandFailure: ('ssh -v localhost nc 127.0.0.1 22', 'Broken pipe')
Error in sys.exitfunc:

We should exit more gracefully instead.

Change History (1)

comment:1 Changed 4 months ago by Antoine Martin

Resolution: fixed
Status: newclosed

Fixed in r23453, ssh related improvements in r23452 + r23451.

Another approach would be to keep a reference to the ProxyCommand object which has a "closed" attribute, but this wouldn't work for when we exec openssh whereas querying the subprocess directly does.

Note: See TracTickets for help on using tickets.