Bug 823485 - When I try to log in, login fails and I get switched to a different VT
Summary: When I try to log in, login fails and I get switched to a different VT
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: rawhide
Hardware: All
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-21 11:22 UTC by Jonathan Kamens
Modified: 2012-10-07 22:48 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-10-07 22:48:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
/var/log/messages when prefdm.service is restarted (63.60 KB, text/x-log)
2012-05-21 14:34 UTC, Jonathan Kamens
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 814690 0 unspecified CLOSED User can't be deleted after he logs in and logs out 2021-02-22 00:41:40 UTC

Internal Links: 814690

Description Jonathan Kamens 2012-05-21 11:22:10 UTC
I am running F17 x86_64 with all updates from updates-testing.

I can't log in. When I click my name in gdm and enter my password, the display immediately switches to a different (text) VT, and when I switch back to the GDM VT, it's back at the login screen.

I can't find anything in /var/log/messages, dmesg output, ~/.xsession-errors, or /var/log/Xorg.0.log to explain this.

I have auto-login configured, and if I reboot my machine, I _am_ logged in successfully. It's only when I log out and log back in again that the login fails.

I first noticed this last night after a yum update, but I don't know for certain that it was last night's update that caused the problem, since I usually auto-login so I can't say for certain when the last time I tried to log in manually was.

Just in case it's relevant, here's what updated last night:

PackageKit-0.7.4-3.fc17.x86_64
PackageKit-command-not-found-0.7.4-3.fc17.x86_64
PackageKit-device-rebind-0.7.4-3.fc17.x86_64
PackageKit-glib-0.7.4-3.fc17.x86_64
PackageKit-gstreamer-plugin-0.7.4-3.fc17.x86_64
PackageKit-gtk3-module-0.7.4-3.fc17.x86_64
PackageKit-yum-0.7.4-3.fc17.x86_64
PackageKit-yum-plugin-0.7.4-3.fc17.x86_64
apache-commons-discovery-0.5-3.fc17.noarch
at-spi2-core-2.4.2-1.fc17.x86_64
at-spi2-core-devel-2.4.2-1.fc17.x86_64
control-center-3.4.2-1.fc17.x86_64
control-center-filesystem-3.4.2-1.fc17.x86_64
dconf-0.12.1-1.fc17.x86_64
dconf-editor-0.12.1-1.fc17.x86_64
device-mapper-multipath-libs-0.4.9-26.fc17.x86_64
directfb-1.5.3-7.fc17.x86_64
easytag-2.1.7-1.fc17.x86_64
firstboot-17.3-1.fc17.x86_64
gcalctool-6.4.2.1-1.fc17.x86_64
glib-networking-2.32.3-1.fc17.x86_64
glib2-2.32.3-1.fc17.i686
glib2-2.32.3-1.fc17.x86_64
glib2-devel-2.32.3-1.fc17.x86_64
gmime-2.6.9-1.fc17.x86_64
gmime-devel-2.6.9-1.fc17.x86_64
gmime-sharp-2.6.9-1.fc17.x86_64
gnome-documents-0.4.2-1.fc17.x86_64
gnome-settings-daemon-3.4.2-1.fc17.x86_64
gnome-shell-3.4.1-5.fc17.x86_64
gsettings-desktop-schemas-3.4.2-1.fc17.x86_64
gsettings-desktop-schemas-devel-3.4.2-1.fc17.x86_64
gstreamer-plugins-ugly-0.10.19-1.fc17.x86_64
gtk-sharp2-devel-2.12.11-5.fc17.x86_64
gtksourceview3-3.4.2-1.fc17.x86_64
gvfs-1.12.3-1.fc17.x86_64
gvfs-afc-1.12.3-1.fc17.x86_64
gvfs-afp-1.12.3-1.fc17.x86_64
gvfs-archive-1.12.3-1.fc17.x86_64
gvfs-fuse-1.12.3-1.fc17.x86_64
gvfs-gphoto2-1.12.3-1.fc17.x86_64
gvfs-obexftp-1.12.3-1.fc17.x86_64
gvfs-smb-1.12.3-1.fc17.x86_64
ibus-1.4.99.20120428-2.fc17.x86_64
ibus-gtk2-1.4.99.20120428-2.fc17.x86_64
ibus-gtk3-1.4.99.20120428-2.fc17.x86_64
ibus-libs-1.4.99.20120428-2.fc17.x86_64
kernel-3.3.6-3.fc17.x86_64
kernel-devel-3.3.6-3.fc17.x86_64
kernel-doc-3.3.6-3.fc17.noarch
kernel-headers-3.3.6-3.fc17.x86_64
kernel-modules-extra-3.3.6-3.fc17.x86_64
kernel-tools-3.3.6-3.fc17.x86_64
kpartx-0.4.9-26.fc17.x86_64
libgssglue-0.4-0.fc17.x86_64
libmp3splt-0.7.1-9.fc17.x86_64
libmusicbrainz4-4.0.3-1.fc17.x86_64
libogg-1.3.0-1.fc17.i686
libogg-1.3.0-1.fc17.x86_64
libogg-devel-1.3.0-1.fc17.x86_64
mp3splt-2.4.1-9.fc17.x86_64
nautilus-3.4.2-5.fc17.x86_64
nautilus-extensions-3.4.2-5.fc17.x86_64
nfs-utils-1.2.6-0.fc17.x86_64
numactl-2.0.7-6.fc17.x86_64
numactl-libs-2.0.7-6.fc17.x86_64
openconnect-3.20-1.fc17.x86_64
opencore-amr-0.1.3-2.fc17.x86_64
openldap-2.4.31-2.fc17.i686
openldap-2.4.31-2.fc17.x86_64
openldap-clients-2.4.31-2.fc17.x86_64
openldap-devel-2.4.31-2.fc17.x86_64
policycoreutils-2.1.11-16.fc17.x86_64
policycoreutils-python-2.1.11-16.fc17.x86_64
policycoreutils-restorecond-2.1.11-16.fc17.x86_64
policycoreutils-sandbox-2.1.11-16.fc17.x86_64
qjackctl-0.3.9-1.fc17.x86_64
rpmfusion-free-release-17-1.noarch
rpmfusion-nonfree-release-17-1.noarch
selinux-policy-3.10.0-125.fc17.noarch
selinux-policy-devel-3.10.0-125.fc17.noarch
selinux-policy-doc-3.10.0-125.fc17.noarch
setroubleshoot-plugins-3.0.40-1.fc17.noarch
sudo-1.8.3p1-7.fc17.x86_64
systemd-44-9.fc17.x86_64
systemd-analyze-44-9.fc17.x86_64
systemd-devel-44-9.fc17.x86_64
systemd-sysv-44-9.fc17.x86_64
tcpdump-4.2.1-3.fc17.x86_64
totem-3.4.2-1.fc17.x86_64
totem-nautilus-3.4.2-1.fc17.x86_64
totem-pl-parser-3.4.2-1.fc17.x86_64
tracker-0.14.1-1.fc17.x86_64
tracker-ui-tools-0.14.1-1.fc17.x86_64
yelp-3.4.2-1.fc17.x86_64
yelp-libs-3.4.2-1.fc17.x86_64
yelp-xsl-3.4.2-1.fc17.noarch

