Bug 1373169 - Can't login again after logout.
Summary: Can't login again after logout.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-session
Version: 25
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ray Strode [halfline]
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: AcceptedBlocker
: 1366896 1376590 1379545 (view as bug list)
Depends On:
Blocks: F25BetaBlocker
TreeView+ depends on / blocked
 
Reported: 2016-09-05 12:12 UTC by pavel raur
Modified: 2017-03-06 09:01 UTC (History)
16 users (show)

Fixed In Version: gdm-3.22.0-2.fc25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-23 16:25:10 UTC
Type: Bug


Attachments (Terms of Use)
journalctl -b -1 (332.41 KB, text/x-vhdl)
2016-09-05 12:12 UTC, pavel raur
no flags Details
packages on my pc (46.52 KB, text/plain)
2016-09-06 07:35 UTC, pavel raur
no flags Details
Some logs from journal as requested by Michael Catanzaro in comment #7 (4.70 KB, text/plain)
2016-09-12 13:07 UTC, Christian Stadelmann
no flags Details
journal during relogin attempt (10.72 KB, text/plain)
2016-09-13 08:32 UTC, Kamil Páral
no flags Details
rpm -qa for comment 16 (50.08 KB, text/plain)
2016-09-13 08:34 UTC, Kamil Páral
no flags Details


Links
System ID Priority Status Summary Last Updated
GNOME Bugzilla 771786 Normal RESOLVED wayland-session: don't start new session with stale session env vars 2020-01-31 21:10:34 UTC

Description pavel raur 2016-09-05 12:12:16 UTC
Created attachment 1197916 [details]
journalctl -b -1

Description of problem:
After logout can't login again on same user. I used standard gnome logout and login. I have only one user, so I didn't try to login on someone else.

Version-Release number of selected component (if applicable):
gnome-session-3.21.90-1.fc25.x86_64
gdm-3.21.91-2.fc25.x86_64
systemd-231-4.fc25.x86_64

How reproducible:
always

Steps to Reproduce:
1.Logout
2.Login again

Actual results:
Login screen will display again.

Expected results:
Desktop should appear.

Additional info:
Wrong password is detected normally.

Comment 1 pavel raur 2016-09-05 12:29:48 UTC
I propose this as beta blocker because it violates criteria:

Shutting down, logging out and rebooting must work using standard console commands and the mechanisms offered (if any) by all release-blocking desktops.

Comment 2 pavel raur 2016-09-06 07:35:13 UTC
Created attachment 1198104 [details]
packages on my pc

Comment 3 pavel raur 2016-09-06 11:27:23 UTC
I tried it again with more user. Every user that logged out couldn't login again. So every user could login only once, to login again must reboot.

Comment 4 Amit Agarwl 2016-09-09 12:33:15 UTC
In my case, I cannot logout. Clicking logout does not do anything.

Comment 5 Michael Catanzaro 2016-09-10 03:06:10 UTC
Definitely something wrong with gnome-session. It's spewing a bajillion criticals in that log, but I think that is probably a different bug. gnome-session spits a bunch of criticals whenever it presents the log out dialog; it doesn't seem to break anything. This looks like a different problem:

