Bug 1583793

Summary: F28 KDE spin - KDE logout hangs indefinitely
Product: [Fedora] Fedora Reporter: Iestyn Elfick <isedev>
Component: sddmAssignee: Martin Bříza <mbriza>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: charliebergren, extras-qa, fredcwells, hudson.ra, jgrulich, mbriza, me, pierluigi.fiorini, rdieter, x-kin
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
URL: https://github.com/sddm/sddm/issues/1034
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1725933 (view as bug list) Environment:
Last Closed: 2019-05-28 19:04:28 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:
Embargoed:

Description Iestyn Elfick 2018-05-29 17:28:10 UTC
Description of problem:

Following a fresh install of Fedora 28, KDE logout hangs indefinitely. Issue persists after a full package upgrade (except kernel*).

Version-Release number of selected component (if applicable): 0.17.0-2 and 0.17.0-3

How reproducible:

I am satisfied it is a timing issue, so mileage may vary.

Steps to Reproduce:
1. Install F28 KDE spin to disk
2. Update packages (dnf update -x kernel*)
3. Login to KDE, do stuff, logout.

Actual results:
Logout hangs indefinitely

Expected results:
Logout completed and SDDM greeter is restarted.

Additional info:

After logout, sddm-helper process is still running even though startkde script has terminated. It leaves a bunch of other session processes active too.

Same results after rebuilding sddm package from source.

After applying patch:
--- sddm-0.17.0-old/src/helper/HelperApp.cpp    2017-12-05 16:00:16.000000000 +0000
+++ sddm-0.17.0-new/src/helper/HelperApp.cpp    2018-05-29 16:49:44.270509954 +0100
@@ -235,6 +235,7 @@
     }

     void HelperApp::sessionOpened(bool success) {
+       qInfo() << "HelperApp::sessionOpened: enter";
         Msg m = Msg::MSG_UNKNOWN;
         SafeDataStream str(m_socket);
         str << Msg::SESSION_STATUS << success;
@@ -244,6 +245,7 @@
         if (m != SESSION_STATUS) {
             qCritical() << "Received a wrong opcode instead of SESSION_STATUS:" << m;
         }
+       qInfo() << "HelperApp::sessionOpened: exit";
     }

     UserSession *HelperApp::session() {

Messages after logout has hung contain only "HelperApp::sessionOpened: enter" (i.e. not the exit message).

Applying additional patch:
--- sddm-0.17.0-old/src/auth/Auth.cpp   2017-12-05 16:00:16.000000000 +0000
+++ sddm-0.17.0-new/src/auth/Auth.cpp   2018-05-29 17:07:06.315543046 +0100
@@ -191,11 +191,13 @@
                 break;
             }
             case SESSION_STATUS: {
+               qInfo() << "Auth::Private::dataPending: rx SESSION_STATUS";
                 bool status;
                 str >> status;
                 Q_EMIT auth->session(status);
                 str.reset();
                 str << SESSION_STATUS;
+               qInfo() << "Auth::Private::dataPending: tx SESSION_STATUS";
                 str.send();
                 break;
             }

Messages still only show "HelperApp::sessionOpened: enter".

