X2Go Bug report logs - #888
x2gocleansessions suspends resuming sessions

version graph

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

Reported by: Florian Wicke - Hetzner Online AG <florian.wicke@hetzner.de>

Date: Thu, 18 Jun 2015 06:35:01 UTC

Severity: normal

Tags: pending

Found in version 4.1.0.0-0~1281~ubuntu14.04.1

Fixed in version 4.0.1.20

Done: X2Go Release Manager <git-admin@x2go.org>

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#888: x2gocleansessions suspends resuming sessions
Reply-To: Florian Wicke - Hetzner Online AG <florian.wicke@hetzner.de>, 888@bugs.x2go.org
Resent-From: Florian Wicke - Hetzner Online AG <florian.wicke@hetzner.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: Thu, 18 Jun 2015 06:35:01 +0000
Resent-Message-ID: <handler.888.B.143460919130609@bugs.x2go.org>
Resent-Sender: owner@bugs.x2go.org
X-X2Go-PR-Message: report 888
X-X2Go-PR-Package: x2goserver
X-X2Go-PR-Keywords: 
Received: via spool by submit@bugs.x2go.org id=B.143460919130609
          (code B); Thu, 18 Jun 2015 06:35:01 +0000
Received: (at submit) by bugs.x2go.org; 18 Jun 2015 06:33:11 +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.0 required=5.0 tests=BAYES_40,URIBL_BLOCKED
	autolearn=ham version=3.3.2
Received: from mail.hetzner.company (mail.hetzner.company [213.133.106.242])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id F377E5DA82
	for <submit@bugs.x2go.org>; Thu, 18 Jun 2015 08:33:08 +0200 (CEST)
Received: from [78.46.134.130] (helo=[10.200.1.57])
	by mail.hetzner.company with esmtpsa (TLSv1.2:DHE-RSA-AES256-SHA:256)
	(Exim 4.80)
	(envelope-from <florian.wicke@hetzner.de>)
	id 1Z5TPM-0001wz-EF
	for submit@bugs.x2go.org; Thu, 18 Jun 2015 08:34:40 +0200
Message-ID: <5582664A.90506@hetzner.de>
Date: Thu, 18 Jun 2015 08:33:46 +0200
From: Florian Wicke - Hetzner Online AG <florian.wicke@hetzner.de>
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0
MIME-Version: 1.0
To: submit@bugs.x2go.org
Content-Type: multipart/signed; micalg=pgp-sha512;
 protocol="application/pgp-signature";
 boundary="1pQI40pEDqomWNBbxDQiGF2JXbb57bF0u"
X-Authenticated-Sender: florian.wicke@hetzner.de
[Message part 1 (text/plain, inline)]
Package: x2goserver
Version: 4.1.0.0-0~1281~ubuntu14.04.1

Current workflow of x2gocleansessions:

- read the sessions from database
- loop over this session list
-> check state of session (S,R,...)
-> if state S (suspended) check if session is running
-> if the session that should be suspended in the datase is running then
suspend the session


Unfortunately this leads to the following problem:
If you have many sessions the time between generating the session list
from the database and the "is_running"-checks of sessions at the end of
the list is enough as time window that a user can log in via x2goclient
and getting logged out because x2gocleansessions suspends the now
running/resumed session.

Suggestions to fix:
Reread the state of the session from the database on each iteration of
the session-list-loop to minimize the timeframe between database read
and check execution and use counters like "the check has to be the same
result for the last three "sleep 2"-big-loop-runs of x2gocleansessions"
because the extra seconds don't matter in a valid case of unsuspended
sessions but matter a lot to fix this bug.




-- 
Kind regards

 Florian Wicke

Hetzner Online AG
Industriestr. 25
91710 Gunzenhausen / Germany
Tel: +49 9831 505-187
Fax: +49 9831 505-387
florian.wicke@hetzner.de
www.hetzner.com

Register Court: Registergericht Ansbach, HRB 3204
Management Board: Dipl. Ing. (FH) Martin Hetzner
Chairwoman of the Supervisory Board: Diana Rothhan

[signature.asc (application/pgp-signature, attachment)]

Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Fri Apr 19 11:06:55 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.