[X2Go-Dev] Bug#888: x2gocleansessions suspends resuming sessions
Florian Wicke - Hetzner Online AG
florian.wicke at hetzner.de
Thu Jun 18 08:33:46 CEST 2015
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 at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.x2go.org/pipermail/x2go-dev/attachments/20150618/9db42fda/attachment.pgp>
More information about the x2go-dev
mailing list