acct="pavel" exe="/usr/libexec/gdm-session-worker" hostname=? addr=? terminal=/dev/tty2 res=success'
zář 05 13:33:37 dhcp-28-138.brq.redhat.com audit[2731]: USER_LOGIN pid=2731 uid=0 auid=1000 ses=4 subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 msg='uid=1000 exe="/usr/libexec/gdm-session-worker" hostname=? addr=? terminal=? res=success'
zář 05 13:33:38 dhcp-28-138.brq.redhat.com gnome-session[2753]: Unable to init server: Nelze se připojit: Connection refused
zář 05 13:33:38 dhcp-28-138.brq.redhat.com gnome-session-c[2757]: cannot open display: :0
zář 05 13:33:38 dhcp-28-138.brq.redhat.com gnome-session[2753]: Unable to init server: Nelze se připojit: Connection refused
zář 05 13:33:38 dhcp-28-138.brq.redhat.com gnome-session-c[2758]: cannot open display: :0
zář 05 13:33:38 dhcp-28-138.brq.redhat.com gnome-session[2753]: gnome-session-binary[2753]: WARNING: software acceleration check failed: Proces potomka skončil s kódem 1
zář 05 13:33:38 dhcp-28-138.brq.redhat.com gnome-session-binary[2753]: WARNING: software acceleration check failed: Proces potomka skončil s kódem 1
zář 05 13:33:38 dhcp-28-138.brq.redhat.com gnome-session[2753]: Unable to init server: Nelze se připojit: Connection refused
zář 05 13:33:38 dhcp-28-138.brq.redhat.com gnome-session-f[2759]: Nelze otevřít displej: 
zář 05 13:33:38 dhcp-28-138.brq.redhat.com gdm-password][2731]: pam_unix(gdm-password:session): session closed for user pavel

