Xpra: Ticket #1474: server hangs with two html5 clients connecting concurrently

Reproduction: Run Xpra server with no sharing and with --exit-with-client=yes and connect to it with two (in rapid succession) unmodified HTML5 clients. You'll get something like this:

2017-03-27 12:59:50,686 Handshake complete; enabling connection
2017-03-27 12:59:50,805 HTML5 Linux client version 2.1
2017-03-27 12:59:50,805  automatic picture encoding enabled
2017-03-27 12:59:50,805  also available:
2017-03-27 12:59:50,805   jpeg, png, rgb32
2017-03-27 12:59:50,805  client root window size is 1920x1014 with 1 display:
2017-03-27 12:59:50,806   HTML (508x268 mm - DPI: 96x96)
2017-03-27 12:59:50,806     Canvas
2017-03-27 12:59:50,808 setting keyboard layout to 'us'
2017-03-27 12:59:51,397 client 1: got hello: server version 2.1 accepted our connection
2017-03-27 12:59:51,398 client 1: startup complete
2017-03-27 12:59:52,657 Handshake complete; enabling connection
2017-03-27 12:59:52,657 Disconnecting client 172.17.0.1:60352:
2017-03-27 12:59:52,657  new client (this session does not allow sharing)
2017-03-27 12:59:52,658 xpra client 1 disconnected.
2017-03-27 12:59:52,660 HTML5 Linux client version 2.1
2017-03-27 12:59:52,660  automatic picture encoding enabled
2017-03-27 12:59:52,660  also available:
2017-03-27 12:59:52,660   jpeg, png, rgb32
2017-03-27 12:59:52,660 Last client has disconnected, terminating
2017-03-27 12:59:52,660 xpra is terminating.
2017-03-27 12:59:52,686  client root window size is 1920x1014 with 1 display:
2017-03-27 12:59:52,686   HTML (508x268 mm - DPI: 96x96)
2017-03-27 12:59:52,686     Canvas
2017-03-27 12:59:52,687 keyboard mapping already configured (skipped)
2017-03-27 12:59:52,716 client 2: got hello: server version 2.1 accepted our connection
2017-03-27 12:59:52,717 client 2: startup complete

then server should hang.



Mon, 27 Mar 2017 14:16:55 GMT - Antoine Martin: priority, status, milestone changed


Wed, 29 Mar 2017 06:51:58 GMT - Antoine Martin: owner, status changed

It's tricky to make sure that we never get any race conditions between accepting new connections and shutting down the server, but at least this particular case should be fixed in r15452. (more in r15453)


Wed, 29 Mar 2017 07:59:46 GMT - JAremko: status changed; resolution set

Thanks!


Fri, 14 Jul 2017 17:54:05 GMT - Antoine Martin: summary changed

(editing ticket title)


Sat, 23 Jan 2021 05:25:16 GMT - migration script:

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