xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.

Opened 3 years ago

Closed 3 years ago

Last modified 16 months ago

#2399 closed defect (fixed)

stateful sockets (ssl, ssh) cannot be serialized

Reported by: totaamwin32 Owned by: totaamwin32
Priority: critical Milestone: 3.0
Component: server Version: 3.0.x
Keywords: Cc:


Causes problems with the proxy server.


  • keep the socket open on the proxy server side and relay all packets using a queue: problem is that this will use CPU time and make the processes more brittle
  • somehow get the client to re-open the connection? closing the ssl layer and then re-creating it, so that the handshake will be handled by the proxy instance

Change History (4)

comment:1 Changed 3 years ago by totaamwin32

Owner: changed from Antoine Martin to totaamwin32
Status: newassigned

comment:2 Changed 3 years ago by Antoine Martin

Priority: majorcritical

On Linux, this manifested itself as a [Errno 32] Broken pipe exception.

Fixes in:

  • r23698 split the fake glib scheduler into its own module
  • r23700 + r23701 + r23704 + r23706: proxy instance refactoring
  • r23702 split pure proxy instance methods into a separate module (+r23703)
  • r23705 proxy server refactoring
  • r23707 new threaded implementation, used when needed (ssl, wss or ssh socket type) or when XPRA_PROXY_INSTANCE_THREADED=1

Example proxy output:

using threaded mode for ssl client connection
started threaded proxy instance
 for client ssl socket: <-
 and server unix-domain socket:  <- /run/user/1000/xpra/localhost.localdomain-2


  • unit test for the queue scheduler module
  • ensure there are no leaks: timeout connection, threads, etc

comment:3 Changed 3 years ago by Antoine Martin

Resolution: fixed
Status: assignedclosed
Summary: ssl sockets cannot be serializedstateful sockets (ssl, ssh) cannot be serialized


  • r23728 move module
  • r23730 adds unit tests, found:
  • r23729 scheduler bug
  • r23731 fixes, + try harder to ensure we always reap proxy instances
  • r23734 logging tweaks

Will follow up in #2405 with better unit tests.

comment:4 Changed 16 months ago by migration script

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

Note: See TracTickets for help on using tickets.