xpra icon
Bug tracker and wiki

Opened 2 months ago

Closed 2 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:

Description

Causes problems with the proxy server.

Options:

  • 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 (3)

comment:1 Changed 2 months ago by totaamwin32

Owner: changed from Antoine Martin to totaamwin32
Status: newassigned

comment:2 Changed 2 months 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: 192.168.1.9:14500 <- 192.168.1.9:53892
 and server unix-domain socket:  <- /run/user/1000/xpra/localhost.localdomain-2

TODO:

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

comment:3 Changed 2 months ago by Antoine Martin

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

Updates:

  • 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.

Note: See TracTickets for help on using tickets.