X2Go Bug report logs - #495
failure to reconnect after abrupt (CTRL-C / SIGINT) termination of x2goclient, corrupt x2go_sessions file?

version graph

Package: x2goserver; Maintainer for x2goserver is X2Go Developers <x2go-dev@lists.x2go.org>; Source for x2goserver is src:x2goserver.

Reported by: Robert Izzard <izzard@astro.uni-bonn.de>

Date: Fri, 9 May 2014 14:25:01 UTC

Severity: normal

Tags: pending

Found in version 4.0.15-0~847

Fixed in version 4.0.1.16

Done: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>

Bug is archived. No further changes may be made.

Full log


đź”— View this message in rfc822 format

X-Loop: owner@bugs.x2go.org
Subject: Bug#495: failure to reconnect after abrupt (CTRL-C / SIGINT) termination of x2goclient, corrupt x2go_sessions file?
Reply-To: Robert Izzard <izzard@astro.uni-bonn.de>, 495@bugs.x2go.org
Resent-From: Robert Izzard <izzard@astro.uni-bonn.de>
Resent-To: x2go-dev@lists.x2go.org
Resent-CC: X2Go Developers <x2go-dev@lists.x2go.org>
X-Loop: owner@bugs.x2go.org
Resent-Date: Fri, 09 May 2014 14:25:01 +0000
Resent-Message-ID: <handler.495.B.139964545218017@bugs.x2go.org>
Resent-Sender: owner@bugs.x2go.org
X-X2Go-PR-Message: report 495
X-X2Go-PR-Package: x2goserver
X-X2Go-PR-Keywords: 
Received: via spool by submit@bugs.x2go.org id=B.139964545218017
          (code B); Fri, 09 May 2014 14:25:01 +0000
Received: (at submit) by bugs.x2go.org; 9 May 2014 14:24:12 +0000
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED
	autolearn=ham version=3.3.2
X-Greylist: delayed 3600 seconds by postgrey-1.34 at ymir.das-netzwertkeam.de; Fri, 09 May 2014 16:24:11 CEST
Received: from uni-bonn.de (x23.rhrz.uni-bonn.de [131.220.15.155])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTP id 2A7925DB16
	for <submit@bugs.x2go.org>; Fri,  9 May 2014 16:24:11 +0200 (CEST)
Received: from aibn36.astro.uni-bonn.de (account izzard@uni-bonn.de [131.220.96.36] verified)
  by uni-bonn.de (CommuniGate Pro SMTP 6.0.8)
  with ESMTPSA id 73159482 for submit@bugs.x2go.org; Fri, 09 May 2014 15:24:10 +0200
Date: Fri, 9 May 2014 15:24:10 +0200
From: Robert Izzard <izzard@astro.uni-bonn.de>
To: submit@bugs.x2go.org
Message-Id: <20140509152410.d75b53b33b4c0ccda9db6696@astro.uni-bonn.de>
Organization: Argelander Institute for Astronomy - University of Bonn
X-Mailer: Sylpheed 3.3.0 (GTK+ 2.24.10; x86_64-unknown-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Package: x2goserver
Version: 4.0.15-0~847 

(x2goserver: 4.0.15-0~847~~ubuntu12.04.1 on Ubuntu Linux 12.04.4 LTS kernel 3.8.0-39-generic,
 x2goclient: 4.0.15-0~847~ubuntu14.04.1 on Ubuntu Linux 14.04 LTS kernel 3.14.3-031403-generic)
 
Please note: I have labelled package x2goserver, but the bug is displayed on x2goclient even though I *think* the bug is in the server somewhere (see below).

Sometimes after an abrupt (e.g. CTRL-C, probably also network 
failure or laptop sleep/wake cycle) termination of x2goclient, I 
cannot reconnect to the server. I get errors such as the dreaded 
"Failure negotiating the session in stage '7'." and "Error: Wrong 
version or invalid session authentication cookie." instead. 

I am connecting through a proxy using ssh key-based 
authentication (using "Try auto-login" with "ssh-agent or default 
ssh key" on the proxy, although switching to password made no 
difference). I can connect with ssh through the proxy with no 
problem. I can *start* an x2go session with no problem. I can 
restart a session with no problem *provided I cleanly exit 
x2goclient* (e.g. by clicking on the close button on the window). 
If I exit x2goclient with a CTRL-C in the terminal, I cannot 
connect again. Note that I can connect to an NX session through 
the proxy without any problem and this does not have the same 
problem when CTRL-C.

Steps to repeat:
1) On the client, open a new desktop on the server using 
x2goclient. (I am running KDE but I doubt it matters).
2) On the client, press CTRL-C to stop x2goclient.
3) On the client, try to reconnect -- it fails with errors (which 
are very hard to copy-paste as they go so fast, this is a bug in 
the GUI):

------------------------
NXPROXY - Version 3.5.0

Copyright (C) 2001, 2010 NoMachine.

