Xpra: Ticket #1382: --exit-with-children race condition (vs. --start-child)

Hi,

the call 'xpra start --start-child="xterm -ls" --exit-with-children' works well with 0.17.3, but not with 1.0-x if the startup of the child is not fast enough. However, starting a session without '--exit-with-children' is successful.

It seems to be a race condition: xpra starts -> X11 starts -> xpra starts child -> xpra checks for running children -> child is up -> xpra terminates X11 -> xpra terminates itself.

In the log (e.g. /run/usr/$UID/xpra/:1.log) it looks like:

...
X.Org X Server 1.17.2
...
Using display number provided by xpra_Xdummy: :1
2016-12-16 17:22:59,084 created unix domain socket: /var/run/user/${UID}/xpra/${HOSTNAME}-1
2016-12-16 17:22:59,086 created unix domain socket: /home/${USER}/.xpra/${HOSTNAME}-1
...
2016-12-16 17:23:02,412 all children have exited and --exit-with-children was specified, exiting
2016-12-16 17:23:02,415 D-Bus notification forwarding is available
2016-12-16 17:23:02,422 started command 'xterm -ls' with pid 27233
2016-12-16 17:23:02,422 xpra X11 version 1.0-r14532 64-bit
2016-12-16 17:23:02,422  uid=...
2016-12-16 17:23:02,422  running with pid 26888 on Linux CentOS 7.3.1611 Core
2016-12-16 17:23:02,422  connected to X11 display :1
2016-12-16 17:23:02,445 stopping pulseaudio with pid 27046
xterm: cannot load font '-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1'
2016-12-16 17:23:02,464 xpra is ready.
2016-12-16 17:23:02,550 printer forwarding enabled using postscript and pdf
2016-12-16 17:23:02,550 62.7GB of system memory
2016-12-16 17:23:02,961 xpra is terminating.
2016-12-16 17:23:02,962 killing xvfb with pid 26889
2016-12-16 17:23:02,962 removing socket /var/run/user/${UID}/xpra/${HOSTNAME}-1
2016-12-16 17:23:02,962 removing socket /home/${USER}/.xpra/${HOSTNAME}-1
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":1"
      after 74 requests (74 known processed) with 12 events remaining.
(II) Server terminated successfully (0). Closing log file.

MWE:



Fri, 16 Dec 2016 16:40:32 GMT - Antoine Martin: owner, description changed

This has already been fixed: r14535 (r14541 for v1.0.x branch)

Please close if that works for you.


Mon, 19 Dec 2016 14:33:12 GMT - Alex: status changed; resolution set

Thanks, v1.0.1-r14535 on openSuse 13.1 does fine.

Will you publish a fixed version in your repository soon?


Mon, 19 Dec 2016 15:42:25 GMT - Antoine Martin: status changed; resolution deleted


Mon, 19 Dec 2016 15:42:35 GMT - Antoine Martin: status changed; resolution set


Sat, 23 Jan 2021 05:22:42 GMT - migration script:

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