Comment 1 Jonathan Kamens 2012-05-21 11:41:57 UTC
Please note that the X server is NOT crashing. The X server does not exit and restart when the login fails. It's the same instance of the X server, the same /var/log/Xorg.0.log file, afterwards.

Here's what shows up in /var/log/messages when I attempt to log in:

May 21 07:34:21 jik2 TIFIER=systemd-logind[759]: New session 72 of user jik.
May 21 07:34:22 jik2 TIFIER=systemd-logind[759]: Removed session 72.
May 21 07:34:22 jik2 dbus-daemon[772]: dbus[772]: [system] Activating service name='net.reactivated.Fprint' (using servicehelper)
May 21 07:34:22 jik2 dbus[772]: [system] Activating service name='net.reactivated.Fprint' (using servicehelper)
May 21 07:34:22 jik2 dbus-daemon[772]: Launching FprintObject
May 21 07:34:22 jik2 dbus-daemon[772]: dbus[772]: [system] Successfully activated service 'net.reactivated.Fprint'
May 21 07:34:22 jik2 dbus[772]: [system] Successfully activated service 'net.reactivated.Fprint'
May 21 07:34:22 jik2 dbus-daemon[772]: ** Message: D-Bus service launched with name: net.reactivated.Fprint
May 21 07:34:22 jik2 dbus-daemon[772]: ** Message: entering main loop

Note the oddly truncated "TIFIER" tag at the beginning of some of the messages. I don't know if that's relevant. It wasn't happening until after last night's update.

Comment 2 Jonathan Kamens 2012-05-21 14:33:41 UTC
Downgrading from systemd-44-9 to systemd-44-8 makes the problem go away. Changing component to systemd.

Note also that before downgrading, I tried doing "systemctl restart prefdm.service" to see if that, rather than a full reboot, would be sufficient, and it wasn't. I got flashing back and forth between VT's and the attached interesting sequence of events in /var/log/messages.

Note also that I have SELinux disabled.

Comment 3 Jonathan Kamens 2012-05-21 14:34:12 UTC
Created attachment 585826 [details]
/var/log/messages when prefdm.service is restarted

