Xpra: Ticket #2761: Xpra stop not working after update

After using the latest version of xpra as a server, I noticed that you could start sessions on a display using

xpra start :(display number, ex. 350)

but they would never fully stop with the xpra stop command. Everything else seemed to work fine. Through trial and error, I determined that this issue started between these two versions:

This version and older, xpra stop :(display) was working vv

xpra_4.0-20200331r25881-1_amd64.deb 2020-03-31 13:45 2.8M

This version and newer, xpra stop :(display) was NOT working vv

xpra_4.0-20200410r26081-1_amd64.deb 2020-04-10 17:14 2.8M

The output from "xpra stop all" on a non-working version:

server requested disconnect:
 server shutdown
How odd... I'm not sure what's going on with xpra at :351

The output from "xpra stop :350" on a non-working version:

server socket for display :350 is in UNKNOWN state
 waiting up to 20 seconds
Warning: failed to connect:
 cannot find live server for display :350

The oldest tested version was:

xpra_4.0-20200308r25538-1_amd64.deb 2020-03-07 17:18 2.8M

The most recent tested version was:

xpra_4.0-20200505r26253-1_amd64.deb 2020-05-04 20:25 2.8M

The issue still persists, not letting me start another server on the same display as the one I tried to shut down, even after removing /tmp/.X350-lock (unless I use --use-display). The only thing that seems to fix this on a non-working (more recent) version is a reboot.

Wed, 13 May 2020 02:33:22 GMT - zenarcher007: attachment set

On the new, not working, version, up to trying to shut it down.

Wed, 13 May 2020 02:34:38 GMT - zenarcher007: attachment set

Trying to start a new session, still on the newer version

Wed, 13 May 2020 02:53:22 GMT - Antoine Martin: status changed

From the log: Linux Ubuntu 20.04 focal

Wed, 13 May 2020 06:03:12 GMT - Antoine Martin:

Thanks for the bug report, I haven't identified the cause of this bug, but I do have a workaround you can use:

XPRA_CLOSE_GTK_DISPLAY=0 xpra start ...

Or even:

xpra start --env=XPRA_CLOSE_GTK_DISPLAY=0 ...

This prevents the crash when the server terminates.

Wed, 13 May 2020 06:22:00 GMT - Antoine Martin: status changed; resolution set

This version and older, xpra stop :(display) was working vv xpra_4.0-20200331r25881-1_amd64.deb 2020-03-31 13:45 2.8M

This version also crashes. I've tried going back even further, they all crash.

My guess is that this is a GTK library update that caused the crash to start to occur around that time. So r26335 changes the default to never close the display on exit.

(see also #2328)

Wed, 13 May 2020 06:43:30 GMT - Antoine Martin:

comment:3 was wrong, I was just testing badly. Bisecting:

So r26337 is the more correct fix, but I'm going to keep r26335 because this close_gtk_display has caused too many bugs already.

Sat, 23 Jan 2021 06:00:02 GMT - migration script:

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