Xpra: Ticket #2378: paramiko + SIGINT proxycommand errors

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

Host test
  ProxyCommand ssh -v localhost nc 22

This command:

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

And then hitting control-c.


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
  File "/usr/lib64/python2.7/site-packages/xpra/net/bytestreams.py", line 351, in close
  File "/usr/lib/python2.7/site-packages/paramiko/channel.py", line 671, in close
  File "/usr/lib/python2.7/site-packages/paramiko/transport.py", line 1804, in _send_user_message
  File "/usr/lib/python2.7/site-packages/paramiko/transport.py", line 1780, in _send_message
  File "/usr/lib/python2.7/site-packages/paramiko/packet.py", line 431, in send_message
  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 22', 'Broken pipe')
Error in sys.exitfunc:

We should exit more gracefully instead.

Tue, 06 Aug 2019 03:40:52 GMT - Antoine Martin: status changed; resolution set

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.

Sat, 23 Jan 2021 05:49:41 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/2378