This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch release/4.0.1.x in repository x2goserver. from a13accd Fix breakage of X2Go Server when upgrading from 4.0.1.15 while sessions are still in running / suspended state. (Fixes: #623). new 5231443 Handle stale X11 socket files in cases where x2goagent has mysteriously disappeared (e.g. kill -9). (Fixes: #626). new e11f565 Make sure that incompletely started up sessions get wiped from the session DB after 10 seconds. The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: debian/changelog | 4 ++++ debian/control | 1 + x2goserver.spec | 1 + x2goserver/sbin/x2gocleansessions | 19 +++++++++++++++++++ 4 files changed, 25 insertions(+) -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch release/4.0.1.x in repository x2goserver. commit 52314435eb78a79ea0622450a691a1f672f9d39f Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Fri Oct 3 12:33:24 2014 +0200 Handle stale X11 socket files in cases where x2goagent has mysteriously disappeared (e.g. kill -9). (Fixes: #626). --- debian/changelog | 2 ++ debian/control | 1 + x2goserver.spec | 1 + x2goserver/sbin/x2gocleansessions | 12 ++++++++++++ 4 files changed, 16 insertions(+) diff --git a/debian/changelog b/debian/changelog index 882863a..cf332b4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ x2goserver (4.0.1.17-0x2go1) UNRELEASED; urgency=medium * New upstream release (4.0.1.17): - Fix breakage of X2Go Server when upgrading from 4.0.1.15 while sessions are still in running / suspended state. (Fixes: #623). + - Handle stale X11 socket files in cases where x2goagent has + mysteriously disappeared (e.g. kill -9). (Fixes: #626). -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Thu, 02 Oct 2014 12:18:58 +0200 diff --git a/debian/control b/debian/control index f531e7f..4debd42 100644 --- a/debian/control +++ b/debian/control @@ -28,6 +28,7 @@ Depends: libdbd-pg-perl, libdbd-sqlite3-perl, libfile-basedir-perl, + libfile-remove-perl, libcapture-tiny-perl, adduser, xauth, diff --git a/x2goserver.spec b/x2goserver.spec index e142d0c..14c5725 100644 --- a/x2goserver.spec +++ b/x2goserver.spec @@ -48,6 +48,7 @@ Requires: sudo Requires: x2goagent >= 3.5.0.25 Requires: xorg-x11-fonts-misc Requires: xorg-x11-xauth +Requires: perl(Files::Remove) Requires(pre): shadow-utils Requires(post): grep Requires(post): perl(DBD::SQLite) diff --git a/x2goserver/sbin/x2gocleansessions b/x2goserver/sbin/x2gocleansessions index 56dcbbd..62f4be7 100755 --- a/x2goserver/sbin/x2gocleansessions +++ b/x2goserver/sbin/x2gocleansessions @@ -23,6 +23,7 @@ use strict; use Sys::Hostname; use Sys::Syslog qw( :standard :macros ); +use File::Remove 'remove'; use POSIX; @@ -191,6 +192,11 @@ elsif ($pid == 0 ) # send SIGKILL to dangling X-server processes syslog('warning', "@sinfo[1]: found stale X-server process (@sinfo[0]), sending SIGKILL"); system("kill", "-9", "@sinfo[0]"); + my $display = @sinfo[3]; + if (-S "/tmp/.X11-unix/X$display") { + # remove the NX-X11 socket file (as the agent will not have managed after a kill -9) + remove("/tmp/.X11-unix/X$display"); + } delete $remembered_sessions_since{@sinfo[1]}; } syslog('debug', "@sinfo[1]: unmounting all shares"); @@ -200,6 +206,12 @@ elsif ($pid == 0 ) elsif (! check_pid (@sinfo[0],@sinfo[1],@sinfo[12])) { system("su", "@sinfo[11]", "-c", "$x2go_lib_path/x2gochangestatus 'F' @sinfo[1]"); + my $display = @sinfo[3]; + if (-S "/tmp/.X11-unix/X$display") { + # remove the NX-X11 socket file (we don't know how the agent disappeared, + # someone might have shot it with kill -9) + remove("/tmp/.X11-unix/X$display"); + } syslog('debug', "@sinfo[1], pid @sinfo[0] does not exist, changing status from @sinfo[4] to F"); syslog('debug', "@sinfo[1]: unmounting all shares"); system("su", "@sinfo[11]", "-c", "export HOSTNAME && x2goumount-session @sinfo[1]"); -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch release/4.0.1.x in repository x2goserver. commit e11f565d83c1a42e0ce14bf541207745e848a29f Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Fri Oct 3 12:38:20 2014 +0200 Make sure that incompletely started up sessions get wiped from the session DB after 10 seconds. --- debian/changelog | 2 ++ x2goserver/sbin/x2gocleansessions | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/debian/changelog b/debian/changelog index cf332b4..67deb50 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ x2goserver (4.0.1.17-0x2go1) UNRELEASED; urgency=medium sessions are still in running / suspended state. (Fixes: #623). - Handle stale X11 socket files in cases where x2goagent has mysteriously disappeared (e.g. kill -9). (Fixes: #626). + - Make sure that incompletely started up sessions get wiped from the + session DB after 10 seconds. -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Thu, 02 Oct 2014 12:18:58 +0200 diff --git a/x2goserver/sbin/x2gocleansessions b/x2goserver/sbin/x2gocleansessions index 62f4be7..b3b5f5a 100755 --- a/x2goserver/sbin/x2gocleansessions +++ b/x2goserver/sbin/x2gocleansessions @@ -174,6 +174,13 @@ elsif ($pid == 0 ) my @sinfo=split('\\|',"@outp[$i]"); + # clean up invalid sessions from the session database + if ( ( ! @sinfo[0] ) && ( $remembered_sessions_since{ @sinfo[1] } ge 10 ) ) + { + dbsys_rmsessionsroot(@sinfo[1]); + next; + } + if (defined $remembered_sessions_since{ @sinfo[1] } && ($remembered_sessions_status{ @sinfo[1] } =~m/@sinfo[4]/ )) { $remembered_sessions_since{ @sinfo[1] } += 2; -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git