See http://www.nomachine.com/ for more information.
Info: Proxy running in client mode with pid '7219'.
Session: Starting session at 'Thu May 8 17:33:51 2014'.
Info: Connecting to remote host 'localhost:31007'.
Info: Connection to remote proxy 'localhost:31007' established.
Error: The remote NX proxy closed the connection.
Error: Failure negotiating the session in stage '7'.
Error: Wrong version or invalid session authentication cookie.
Session: Terminating session at 'Thu May 8 17:33:51 2014'.
Session: Session terminated at 'Thu May 8 17:33:51 2014'.
------------------------

At this point the CPU usage of x2goclient jumps to 100% and I 
have to kill it (although the GUI continues to respond). This is 
just a minor annoyance at the moment.

And in .x2go/SESSION_ID/sessions on the client, similar warnings:

------------------------

Loop: PANIC! No shutdown of proxy link performed by remote proxy.
Loop: PANIC! The remote NX proxy closed the connection.
Loop: PANIC! Failure negotiating the session in stage '7'.
Loop: PANIC! Wrong version or invalid session authentication cookie.
------------------------

The server clearly detects the disconnect in its session.log, 
followed by “Display failure detected” errors on attempted 
reconnect:

-----------------------
running as X2Go Agent

NXAGENT - Version 3.5.0

Copyright (C) 2001, 2011 NoMachine.

See http://www.nomachine.com/ for more information.

Info: Agent running with pid '17414'.
Session: Starting session at 'Fri May 9 14:44:26 2014'.
Info: Proxy running in server mode with pid '17414'.
Info: Waiting for connection from 'localhost' on port '30004'.
Info: Accepted connection from '127.0.0.1'.
Info: Connection with remote proxy completed.
Info: Using ADSL link parameters 512/24/1/0.
Info: Using agent parameters 5000/10/50/0/0.
Info: Using cache parameters 4/4096KB/8192KB/8192KB.
Info: Using pack method '16m-png-9' with session 
'unix-kde-depth_24'.
Info: Using ZLIB data compression 1/1/32.
Info: Using ZLIB stream compression 4/4.
Info: No suitable cache file found.
Info: Listening to X11 connections on display ':51'.
Info: Established X client connection.
Info: Using shared memory parameters 1/1/1/2048K.
Info: Using alpha channel in render extension.
Info: Not using local device configuration changes.
keyboard file created
SessionPath not defined
Session: Session started at 'Fri May 9 14:44:27 2014'.
Error: Failure reading from the peer proxy.
Error: Connection with remote peer broken.
Error: Please check the state of your network and retry.
Session: Display failure detected at 'Fri May 9 14:44:44 2014'.
Session: Suspending session at 'Fri May 9 14:44:44 2014'.
Session: Session suspended at 'Fri May 9 14:44:44 2014'.
Session: Resuming session at 'Fri May 9 14:45:11 2014'.
Info: Proxy running in server mode with pid '17414'.
Info: Waiting for connection from 'localhost' on port '30004'.
Info: Aborting the procedure due to signal '1'.
Session: Display failure detected at 'Fri May 9 14:45:27 2014'.
Session: Suspending session at 'Fri May 9 14:45:27 2014'.
Session: Session suspended at 'Fri May 9 14:45:27 2014'.
--------------

In .x2go/C-SESSION_ID/session.log on the server, I now have the 
following text repeated over and over:

Session: Suspending session at 'Fri May 9 15:08:49 2014'.
[then hundreds or thousands of times, with later timestamps]



The problem appears to be with the file 
/var/lib/x2go/x2go_sessions on the server. If I back this up 
*before* hitting CTRL-C on the client, then do the CTRL-C, then 
reinstate the backup, I can restart the session with no problems. 
Clearly this is beyond the ability of a normal user (without root 
on the server) and is not really a fix, even if it does work.



It seems that there is a problem with the x2go_sessions file on 
the server being corrupted in some way when the remote session is 
abruptly disconnected. This is a failure bad enough for me to 
stop using x2go and go back to NX.

* Backing up this file all the time is not an option.

* Deleting this file and continuing, as suggested at 
http://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=323, is not an 
option.

* Note that unlink suggested in 
http://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=323, there is no 
*server* crash. 

* I have tried the other options at 
http://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=323, none apply 
here (e.g. permissions are fine).

* The action that precipitates the problem is on the *client* 
side.

* Note also that the network itself is not at fault: I can 
connect from a laptop in the same office (but on a different 
subnet) as the server, or from home to the proxy server direct. 
Same problem.

* This seems similar to 
http://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=101 but the fixes 
are more than a year ago and presumably (?) are in the latest 
x2goclient already.

* No amount of calls to x2gosuspend-session or x2goresume-session 
on the appropriate session makes any difference.

* If I suspend the session with x2gosuspend-session, attempting 
to connect *does* set the session into the “Running” state (just 
as x2goresume-session). The error seems to occur after this.

Thanks for all your help x2go team, I hope we can fix this 
because I'd like to recommend x2go for my colleagues. 

Rob

Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Wed Sep 30 09:42:21 2020; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.