X2Go Bug report logs - #1409
Fwd: [Bug 1754220] New: x2gocleansessions kills user desktop shortly after login (~20 secs)

version graph

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

Reported by: Orion Poplawski <orion@nwra.com>

Date: Sun, 22 Sep 2019 22:55:02 UTC

Severity: normal

Tags: patch

Found in version 4.1.0.3

Full log


Message #5 received at submit@bugs.x2go.org (full text, mbox, reply):

Received: (at submit) by bugs.x2go.org; 22 Sep 2019 22:52:04 +0000
From orion@nwra.com  Mon Sep 23 00:52:00 2019
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,SPF_HELO_NONE,
	URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2
Received: from mail.nwra.com (mail.nwra.com [72.52.192.72])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id 455B35DAC1
	for <submit@bugs.x2go.org>; Mon, 23 Sep 2019 00:51:56 +0200 (CEST)
Received: from rufous.cora.nwra.com (c-67-166-25-97.hsd1.co.comcast.net [67.166.25.97])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client did not present a certificate)
	by mail.nwra.com (Postfix) with ESMTPSA id B2DFA3403AF
	for <submit@bugs.x2go.org>; Sun, 22 Sep 2019 15:51:54 -0700 (PDT)
Subject: Fwd: [Bug 1754220] New: x2gocleansessions kills user desktop shortly
 after login (~20 secs)
References: <bug-1754220-140047@https.bugzilla.redhat.com/>
To: submit@bugs.x2go.org
From: Orion Poplawski <orion@nwra.com>
Organization: NorthWest Research Associates
X-Forwarded-Message-Id: <bug-1754220-140047@https.bugzilla.redhat.com/>
Message-ID: <5935c822-366f-dbbf-2c34-10160529c2b5@nwra.com>
Date: Sun, 22 Sep 2019 16:51:51 -0600
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
 Thunderbird/60.9.0
MIME-Version: 1.0
In-Reply-To: <bug-1754220-140047@https.bugzilla.redhat.com/>
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="------------ms000008030400000905090002"
[Message part 1 (text/plain, inline)]
Package: x2goserver
Version: 4.1.0.3
Tags: patch


-------- Forwarded Message --------
Subject: [Bug 1754220] New: x2gocleansessions kills user desktop shortly 
after login (~20 secs)
Date: Sat, 21 Sep 2019 22:07:05 +0000
From: bugzilla@redhat.com
To: orion@nwra.com

https://bugzilla.redhat.com/show_bug.cgi?id=1754220

            Bug ID: 1754220
           Summary: x2gocleansessions kills user desktop shortly after
                    login (~20 secs)
           Product: Fedora
           Version: 30
            Status: NEW
         Component: x2goserver
          Assignee: orion@nwra.com
          Reporter: gregory.lee.bartholomew@gmail.com
        QA Contact: extras-qa@fedoraproject.org
                CC: orion@nwra.com
  Target Milestone: ---
    Classification: Fedora



Description of problem:

Randomly, user sessions are booted after logging in. Usually a stable
connection can be acquired after a few retries.

Version-Release number of selected component (if applicable):

# rpm -q x2goserver
x2goserver-4.1.0.3-3.fc30.x86_64

How reproducible:

Randomly

Steps to Reproduce:

1. Login and wait 20 to 30 seconds (I was using LXDE and occasionally 
running
"sudo -i" in a terminal, but I don't think that is necessary to trigger the
bug).

Actual results:

Session killed shortly after logging in.

Expected results:

Session should not be killed.

Additional info:

To troubleshoot this issue, I did the following:

# mkdir /etc/systemd/system/x2gocleansessions.service.d
# cat << END > /etc/systemd/system/x2gocleansessions.service.d/override.conf
[Service]
Type=simple
ExecStart=
ExecStart=/usr/sbin/x2gocleansessions -d
END
# systemctl daemon-reload
# systemctl restart x2gocleansessions.service

After sprinkling /usr/sbin/x2gocleansessions with printf statements and
x2gocleansessions.service a few times, I eventually traced the problem 
down to
check_pid() being called with a NULL value for $pid (not sure why; seems 
to be
some sort of race condition). The following patch seems to resolve the 
issue.

--- x2gocleansessions.a 2019-09-21 16:46:53.327948763 -0500
+++ x2gocleansessions.b 2019-09-21 16:46:10.076184475 -0500
@@ -62,7 +62,7 @@
        my $pid=shift;
        my $sess=shift;
        my $sec=shift;
-       if ($sec < 30)
+       if (!$pid || $sec < 30)
        {
                return 1;
        }

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.

[smime.p7s (application/pkcs7-signature, attachment)]

Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Tue Jul 14 20:18:30 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.