spontaneously logged out of lightdm session, authentication failed until logind restarted

Bug #1291454 reported by Steve Langasek
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Expired
High
Unassigned

Bug Description

Out of nowhere, I was suddenly logged out of my X session today and dropped to a lightdm greeter screen. attempts to log back in were kicked immediately back to the greeter. A look at the lightdm log showed:

[+7.44s] DEBUG: Seat: Display server ready, starting session authentication
[+7.44s] DEBUG: Session pid=22931: Started with service 'lightdm-greeter', username 'lightdm'
[+7.55s] DEBUG: Session pid=22931: Authentication complete with return value 0: Success
[+7.55s] DEBUG: Seat: Session authenticated, running command
[+7.55s] DEBUG: Session pid=22931: Running command /usr/lib/lightdm/lightdm-greeter-session /usr/sbin/unity-greeter
[+7.55s] DEBUG: Session pid=22931: Logging to /var/log/lightdm/x-0-greeter.log
[+7.60s] DEBUG: Activating VT 7
[+7.77s] DEBUG: Session pid=22931: Greeter connected version=1.9.8
[+7.96s] DEBUG: Session pid=22931: Greeter start authentication for vorlon
[+7.96s] DEBUG: Session pid=23002: Started with service 'lightdm', username 'vorlon'
[+7.96s] DEBUG: Session pid=22931: Greeter start authentication for vorlon
[+7.96s] DEBUG: Session pid=23002: Sending SIGTERM
[+7.97s] DEBUG: Session pid=23004: Started with service 'lightdm', username 'vorlon'
[+7.97s] DEBUG: Session pid=23002: Terminated with signal 15
[+7.97s] DEBUG: Session: Failed during authentication
[+7.97s] DEBUG: Seat: Session stopped

(you'll note from the timestamps that I had also tried restarting lightdm, which didn't fix the problem.)

Only after I manually killed logind and restarted lightdm again was I able to log in.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: systemd-services 204-5ubuntu13
ProcVersionSignature: Ubuntu 3.13.0-12.32-generic 3.13.4
Uname: Linux 3.13.0-12-generic x86_64
ApportVersion: 2.13.3-0ubuntu1
Architecture: amd64
CurrentDesktop: Unity
Date: Wed Mar 12 08:39:20 2014
InstallationDate: Installed on 2010-09-24 (1265 days ago)
InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.1)
SourcePackage: systemd
UpgradeStatus: Upgraded to trusty on 2013-10-23 (140 days ago)

Revision history for this message
Steve Langasek (vorlon) wrote :
Anders (eddiedog988)
Changed in systemd (Ubuntu):
status: New → Confirmed
Revision history for this message
Sergio Benjamim (sergio-br2) wrote :

I had a similar problem:

- i was in my regular user and did a suspend in the laptop
- someone turn on my laptop, and the system went to lightdm, then the person choose Guest Account
- some time after, the Guest was suddenly logged out

Then after, i tried to login to Guest, and shortly after it logged out. I logged in to my user, and changed the tty, and i realized that there was 3 locked tty.

Changed in systemd (Ubuntu):
importance: Undecided → High
Revision history for this message
Martin Pitt (pitti) wrote :

I haven't seen this myself, and the lightdm snippet in the description doesn't give a clue what happened. If you have a way to reproduce this, could you please modify /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service like that:

  Exec=/bin/sh -c 'G_DBUS_DEBUG=all /usr/lib/x86_64-linux-gnu/systemd-shim >> /tmp/shim.log 2>&1'

and run this in a VT:

  sudo sh -c 'pkill systemd-logind; /lib/systemd/systemd-logind 2>&1 | tee /tmp/logind.log'

then reproduce the situation (or wait until this happens). Please attach /tmp/shim.log and /tmp/logind.log. Thanks!

Changed in systemd (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Steve Langasek (vorlon) wrote :

This was probably an upgrade issue at the time. It is certainly not reproducible now. Was logind being correctly restarted on package upgrade?

Revision history for this message
Martin Pitt (pitti) wrote :

Ah, you said "out of nowhere" and "suddenly", so this didn't sound related to doing an upgrade. This would be plausible, of course. In trusty, logind does get restarted during upgrades, but that shouldn't matter unless something like lightdm is specifically listening to logind getting off and back on the bus. In general you can kill logind just fine without any ill effects. The exception might be if you dist-upgraded from a very old version that had a different format in /run/systemd/ but that sounds implausible with an intra-trusty upgrade to 204-5ubuntu13 (there were lots of 204 versions before).

In utopic there is no init script/job for logind at all any more, it's all D-BUS activated. But independently of the mechanics, killing logind shouldn't interfere with the system at all. Does it for you?

Revision history for this message
Martin Pitt (pitti) wrote :

Thus with the d-bus activation the "authentication failed until logind restarted" part is fixed in utopic. In trusty, it would have been that way between libpam-systemd being upgraded and not configured yet (as logind wouldn't get auto-started). But that still shouldn't log out existing sessions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for systemd (Ubuntu) because there has been no activity for 60 days.]

Changed in systemd (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.