Applying patch:
--- sddm-0.17.0-old/src/auth/Auth.cpp   2017-12-05 16:00:16.000000000 +0000
+++ sddm-0.17.0-new/src/auth/Auth.cpp   2018-05-29 17:16:18.476962930 +0100
@@ -163,6 +163,7 @@
                 break;
             }
             case INFO: {
+               qInfo() << "Auth::Private::dataPending: rx INFO";
                 QString message;
                 Info type = INFO_NONE;
                 str >> message >> type;
@@ -176,6 +177,7 @@
                 break;
             }
             case AUTHENTICATED: {
+               qInfo() << "Auth::Private::dataPending: rx AUTHENTICATED";
                 QString user;
                 str >> user;
                 if (!user.isEmpty()) {
@@ -183,6 +185,7 @@
                     Q_EMIT auth->authentication(user, true);
                     str.reset();
                     str << AUTHENTICATED << environment << cookie;
+                   qInfo() << "Auth::Private::dataPending: tx AUTHENTICATED";
                     str.send();
                 }
                 else {
@@ -191,11 +194,13 @@
                 break;
             }
             case SESSION_STATUS: {
+               qInfo() << "Auth::Private::dataPending: rx SESSION_STATUS";
                 bool status;
                 str >> status;
                 Q_EMIT auth->session(status);
                 str.reset();
                 str << SESSION_STATUS;
+               qInfo() << "Auth::Private::dataPending: tx SESSION_STATUS";
                 str.send();
                 break;
             }

Now logout succeeds, sddm-helper terminates and fresh greeter displayed. Log show:
May 29 17:18:33 localhost.localdomain sddm[12507]: Auth::Private::dataPending: rx INFO
May 29 17:18:33 localhost.localdomain sddm[12507]: Authentication information: "Last failed login: Tue May 29 16:53:13 BST 2018"
May 29 17:18:33 localhost.localdomain sddm[12507]: Auth::Private::dataPending: rx INFO
May 29 17:18:33 localhost.localdomain sddm[12507]: Authentication information: "There were 12 failed login attempts since the last successful login."
May 29 17:18:33 localhost.localdomain sddm-helper[12590]: Starting: "/etc/X11/xinit/Xsession \"/usr/bin/startkde\""
May 29 17:18:33 localhost.localdomain sddm-helper[12590]: HelperApp::sessionOpened: enter
May 29 17:18:33 localhost.localdomain sddm[12507]: Auth::Private::dataPending: rx SESSION_STATUS
May 29 17:18:33 localhost.localdomain sddm[12507]: Auth::Private::dataPending: tx SESSION_STATUS
May 29 17:18:33 localhost.localdomain sddm-helper[12590]: HelperApp::sessionOpened: exit

Restoring the original Auth.cpp and apply the following patch:
--- sddm-0.17.0-old/src/auth/Auth.cpp   2017-12-05 16:00:16.000000000 +0000
+++ sddm-0.17.0-new/src/auth/Auth.cpp   2018-05-29 17:24:37.965392094 +0100
@@ -191,6 +191,7 @@
                 break;
             }
             case SESSION_STATUS: {
+               usleep(1000);
                 bool status;
                 str >> status;
                 Q_EMIT auth->session(status);

Same result, logout works as above.

All indications point to timing issue, although it is way beyond me to figure where and how. I can only hope the big boys can get to the bottom of it.

Comment 1 Iestyn Elfick 2018-05-29 17:28:54 UTC
Also reported here: https://github.com/sddm/sddm/issues/1034

Comment 2 Rex Dieter 2018-05-29 18:14:54 UTC
Thanks for the upstream bug report, that's the best place to address this.

Comment 3 Raphael Groner 2018-05-30 17:36:18 UTC
** Please ignore this comment. Test for External Bug Tracker GitHub.

Comment 4 Alexander 2019-04-24 15:57:10 UTC
I see this in 29 and 30 beta.
After installing 29 from spin, I created additional users with "useradd" and System Settings. They logout into black screen. After killing sddm-helper, sddm-greater is showing (but some user's processes continue working).
I've installed 30 beta with updates, and at first time didn't see the problem. I thought it good. But after changing SDDM and appearance themes to Breeze, I got this issue again.
First administrator's account, that created during installation, had logout good.
And now, in 29, I changed SDDM theme to Fedora default, my first account can't logout too as other users.
My hardware is easy - Intel-based PC, SSD, without graphics card.

Comment 5 Ben Cotton 2019-05-02 19:18:02 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. 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 '28'.

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 28 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 6 Ben Cotton 2019-05-02 19:39:46 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. 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 '28'.

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 28 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 7 Fred Wells 2019-05-13 21:34:26 UTC
I've been experiencing this issue for some time, going back to F28 at least.   Happens with F29 and now even much more frequently with F30.
As this has been reported for 30 by others as well, can we please change the version to 30?

Comment 8 Ben Cotton 2019-05-28 19:04:28 UTC
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 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.

Comment 9 Charlie Bergren 2019-10-18 00:52:47 UTC
This is definitely a present issue in Fedora 30 stable, with Gnome & Xorg installed.  I'll link from sddm github.

Comment 10 Ronald Hudson 2022-05-06 20:53:54 UTC
This issue is present in Fedora KDE 35. 

The SDDM bugtracker listed above is closed   They are pointing at issues in KDE. This did not happen in Kubuntu tho.

Last workaround I have seen is "Don't logout, reboot instead"

Comment 11 Ronald Hudson 2022-05-06 20:55:31 UTC
(In reply to Fred Wells from comment #7)
> I've been experiencing this issue for some time, going back to F28 at least.
> Happens with F29 and now even much more frequently with F30.
> As this has been reported for 30 by others as well, can we please change the
> version to 30?

Version 35... also seeing this.

Comment 12 Red Hat Bugzilla 2023-09-15 01:27:17 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 365 days