Comment 4 Michal Schmidt 2012-05-21 16:01:12 UTC
Thanks for the report.
I can reproduce this.

Comment 5 Ray Strode [halfline] 2012-05-21 16:53:50 UTC
After the user session is set is initialized and ready to be launched, gdm has code (something) like this to make sure there's no other sessions that should be jumped to instead:

session_to_use = NULL;
found_existing_inactive_session = FALSE;
sd_seat_get_sessions (slave->priv->display_seat_id, &sessions, ...)
for (each session in sessions) {
  sd_session_get_type (session, &type);
  sd_session_get_uid (session, &uid);
  is_active = sd_session_is_active (session) > 0;

  if (type is not "x11")
     continue;

  if (uid is not uid of user)
     continue;

  if (!found_existing_inactive_session) {
      /* session_to_use may have the just initialized, 
         active session in it from a previous iteration
         of this loop */
      session_to_use = session;
      
      if (!is_active)
          found_existing_inactive_session = TRUE; 
  }
}
return session_to_use;

if we're jumping to a text VT, then there's a good chance that text login sessions at the console are getting tagged with the type "x11" so they aren't getting skipped in the "if (type is not 'x11') continue" line above.

Comment 6 Michal Schmidt 2012-05-21 21:39:52 UTC
In systemd-44-9.fc17 I backported commit "logind: close FIFO before ending sessions cleanly" ( http://cgit.freedesktop.org/systemd/systemd/commit/?id=75c8e3cffd7da8eede614cf61384957af2c82a29 ). The bug goes away if this commit is reverted.

With systemd-44-9.fc17 after logging out of Gnome the user's session does not disappear immediately. It remains alive because of two remaining processes:

# loginctl session-status 3
3 - michich (1000)
	   Since: Mon, 21 May 2012 23:23:54 +0200; 22s ago
	  Leader: 799
	    Seat: seat0; vc1
	 Display: :0
	 Service: gdm-password; type x11; class user
	  Active: no
	  CGroup: name=systemd:/user/michich/3
		  ├ 1056 /usr/bin/pulseaudio --start
		  └ 1063 /usr/libexec/pulse/gconf-helper

You can see I had a Gnome session on vc1 and I logged out of it. The session did not go away entirely even though the leader process is gone.
GDM is now showing on vc2. If I try to login as "michich" again, GDM will just switch to vc1 (where nothing of interest is) because of the inactive session above.
If I wait a few more seconds, the two processes will exit and I can login normally.

Comment 7 Michal Schmidt 2012-05-21 23:33:51 UTC
(In reply to comment #6)
> In systemd-44-9.fc17 I backported commit "logind: close FIFO before ending
> sessions cleanly" (
> http://cgit.freedesktop.org/systemd/systemd/commit/
> ?id=75c8e3cffd7da8eede614cf61384957af2c82a29 ). The bug goes away if this
> commit is reverted.

I reverted the patch in systemd-44-11.fc17.
Moving this bug to Rawhide.

Comment 8 Ray Strode [halfline] 2012-05-22 14:32:56 UTC
ah that's because of bug 814690 probably.

Comment 9 Lennart Poettering 2012-09-14 14:19:30 UTC
This is fixed in git and soon F18.

Comment 10 Fedora Update System 2012-09-20 19:56:10 UTC
systemd-190-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/systemd-190-1.fc18

Comment 11 Fedora Update System 2012-09-22 06:37:20 UTC
Package systemd-191-2.fc18, rtkit-0.11-3.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing systemd-191-2.fc18 rtkit-0.11-3.fc18'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-14581/rtkit-0.11-3.fc18,systemd-191-2.fc18
then log in and leave karma (feedback).

Comment 12 Fedora Update System 2012-09-28 00:17:43 UTC
Package glibc-2.16-17.fc18, systemd-192-1.fc18, selinux-policy-3.11.1-23.fc18, rtkit-0.11-3.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing glibc-2.16-17.fc18 systemd-192-1.fc18 selinux-policy-3.11.1-23.fc18 rtkit-0.11-3.fc18'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-14581/selinux-policy-3.11.1-23.fc18,rtkit-0.11-3.fc18,systemd-192-1.fc18,glibc-2.16-17.fc18
then log in and leave karma (feedback).

Comment 13 Fedora Update System 2012-10-01 20:10:12 UTC
Package glibc-2.16-17.fc18, rtkit-0.11-3.fc18, systemd-193-1.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing glibc-2.16-17.fc18 rtkit-0.11-3.fc18 systemd-193-1.fc18'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-14581/rtkit-0.11-3.fc18,systemd-193-1.fc18,glibc-2.16-17.fc18
then log in and leave karma (feedback).


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