X2Go Bug report logs - #759
x2goclient 4.0.3.1 for OSX causes server to continously run xmodmap

version graph

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

Reported by: Nathan Kurz <nate@verse.com>

Date: Thu, 22 Jan 2015 11:25:02 UTC

Severity: normal

Found in version 4.0.3.1

Full log


🔗 View this message in rfc822 format

X-Loop: owner@bugs.x2go.org
Subject: Bug#759: x2goclient 4.0.5.0 (and 4.0.5.1 preview) frequent ssh commands don't free resources
Reply-To: Mat Martineau <mathew.j.martineau@linux.intel.com>, 759@bugs.x2go.org
Resent-From: Mat Martineau <mathew.j.martineau@linux.intel.com>
Resent-To: x2go-dev@lists.x2go.org
Resent-CC: X2Go Developers <x2go-dev@lists.x2go.org>
X-Loop: owner@bugs.x2go.org
Resent-Date: Wed, 17 Feb 2016 17:15:02 +0000
Resent-Message-ID: <handler.759.B759.145572906115997@bugs.x2go.org>
Resent-Sender: owner@bugs.x2go.org
X-X2Go-PR-Message: followup 759
X-X2Go-PR-Package: x2goclient
X-X2Go-PR-Keywords: 
Received: via spool by 759-submit@bugs.x2go.org id=B759.145572906115997
          (code B ref 759); Wed, 17 Feb 2016 17:15:02 +0000
Received: (at 759) by bugs.x2go.org; 17 Feb 2016 17:11:01 +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=0.8 required=3.0 tests=BAYES_50,RCVD_IN_DNSWL_BLOCKED
	autolearn=ham version=3.3.2
Received: from localhost (localhost [127.0.0.1])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTP id BC7975DA97
	for <759@bugs.x2go.org>; Wed, 17 Feb 2016 18:10:58 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at ymir.das-netzwerkteam.de