"Software acceleration check failed." Ouch, so our GL helpers (which had some major changes this cycle) not only think you have no hardware acceleration support (what's your graphics hardware?), but no way it can run llvmpipe either? Obviously that's wrong, or you wouldn't have been able to log in the first time.

Next step would be to get a log with more debug spew. I hesitate to tell you to edit a file owned by RPM, but it's the easiest way: please add

export GNOME_SESSION_DEBUG=1

to /usr/bin/gnome-session (it's a shell script) and get another journal log.

Comment 6 Michael Catanzaro 2016-09-10 03:07:06 UTC
(In reply to Amit Agarwl from comment #4)
> In my case, I cannot logout. Clicking logout does not do anything.

You've got a totally different issue, so please file a different bug.

Comment 7 Michael Catanzaro 2016-09-10 03:11:37 UTC
(In reply to Michael Catanzaro from comment #5) 
> Next step would be to get a log with more debug spew. I hesitate to tell you
> to edit a file owned by RPM, but it's the easiest way: please add
> 
> export GNOME_SESSION_DEBUG=1
> 
> to /usr/bin/gnome-session (it's a shell script) and get another journal log.

Also, please run the GL helpers manually and see what happens:

$ /usr/libexec/gnome-session-check-accelerated-gl-helper --print-renderer

$ /usr/libexec/gnome-session-check-accelerated-gles-helper --print-renderer

I guess one or the other might be failing the second time you log in.

Comment 8 Christian Stadelmann 2016-09-12 13:02:57 UTC
*** Bug 1366896 has been marked as a duplicate of this bug. ***

Comment 9 Christian Stadelmann 2016-09-12 13:07:20 UTC
Created attachment 1200206 [details]
Some logs from journal as requested by Michael Catanzaro in comment #7

I've been seeing this issue too for a very long time. It only appears on wayland as far as I can tell.

Reliable workaround which worked almost all times:
After logging out, run `killall -u username -SIGTERM` on the user you just logged out.

Please have a look at a duplicate of this one at bug #1366896.

Some annotations to the file attached:

"Verbindung ist gescheitert" translates to "Connection failed"

"Der Kindprozess wurde mit Status 1 beendet" translates to "Child process was exited with status 1"

"Anzeige kann nicht geöffnet werden" translates to "Display cannot be opened"


Additional info:
This crasher could be caused by some GUI applications not exiting when the compositor exits or dies so the socket(?) gnome-shell tries to use for its wayland compositor already exists.
I think this bug is a result of bug #1366897.

Comment 10 Christian Stadelmann 2016-09-12 13:19:19 UTC
(In reply to Michael Catanzaro from comment #6)
> (In reply to Amit Agarwl from comment #4)
> > In my case, I cannot logout. Clicking logout does not do anything.
> 
> You've got a totally different issue, so please file a different bug.

You might be running into https://bugzilla.redhat.com/show_bug.cgi?id=1366775 which delays logout for like 30 seconds.

Comment 11 Chris Murphy 2016-09-12 18:04:30 UTC
I have no idea if it's related but definitely previous sessions are not getting killed off on logout.
[chris@localhost ~]$ sudo loginctl
   SESSION        UID USER             SEAT            
         8       1000 chris            seat0           
        c1         42 gdm              seat0           
         6          0 root             seat0           
         2       1000 chris            seat0           

4 sessions listed.


The first time I login, is session 2, but I can log back in right away, this creates session 8. Note that Fedora 25 /etc/systemd/logind.conf default is #KillUserProcesses=no so on logout the sessions are not being killed off by systemd.

Comment 12 Christian Stadelmann 2016-09-12 20:20:52 UTC
(In reply to Chris Murphy from comment #11)
> I have no idea if it's related but definitely previous sessions are not
> getting killed off on logout.

Same here. Old session is not closed when this bug occurs.

Comment 13 Michael Catanzaro 2016-09-12 23:15:38 UTC
(In reply to Michael Catanzaro from comment #7)
> Also, please run the GL helpers manually and see what happens:
> 
> $ /usr/libexec/gnome-session-check-accelerated-gl-helper --print-renderer
> 
> $ /usr/libexec/gnome-session-check-accelerated-gles-helper --print-renderer
> 
> I guess one or the other might be failing the second time you log in.

Ah, these helpers don't work at all in Wayland. They're hardcoded to return TRUE when XDG_SESSION_DESKTOP=gnome-wayland, but that probably doesn't work for the gdm session.

Comment 14 Geoffrey Marr 2016-09-13 00:42:42 UTC
Discussed during the 2016-09-12 blocker review meeting: [1]

The decision to delay the classification of this as a bug was made as there are several people still actively testing this bug, and their results are critical to the correct classification of this.

[1] https://meetbot.fedoraproject.org/fedora-blocker-review/2016-09-12/f25-blocker-review.2016-09-12-16.01.txt

Comment 15 Amit Agarwl 2016-09-13 04:11:21 UTC
(In reply to Christian Stadelmann from comment #10)
> (In reply to Michael Catanzaro from comment #6)
> > (In reply to Amit Agarwl from comment #4)
> > > In my case, I cannot logout. Clicking logout does not do anything.
> > 
> > You've got a totally different issue, so please file a different bug.
> 
> You might be running into
> https://bugzilla.redhat.com/show_bug.cgi?id=1366775 which delays logout for
> like 30 seconds.

Thanks for the pointer, I will check that and if that does not help then I was raise a new bug.

Comment 16 Kamil Páral 2016-09-13 08:32:22 UTC
Created attachment 1200387 [details]
journal during relogin attempt

Fresh logs here. This is journal output between logging out (10:22:44) and trying to re-login (10:22:58 and later). Please note:

Sep 13 10:22:45 f25 org.gnome.Shell.desktop[1280]: could not connect to wayland server
Sep 13 10:22:45 f25 org.gnome.Shell.desktop[1280]: (EE)
Sep 13 10:22:45 f25 org.gnome.Shell.desktop[1280]: Fatal server error:
Sep 13 10:22:45 f25 org.gnome.Shell.desktop[1280]: (EE) Couldn't add screen
Sep 13 10:22:45 f25 org.gnome.Shell.desktop[1280]: (EE)

Sep 13 10:23:01 f25 gnome-session[1889]: Unable to init server: Could not connect: Connection refused
Sep 13 10:23:01 f25 gnome-session-c[1894]: cannot open display: :0
Sep 13 10:23:01 f25 gnome-session[1889]: Unable to init server: Could not connect: Connection refused
Sep 13 10:23:01 f25 gnome-session-c[1895]: cannot open display: :0
Sep 13 10:23:01 f25 gnome-session[1889]: gnome-session-binary[1889]: WARNING: software acceleration check failed: Child process exited with code 1
Sep 13 10:23:01 f25 gnome-session-binary[1889]: WARNING: software acceleration check failed: Child process exited with code 1
Sep 13 10:23:01 f25 gnome-session[1889]: Unable to init server: Could not connect: Connection refused
Sep 13 10:23:01 f25 gnome-session-f[1896]: Cannot open display: 
Sep 13 10:23:01 f25 gnome-shell[990]: Could not release device 13,68: GDBus.Error:org.freedesktop.login1.DeviceNotTaken: Device not taken
Sep 13 10:23:01 f25 gdm-password][1868]: pam_unix(gdm-password:session): session closed for user kparal

Sep 13 10:23:01 f25 gnome-shell[990]: Could not open device /dev/input/event4: GDBus.Error:org.freedesktop.login1.DeviceIsTaken: Device already taken

Comment 17 Kamil Páral 2016-09-13 08:34:39 UTC
Created attachment 1200402 [details]
rpm -qa for comment 16

Comment 18 Giulio 'juliuxpigface' 2016-09-15 20:48:19 UTC
*** Bug 1376590 has been marked as a duplicate of this bug. ***

Comment 19 Christian Stadelmann 2016-09-16 16:41:28 UTC
Some of these crashes various people above have listed have these lines in common:

org.gnome.Shell.desktop[1577]: could not connect to wayland server
org.gnome.Shell.desktop[1577]: (EE)
org.gnome.Shell.desktop[1577]: Fatal server error:
org.gnome.Shell.desktop[1577]: (EE) Couldn't add screen
org.gnome.Shell.desktop[1577]: (EE)

I'm also seeing these lines on a crash right AFTER login where my system immediately suspends after logging in. When unsuspending, my desktop session is running but I have to unlock the screen, see bug #1293137.

Also, these lines are in an upstream bug happening during using the session, not at login: https://bugzilla.gnome.org/show_bug.cgi?id=760179

I don't know if any of these are related, but the fatal server error should not happen.

Comment 20 Petr Schindler 2016-09-19 16:33:20 UTC
Discussed at 2016-09-19 blocker review meeting: [1]. 

This bug was accepted as Beta blocker: this constitutes a violation of "Shutting down, logging out and rebooting must work using standard console commands and the mechanisms offered (if any) by all release-blocking desktops." - 'work' is defined as "Logging out must return the user to the environment from which they logged in, working as expected.", and if you can't log in again, it's not 'working as expected'

[1] https://meetbot-raw.fedoraproject.org/fedora-blocker-review/2016-09-19/

Comment 21 Ray Strode [halfline] 2016-09-21 20:38:19 UTC
================================================================================
     gdm-3.22.0-2.fc25
================================================================================
  Update ID: FEDORA-2016-facc32c503
    Release: Fedora 25
     Status: pending
       Type: bugfix
      Karma: 0
   Critpath: True
    Request: testing
       Bugs: 1373169 - None
      Notes: Fix log in after log out
  Submitter: rstrode
  Submitted: 2016-09-21 20:15:06.170906
   Comments: bodhi - 2016-09-21 20:15:06.200592 (karma 0)
             This update has been submitted for testing by rstrode.

  https://bodhi.fedoraproject.org/updates/FEDORA-2016-facc32c503

Comment 22 Kamil Páral 2016-09-22 09:04:42 UTC
(In reply to Ray Strode [halfline] from comment #21)
>      gdm-3.22.0-2.fc25

Seems to fix this.

Comment 23 Fedora Update System 2016-09-22 09:54:40 UTC
gdm-3.22.0-2.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-facc32c503

Comment 24 Christian Stadelmann 2016-09-22 20:27:30 UTC
(In reply to Kamil Páral from comment #22)
> (In reply to Ray Strode [halfline] from comment #21)
> >      gdm-3.22.0-2.fc25
> 
> Seems to fix this.

It does not for me.

Steps to reproduce:
1. log in into a gnome session (tested with wayland, dunno if X11 works the same)
2. SAK (Alt+SysRq+K), twice due to another bug: https://bugzilla.gnome.org/show_bug.cgi?id=771548
3. try to login again

What happens:
Immediately send back to gdm

Additional info:
I think this bug is only happening if a gnome-session didn't exit cleanly before which was the case with bug #1366775.

Affected software versions (updated, then rebooted, then tested):
gnome-shell 3.21.92-1.fc25
gdm 3.22.0-2.fc25

Comment 25 Kamil Páral 2016-09-23 08:46:38 UTC
(In reply to Christian Stadelmann from comment #24)
> It does not for me.
> 
> Steps to reproduce:
> 1. log in into a gnome session (tested with wayland, dunno if X11 works the
> same)
> 2. SAK (Alt+SysRq+K), twice due to another bug:
> https://bugzilla.gnome.org/show_bug.cgi?id=771548
> 3. try to login again

Logging in after a proper logout is a bit different scenario than logging in after session crashed (or even when you kill all processes for a given VT). Hopefully the former scenario will be more frequent. I think these two cases should be separated (please file a new bug for "login after session crash", and also try with loginctl terminate-session/kill-session, not just Alt+SysRq+K).

Does the standard case of properly logging out and then logging back in work for you?

Comment 26 Christian Stadelmann 2016-09-23 08:59:23 UTC
(In reply to Kamil Páral from comment #25)
> Does the standard case of properly logging out and then logging back in work
> for you?

Yes, and it always has unless the session exited with issues (e.g. gnome-settings-daemon not responding due to bug #1366775 or gnome-shell crashing due to any other probably wayland-related bug). I think this issue never has been about logging in after a clean logout, because there were so many cases where logout would fail. I think that the bug reporter and anybody reproducing this issue probably just ran into a bug which caused the session to not exit cleanly, so nobody reproducing the bug had a clean logout.

> (In reply to Christian Stadelmann from comment #24)
> > It does not for me.
> > 
> > Steps to reproduce:
> > 1. log in into a gnome session (tested with wayland, dunno if X11 works the
> > same)
> > 2. SAK (Alt+SysRq+K), twice due to another bug:
> > https://bugzilla.gnome.org/show_bug.cgi?id=771548
> > 3. try to login again
> 
> Logging in after a proper logout is a bit different scenario than logging in
> after session crashed (or even when you kill all processes for a given VT).
> Hopefully the former scenario will be more frequent. I think these two cases
> should be separated (please file a new bug for "login after session crash",
> and also try with loginctl terminate-session/kill-session, not just
> Alt+SysRq+K).

I'll wait for your answer on the stuff above before reporting a new bug.

Comment 27 Kamil Páral 2016-09-23 12:53:10 UTC
Pavel Raur was an intern in our office, this issue was really just about logging out (which seemed to complete successfully, you could have immediately logged into an X11 session), and the inability to log back into a wayland session.

Comment 28 Fedora Update System 2016-09-23 16:25:10 UTC
gdm-3.22.0-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 29 Christian Stadelmann 2016-09-26 10:25:12 UTC
Ok, I've reported the problem I'm running in (see comment #24 and later) to https://bugzilla.gnome.org/show_bug.cgi?id=771985

Comment 30 Ray Strode [halfline] 2016-09-27 21:08:49 UTC
*** Bug 1379545 has been marked as a duplicate of this bug. ***

Comment 31 Q 2017-02-06 04:10:10 UTC
I just experienced this issue. 

Issue occurred after installing kde dekstop to the standard fedora workstation and creating a 2nd login keychain with a different password than my user log in password. 

I could login to gnome X sessions just find but could only get into gnome wayland once as described here.

I fixed the issue by either deleting that 2nd login keychain or changing my login password with passwd. I performed both before testing but now gnome wayland sessions work fine.

Comment 32 Q 2017-02-06 04:10:45 UTC
I just experienced this issue. 

Issue occurred after installing kde dekstop to the standard fedora workstation and creating a 2nd login keychain with a different password than my user log in password. 

I could login to gnome X sessions just find but could only get into gnome wayland once as described here.

I fixed the issue by either deleting that 2nd login keychain or changing my login password with passwd. I performed both before testing but now gnome wayland sessions work fine.

Comment 33 Dong Nguyen 2017-03-06 09:01:34 UTC
I still get this issue. What's the last solution to fix? 

I'm newbie in Fedora.
Thanks,


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