Bug 1754220

Summary: x2gocleansessions kills user desktop shortly after login (~20 secs)
Product: [Fedora] Fedora Reporter: Gregory Lee Bartholomew <gregory.lee.bartholomew>
Component: x2goserverAssignee: Orion Poplawski <orion>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 30CC: orion
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=1409
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-26 17:13:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Gregory Lee Bartholomew 2019-09-21 22:07:05 UTC
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

How reproducible:


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
ExecStart=/usr/sbin/x2gocleansessions -d
# 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;

Comment 1 Orion Poplawski 2019-09-22 23:07:28 UTC
Filed upstream

Comment 2 Gregory Lee Bartholomew 2019-09-23 03:27:39 UTC
Thanks. I've been running with this patch for a while now and it is working great. That other bug report was a false lead though. It probably shouldn't have been included in the upstream filing.

Comment 3 Ben Cotton 2020-04-30 21:05:12 UTC
This message is a reminder that Fedora 30 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '30'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 30 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Ben Cotton 2020-05-26 17:13:01 UTC
Fedora 30 changed to end-of-life (EOL) status on 2020-05-26. Fedora 30 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.