Received: from ymir.das-netzwerkteam.de ([127.0.0.1])
	by localhost (ymir.das-netzwerkteam.de [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id dvsnwHWzpnxu for <759@bugs.x2go.org>;
	Wed, 17 Feb 2016 18:10:58 +0100 (CET)
X-Greylist: delayed 611 seconds by postgrey-1.34 at ymir.das-netzwerkteam.de; Wed, 17 Feb 2016 18:10:57 CET
Received: from mga04.intel.com (mga04.intel.com [192.55.52.120])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTP id E270B5DA95
	for <759@bugs.x2go.org>; Wed, 17 Feb 2016 18:10:57 +0100 (CET)
Received: from fmsmga003.fm.intel.com ([10.253.24.29])
  by fmsmga104.fm.intel.com with ESMTP; 17 Feb 2016 09:00:45 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.22,461,1449561600"; 
   d="scan'208";a="654275281"
Received: from mjmartin-mac01.wa.intel.com ([10.232.97.131])
  by FMSMGA003.fm.intel.com with ESMTP; 17 Feb 2016 09:00:45 -0800
Date: Wed, 17 Feb 2016 09:00:44 -0800 (PST)
From: Mat Martineau <mathew.j.martineau@linux.intel.com>
X-X-Sender: mjmartin@mjmartin-mac01.local
To: 759@bugs.x2go.org
Message-ID: <alpine.OSX.2.20.1602170821320.986@mjmartin-mac01.local>
User-Agent: Alpine 2.20 (OSX 67 2015-01-07)
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset=US-ASCII
I've run in to this problem as well, with these x2go versions:

Client (Mac)
 * x2goclient 4.0.5.0 (OS X 10.9+ build) or 4.0.5.1 preview (December 2015 
build)
 * OS X 10.11.3
 * XQuartz 2.7.8

Server (Linux)
 * x2goagent: 3.5.0.32
 * x2goserver: 4.0.1.19
 * x2goserver-extensions: 4.0.1.19
 * Fedora 23 (with updates as of 2016-02-17)

Steps to reproduce:
 1. Run 'x2goclient --debug' and open a session
 2. Observe frequent xmodmap commands while session is active
 3. Quit session to see a large number of SshProcess objects freed


This came to my attention because the default SELinux/audit settings on 
Fedora 23 log five events for each xmodmap ssh command executed on the 
server by the client. That's 1800 events per hour when an x2go session is 
active.

Judging from ONMainWindow::slotSetModMap() in onmainwindow.cpp, it looks 
like the intent is to only run the xmodmap command if kbMap is empty 
(maybe there's an expected way for kbMap to get cleared so it has to be 
periodically checked?). However, slotSetModMap() runs every 10 seconds and 
executes a command every time. It's not clear to me how kbMap becomes 
empty.

Furthermore, the SshProcess objects are not cleaned up until the session 
is exited. The 'processes' QList in SshMasterConnection grows without 
bound.

Logs from x2goclient --debug:

"""
x2go-DEBUG-../src/sshprocess.cpp:199> Executing remote command via 
SshProcess object 6: "export DISPLAY=":50"; echo "keycode   8 = a A aring 
Aring
<snip>"
x2go-DEBUG-../src/sshprocess.cpp:204> Running 
masterCon->addChannelConnection(this, 
'"d93c9f1a-2d4d-42fb-92a9-5373621768f6"', '"bash -c 'echo 
"X2GODATABEGIN:d93c9f1a-2d4d-42fb-92a9-5373621768f6"; export 
PATH="/usr/local/bin:/usr/bin:/bin"; export DISPLAY=":50"; echo "keycode 
8 = a A aring Aring
keycode   9 = s S ssharp Iacut"');
x2go-DEBUG-../src/sshmasterconnection.cpp:1284> Locking SSH channel 
connection MUTEX.
x2go-DEBUG-../src/sshmasterconnection.cpp:1286> Passing new channel 
conenction object to channelConnections.
x2go-DEBUG-../src/sshmasterconnection.cpp:1288> Unlocking SSH channel 
connection MUTEX.
x2go-DEBUG-../src/sshmasterconnection.cpp:1476> Creating new channel.

x2go-DEBUG-../src/sshmasterconnection.cpp:1480> New channel:0x7fcb9a7af450

x2go-DEBUG-../src/sshmasterconnection.cpp:1511> Executing remote: "bash -c 
'echo "X2GODATABEGIN:d93c9f1a-2d4d-42fb-92a9-5373621768f6"; export 
PATH="/usr/local/bin:/usr/bin:/bin"; export DISPLAY=":50"; echo "keycode 
8 = a A aring Aring
<snip>"
x2go-DEBUG-../src/sshmasterconnection.cpp:1534> New exec channel created.

x2go-DEBUG-../src/sshmasterconnection.cpp:1638> EOF on channel 
0x7fcb9a7af450; SshProcess object: 6
x2go-DEBUG-../src/sshmasterconnection.cpp:1706> EOF sent.
x2go-DEBUG-../src/sshmasterconnection.cpp:1710> Channel closed.
x2go-DEBUG-../src/sshprocess.cpp:517> SSH finished: raw output (stdout): 
"X2GODATABEGIN:d93c9f1a-2d4d-42fb-92a9-5373621768f6
X2GODATAEND:d93c9f1a-2d4d-42fb-92a9-5373621768f6
"
x2go-DEBUG-../src/sshprocess.cpp:528> SSH finished: true - "" (6).
<repeat every 10 seconds>
"""

And the log of SshProcess cleanup when the session is disconnected after a 
little over one minute:

"""
x2go-DEBUG-../src/sshmasterconnection.cpp:715> SshMasterConnection, 
instance SshMasterConnection(0x7fcb9cc51a90)  thread finished.
x2go-DEBUG-../src/sshprocess.cpp:52> SshProcess destructor called.
x2go-DEBUG-../src/sshprocess.cpp:52> SshProcess destructor called.
x2go-DEBUG-../src/sshprocess.cpp:52> SshProcess destructor called.
x2go-DEBUG-../src/sshprocess.cpp:52> SshProcess destructor called.
x2go-DEBUG-../src/sshprocess.cpp:52> SshProcess destructor called.
x2go-DEBUG-../src/sshprocess.cpp:52> SshProcess destructor called.
x2go-DEBUG-../src/sshprocess.cpp:52> SshProcess destructor called.
x2go-DEBUG-../src/sshprocess.cpp:52> SshProcess destructor called.
x2go-DEBUG-../src/sshprocess.cpp:52> SshProcess destructor called.
x2go-DEBUG-../src/sshmasterconnection.cpp:722> SshMasterConnection, 
instance SshMasterConnection(0x7fcb9cc51a90)  finished destructor. 
"""

--
Mat Martineau
Intel OTC

Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Thu Nov 21 15:16:18 2024; 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.