#952 closed defect (fixed)
proxy server is broken
Reported by: | Antoine Martin | Owned by: | Antoine Martin |
---|---|---|---|
Priority: | blocker | Milestone: | 0.16 |
Component: | server | Version: | 0.15.x |
Keywords: | Cc: |
Description
Not sure when it broke... but it needs work.
It needed updating for the new socket encryption code (see #933) - done in r10351, and also for the new pillow codec location - done in r10353.
Connecting a client via tcp seems to hang, the last messages are:
new_connection((1, <socket._socketobject object at 0x7f81d73b7c90>)) sock=<socket._socketobject object at 0x7f81d4c164b0>, timeout=0.1, sockname=('127.0.0.1', 10001), address=('127.0.0.1', 43991), peername=('127.0.0.1', 43991) socket connection: tcp socket: 127.0.0.1:10001 <- 127.0.0.1:43991 New tcp connection received from 127.0.0.1:43991 socktype=tcp, auth class=<class 'xpra.server.auth.allow_auth.Authenticator'>, encryption=, keyfile= io_thread_loop(write, <bound method Protocol._write of Protocol(tcp socket: 127.0.0.1:10001 <- 127.0.0.1:43991)>) loop starting
Change History (5)
comment:1 Changed 6 years ago by
Status: | new → assigned |
---|
comment:2 Changed 6 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
In do_start_proxy
the proxy server already does this:
#now we can go back to using blocking sockets: self.set_socket_timeout(client_conn, None) client_conn.set_active(True) self.set_socket_timeout(server_conn, None)
But the proxy instance that gets started by this function still hits those EWOULDBLOCK
errors.. because when the proxy server closes its socket wrappers, we call SocketConnection.close
which now sets the socket to non-blocking so that we can exit the protocol read and write loops cleanly...
The code is inherently racy, with no easy way to fix it. I've tried re-ordering the subprocess start sequence and socket closing - and all I managed to do was to get more errors.
So r10373 takes the simple and more reliable approach of doing a more explicit handover using a dedicated message. (+ a very very odd fixup was required in r10374).
Backport not needed as 0.15 was not affected - not entirely sure why either!
comment:4 Changed 5 years ago by
comment:5 Changed 3 months ago by
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/952
Mostly fixed with: