xpra icon
Bug tracker and wiki

Opened 4 months ago

Closed 4 months ago

Last modified 3 months ago

#2099 closed defect (needinfo)

Dead shadow session, but process is still alive

Reported by: stdedos Owned by: stdedos
Priority: minor Milestone: 2.5
Component: server Version: 2.4.x
Keywords: Cc:

Description

Xpra server:

$ lsb_release -rd
Description:	Ubuntu 16.04.5 LTS
Release:	16.04
$ xpra --version
xpra v2.5-r21174

The machine hasn't been restarted in a month (or more!). Session has long been closed:

$ xpra list
Found the following xpra sessions:
/run/user/1000/xpra:
	LIVE session at :1
/run/xpra:
	LIVE session at :1
$ xpra stop :0
xpra initialization error:
 cannot find live server for display :0

However, I still have multiple xpra processes:

$ descendent_pids xpra
5551 5579 5629 7270 7304 10209 12534 12561 12599 12661 20683 20702 25932 25949 28464 28481 29139
systemd,1,1 splash
  └─sh,5551,5551 -c xpra initenv;if [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _shadow_start ":0" "--desktop-scaling=0.75" "--opengl=no";elif which "xpra" > /dev/null 2>&1; then xpra _shadow_start ":0" "--desktop-scaling=0.75" "--opengl=no";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _shadow_start ":0" "--desktop-scaling=0.75" "--opengl=no";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _shadow_start ":0" "--desktop-scaling=0.75" "--opengl=no";else echo "no run-xpra command found"; exit 1; fi
      └─python2,5579,5551 /usr/bin/xpra _shadow_start :0 --desktop-scaling=0.75 --opengl=no
          └─{python2},5982,5551
systemd,1,1 splash
  └─sh,5551,5551 -c xpra initenv;if [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _shadow_start ":0" "--desktop-scaling=0.75" "--opengl=no";elif which "xpra" > /dev/null 2>&1; then xpra _shadow_start ":0" "--desktop-scaling=0.75" "--opengl=no";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _shadow_start ":0" "--desktop-scaling=0.75" "--opengl=no";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _shadow_start ":0" "--desktop-scaling=0.75" "--opengl=no";else echo "no run-xpra command found"; exit 1; fi
      └─python2,5579,5551 /usr/bin/xpra _shadow_start :0 --desktop-scaling=0.75 --opengl=no
          └─{python2},5982,5551
systemd,1,1 splash
  └─xpra,5629,5628 /usr/bin/xpra shadow :0 --desktop-scaling=0.75 --exit-with-client=yes --opengl=no --env=XPRA_PROXY_START_UUID=ecce49eafb2e4d68bc00e0ee4b5432f4 --daemon=yes --systemd-run=no
      ├─{xpra},5988,5628
      ├─{xpra},5989,5628
      ├─{xpra},5991,5628
      ├─{xpra},5992,5628
      ├─{xpra},5994,5628
      ├─{xpra},5996,5628
      ├─{xpra},5997,5628
      ├─{xpra},5998,5628
      ├─{xpra},5999,5628
      ├─{xpra},6000,5628
      ├─{xpra},6001,5628
      ├─{xpra},6002,5628
      ├─{xpra},6003,5628
      ├─{xpra},6004,5628
      ├─{xpra},6005,5628
      ├─{xpra},6006,5628
      ├─{xpra},6007,5628
      ├─{xpra},6008,5628
      ├─{xpra},6009,5628
      ├─{xpra},6010,5628
      ├─{xpra},6011,5628
      ├─{xpra},6014,5628
      ├─{xpra},6015,5628
      ├─{xpra},6016,5628
      ├─{xpra},6017,5628
      ├─{xpra},6018,5628
      ├─{xpra},6019,5628
      ├─{xpra},6020,5628
      ├─{xpra},6021,5628
      └─{xpra},6045,5628
systemd,1,1 splash
  └─sh,7270,7270 -c xpra initenv;if [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy ":1";elif which "xpra" > /dev/null 2>&1; then xpra _proxy ":1";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy ":1";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy ":1";else echo "no run-xpra command found"; exit 1; fi
      └─python2,7304,7270 /usr/bin/xpra _proxy :1
          └─{python2},7323,7270
systemd,1,1 splash
  └─sh,7270,7270 -c xpra initenv;if [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy ":1";elif which "xpra" > /dev/null 2>&1; then xpra _proxy ":1";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy ":1";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy ":1";else echo "no run-xpra command found"; exit 1; fi
      └─python2,7304,7270 /usr/bin/xpra _proxy :1
          └─{python2},7323,7270
systemd,1,1 splash
  └─xpra,10209,10209 /usr/bin/xpra proxy :14500 --daemon=no --bind-tcp=0.0.0.0:14500 --tcp-auth=sys --ssl-cert=/etc/xpra/ssl-cert.pem --ssl=on --bind=/run/xpra/system --auth=peercred --socket-dirs=/run/xpra --socket-permissions=666 --log-dir=/var/log --pidfile=/run/xpra.pid --debug=
systemd,1,1 splash
  └─sh,12534,12534 -c xpra initenv;if [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy_start "--start=gnome-terminal" "--speaker=off" "--start-new-commands=yes" "--opengl=no" "--webcam=no";elif which "xpra" > /dev/null 2>&1; then xpra _proxy_start "--start=gnome-terminal" "--speaker=off" "--start-new-commands=yes" "--opengl=no" "--webcam=no";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy_start "--start=gnome-terminal" "--speaker=off" "--start-new-commands=yes" "--opengl=no" "--webcam=no";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy_start "--start=gnome-terminal" "--speaker=off" "--start-new-commands=yes" "--opengl=no" "--webcam=no";else echo "no run-xpra command found"; exit 1; fi
      └─python2,12561,12534 /usr/bin/xpra _proxy_start --start=gnome-terminal --speaker=off --start-new-commands=yes --opengl=no --webcam=no
          └─{python2},12808,12534
systemd,1,1 splash
  └─sh,12534,12534 -c xpra initenv;if [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy_start "--start=gnome-terminal" "--speaker=off" "--start-new-commands=yes" "--opengl=no" "--webcam=no";elif which "xpra" > /dev/null 2>&1; then xpra _proxy_start "--start=gnome-terminal" "--speaker=off" "--start-new-commands=yes" "--opengl=no" "--webcam=no";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy_start "--start=gnome-terminal" "--speaker=off" "--start-new-commands=yes" "--opengl=no" "--webcam=no";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy_start "--start=gnome-terminal" "--speaker=off" "--start-new-commands=yes" "--opengl=no" "--webcam=no";else echo "no run-xpra command found"; exit 1; fi
      └─python2,12561,12534 /usr/bin/xpra _proxy_start --start=gnome-terminal --speaker=off --start-new-commands=yes --opengl=no --webcam=no
          └─{python2},12808,12534
systemd,1,1 splash
  └─xpra,12599,12598 /usr/bin/xpra start --start=gnome-terminal --speaker=off --start-new-commands=yes --opengl=no --env=XPRA_PROXY_START_UUID=22ad4363ef7043589222ed4c5bf2e0bb --daemon=yes --systemd-run=no --displayfd=4
      ├─{xpra},7340,12598
      ├─Xvfb,12600,12600 +extension GLX +extension Composite -screen 0 5760x2560x24+32 -dpi 96 -nolisten tcp -noreset -auth /home/sntentos/.Xauthority -displayfd 5
      │   ├─{llvmpipe-0},12601,12600
      │   ├─{llvmpipe-1},12602,12600
      │   ├─{llvmpipe-2},12603,12600
      │   ├─{llvmpipe-3},12604,12600
      │   ├─{llvmpipe-4},12605,12600
      │   ├─{llvmpipe-5},12606,12600
      │   ├─{llvmpipe-6},12607,12600
      │   └─{llvmpipe-7},12608,12600
      ├─pulseaudio,12661,12598 --start -n --daemonize=false --system=false --exit-idle-time=-1 --load=module-suspend-on-idle --load=module-null-sink sink_name="Xpra-Speaker" sink_properties=device.description="Xpra\\ Speaker" --load=module-null-sink sink_name="Xpra-Microphone" sink_properties=device.description="Xpra\\ Microphone" --load=module-native-protocol-unix socket=/run/user/1000/xpra/pulse-1/pulse/native --load=module-dbus-protocol --load=module-x11-publish --log-level=2 --log-target=stderr
      │   ├─{null-sink},12665,12598
      │   └─{null-sink},12666,12598
      ├─{xpra},12814,12598
      ├─{xpra},12843,12598
      ├─{gmain},15864,12598
      ├─{gdbus},15865,12598
      ├─{xpra},20734,12598
      ├─{xpra},25998,12598
      ├─{xpra},28518,12598
      ├─{xpra},29253,12598
      ├─{xpra},29254,12598
      ├─{xpra},29256,12598
      └─{xpra},29257,12598
systemd,1,1 splash
  └─xpra,12599,12598 /usr/bin/xpra start --start=gnome-terminal --speaker=off --start-new-commands=yes --opengl=no --env=XPRA_PROXY_START_UUID=22ad4363ef7043589222ed4c5bf2e0bb --daemon=yes --systemd-run=no --displayfd=4
      └─pulseaudio,12661,12598 --start -n --daemonize=false --system=false --exit-idle-time=-1 --load=module-suspend-on-idle --load=module-null-sink sink_name="Xpra-Speaker" sink_properties=device.description="Xpra\\ Speaker" --load=module-null-sink sink_name="Xpra-Microphone" sink_properties=device.description="Xpra\\ Microphone" --load=module-native-protocol-unix socket=/run/user/1000/xpra/pulse-1/pulse/native --load=module-dbus-protocol --load=module-x11-publish --log-level=2 --log-target=stderr
          ├─{null-sink},12665,12598
          └─{null-sink},12666,12598
systemd,1,1 splash
  └─sh,20683,20683 -c xpra initenv;if [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy ":1";elif which "xpra" > /dev/null 2>&1; then xpra _proxy ":1";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy ":1";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy ":1";else echo "no run-xpra command found"; exit 1; fi
      └─python2,20702,20683 /usr/bin/xpra _proxy :1
          └─{python2},20730,20683
systemd,1,1 splash
  └─sh,20683,20683 -c xpra initenv;if [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy ":1";elif which "xpra" > /dev/null 2>&1; then xpra _proxy ":1";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy ":1";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy ":1";else echo "no run-xpra command found"; exit 1; fi
      └─python2,20702,20683 /usr/bin/xpra _proxy :1
          └─{python2},20730,20683
systemd,1,1 splash
  └─sh,25932,25932 -c xpra initenv;if [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy ":1";elif which "xpra" > /dev/null 2>&1; then xpra _proxy ":1";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy ":1";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy ":1";else echo "no run-xpra command found"; exit 1; fi
      └─python2,25949,25932 /usr/bin/xpra _proxy :1
          └─{python2},25974,25932
systemd,1,1 splash
  └─sh,25932,25932 -c xpra initenv;if [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy ":1";elif which "xpra" > /dev/null 2>&1; then xpra _proxy ":1";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy ":1";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy ":1";else echo "no run-xpra command found"; exit 1; fi
      └─python2,25949,25932 /usr/bin/xpra _proxy :1
          └─{python2},25974,25932
systemd,1,1 splash
  └─sh,28464,28464 -c xpra initenv;if [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy ":1";elif which "xpra" > /dev/null 2>&1; then xpra _proxy ":1";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy ":1";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy ":1";else echo "no run-xpra command found"; exit 1; fi
      └─python2,28481,28464 /usr/bin/xpra _proxy :1
          └─{python2},28512,28464
systemd,1,1 splash
  └─sh,28464,28464 -c xpra initenv;if [ -x $XDG_RUNTIME_DIR/xpra/run-xpra ]; then $XDG_RUNTIME_DIR/xpra/run-xpra _proxy ":1";elif which "xpra" > /dev/null 2>&1; then xpra _proxy ":1";elif [ -x /usr/local/bin/xpra ]; then /usr/local/bin/xpra _proxy ":1";elif [ -x ~/.xpra/run-xpra ]; then ~/.xpra/run-xpra _proxy ":1";else echo "no run-xpra command found"; exit 1; fi
      └─python2,28481,28464 /usr/bin/xpra _proxy :1
          └─{python2},28512,28464
systemd,1,1 splash
  └─lightdm,1247,1247
      └─lightdm,5852,1247 --session-child 12 21
          └─upstart,5882,5882 --user
              └─gnome-terminal-,7247,5981
                  └─bash,15607,15607
                      └─xpra,29139,29139 /usr/bin/xpra attach :1
                          ├─{dconf worker},29200,29139
                          ├─{gmain},29201,29139
                          ├─{gdbus},29202,29139
                          ├─{xpra},29236,29139
                          ├─{xpra},29237,29139
                          ├─{xpra},29238,29139
                          ├─{xpra},29240,29139
                          └─{xpra},29258,29139

(Generated with:

descendent_pids() {
    pids=$(pgrep -f $1)
    echo $pids
    for pid in $pids; do
        pstree -achglnspU $pid
    done
}

)

I can outright kill them, that is no issue. However, do you worry about leaks? / Would you want to investigate?

Attachments (1)

xpra_leaks.log (44.6 KB) - added by stdedos 3 months ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 4 months ago by stdedos

My initial purpose was:

I wanted to shutdown a simple session (xpra start gnome-terminal). The session is open around one month, so, I don't remember "if there is something else running". Is there a "smart" way to ask xpra, what does it "think" it is still running inside? Both window titles (if available) and processes.

I have seen the "raise windows" thing, but I am worried if somehow windows end up in a different desktop than the one I am looking at (be it windows or linux)

comment:2 Changed 4 months ago by Antoine Martin

Owner: changed from Antoine Martin to stdedos

Is there a "smart" way to ask xpra, what does it "think" it is still running inside? Both window titles (if available) and processes.

  • for windows, see xpra info | grep windows (those may have pid information if the application exposes it)
  • for processes, you can only get information on those that xpra started itself, see xpra info | grep commands

How do I reproduce this xpra process leak?

comment:3 in reply to:  2 Changed 4 months ago by stdedos

Replying to Antoine Martin:

How do I reproduce this xpra process leak?

I have no idea. This is a working station / server that has been up at least 2 months, and I have been trying to connect (multiple times) to the shadow session and a gnome-terminal. On said gnome-terminal I had started pidgin (which is how the bug was discovered). Along with all kinds of weirdeness like connection drop, quality / framerate issues, wifi-to-ethernet transitions back-and-forth etc.

I didn't expect that to happen, nor have I done anything "out of the ordinary". I might have changed connection settings, but that's about it. Sadly, I had to restart for kernel updates, so, the processes are lost.

I couldn't/cannot obviously give you access to the server. Regardless, any data collection and/or running from sources I would be willing to do, if that happens again. (Provided I can somehow solve the BitDefender issue).

Last edited 4 months ago by Antoine Martin (previous) (diff)

comment:4 Changed 4 months ago by Antoine Martin

Resolution: needinfo
Status: newclosed

OK, thanks.

Let's close this for now and re-open if it happens again.

comment:5 Changed 3 months ago by stdedos

It happened again. I guess it's not funny anymore, considering output's size (check attachment).

Changed 3 months ago by stdedos

Attachment: xpra_leaks.log added

comment:6 Changed 3 months ago by stdedos

I will need to restart this week for kernel updates.

Kindly act in due time, or I will just shoot them where they stand

Note: See TracTickets for help on using tickets.