This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository x2goserver. from 493550a cherry-pick changelog entry for BTS fix #623 (in 4.0.1.17) new e7d2289 Handle stale X11 socket files in cases where x2goagent has mysteriously disappeared (e.g. kill -9). (Fixes: #626). new 59c52b0 fix comment 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 | 2 ++ debian/control | 1 + x2goserver.spec | 1 + x2goserver/sbin/x2gocleansessions | 14 +++++++++++++- 4 files changed, 17 insertions(+), 1 deletion(-) -- 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 master in repository x2goserver. commit 59c52b0dc16aee025709308ac020f72845fdd229 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Fri Oct 3 12:37:21 2014 +0200 fix comment --- x2goserver/sbin/x2gocleansessions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x2goserver/sbin/x2gocleansessions b/x2goserver/sbin/x2gocleansessions index 8bc64dc..3d3be32 100755 --- a/x2goserver/sbin/x2gocleansessions +++ b/x2goserver/sbin/x2gocleansessions @@ -139,7 +139,7 @@ elsif ($pid == 0 ) my @sinfo=split('\\|',"@outp[$i]"); - # clean up invalid sessions from the session + # clean up invalid sessions from the session database if ( ( ! @sinfo[0] ) && ( $remembered_sessions_since{ @sinfo[1] } ge 10 ) ) { dbsys_rmsessionsroot(@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 master in repository x2goserver. commit e7d2289b4caa2cceaade0a6754861894a8385f11 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). Conflicts (resolved by Mike Gabriel): debian/control --- 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 23e61a5..23c26bd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -129,6 +129,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 a713dd6..6735b05 100644 --- a/debian/control +++ b/debian/control @@ -20,6 +20,7 @@ Depends: x2goserver-common (>= ${source:Version}), x2goserver-common (<< ${source:Version}.1~), ${misc:Depends}, libfile-basedir-perl, + libfile-remove-perl, libtry-tiny-perl, libswitch-perl, libx2go-server-perl (>= ${source:Version}), libx2go-server-perl (<< ${source:Version}.1~), diff --git a/x2goserver.spec b/x2goserver.spec index 121f0ed..96c6a1f 100644 --- a/x2goserver.spec +++ b/x2goserver.spec @@ -49,6 +49,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 7567b2b..8bc64dc 100755 --- a/x2goserver/sbin/x2gocleansessions +++ b/x2goserver/sbin/x2gocleansessions @@ -26,6 +26,7 @@ $ENV{'PATH'} = "/bin:/sbin:/usr/bin:/usr/sbin"; use Sys::Hostname; use Sys::Syslog qw( :standard :macros ); +use File::Remove 'remove'; use POSIX; use X2Go::Config qw( get_config ); @@ -163,6 +164,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"); @@ -172,6 +178,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