Bug 1754220 - x2gocleansessions kills user desktop shortly after login (~20 secs)
Summary: x2gocleansessions kills user desktop shortly after login (~20 secs)
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: x2goserver
Version: 30
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Orion Poplawski
QA Contact: Fedora Extras Quality Assurance
URL: https://bugs.x2go.org/cgi-bin/bugrepo...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-21 22:07 UTC by Gregory Lee Bartholomew
Modified: 2020-05-26 17:13 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-26 17:13:01 UTC
Type: Bug


Attachments (Terms of Use)

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
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;
 	}

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
bug.

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


Note You need to log in before you can comment on or make changes to this bug.