This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 890827

Summary: logind should ignore non-text and non-graphical sessions when checking whether shutdown shall be allowed
Product: [Fedora] Fedora Reporter: RudraB <bnrj.rudra>
Component: systemdAssignee: systemd-maint
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: belegdol, covex, cpanceac, dennis, fat.lobyte9, gareth.k.jones, jcainfo, johannbg, lnykryn, manday, mark.harfouche, mcatanzaro, metherid, mschmidt, msekleta, notting, oli, plautrba, pmatilai, systemd-maint, vpavlin
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-05 17:56:30 EST Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description RudraB 2012-12-30 09:08:29 EST
Description of problem:
Sometime, when I try to poweroff my machine, I see a popup as I cannot poweroff as other users are signed in and asks for my password. 
This is a single user machine. The /home contains only me and lost+found. I tried "who" but no one except me is signed in.

Version-Release number of selected component (if applicable):
18

How reproducible:
frequently

Steps to Reproduce:
1. Try to poweroff
2.
3.
  
Actual results:
It asks for password as it thinks other users are signed in.

Expected results:
System should poweroff, without asking for password

Additional info:
I have talked about this in fedora irc and pasing the corresponding outputs here. Please ask for other infos required.

# ls -ld /var/log/gdm
drwxrwx--T. 2 root gdm 4096 Dec 30 11:29 /var/log/gdm

# ls -l /etc/plymouth/plymouthd.conf
-rw-r--r--. 1 root root 94 Dec 24 15:26 /etc/plymouth/plymouthd.conf

# ls -l /var/log/gdm/ 
total 288
-rw-r--r--. 1 root gdm   2608 Dec 30 11:30 :0-greeter.log
-rw-r--r--. 1 root gdm   2631 Dec 30 10:19 :0-greeter.log.1
-rw-r--r--. 1 root gdm   2430 Dec 30 10:17 :0-greeter.log.2
-rw-r--r--. 1 root gdm   2680 Dec 29 22:59 :0-greeter.log.3
-rw-r--r--. 1 root gdm   2732 Dec 29 20:04 :0-greeter.log.4
-rw-r--r--. 1 root root 39181 Dec 30 11:45 :0.log
-rw-r--r--. 1 root root 35669 Dec 30 11:29 :0.log.1
-rw-r--r--. 1 root root 28637 Dec 30 10:18 :0.log.2
-rw-r--r--. 1 root root 30176 Dec 29 23:24 :0.log.3
-rw-r--r--. 1 root root 30176 Dec 29 21:28 :0.log.4
-rw-r--r--. 1 root root   645 Dec 30 12:00 :0-slave.log
-rw-r--r--. 1 root root  1038 Dec 30 11:29 :0-slave.log.1
-rw-r--r--. 1 root root   866 Dec 30 10:18 :0-slave.log.2
-rw-r--r--. 1 root root   879 Dec 29 23:24 :0-slave.log.3
-rw-r--r--. 1 root root     0 Dec 29 21:28 :0-slave.log.4
-rw-r--r--. 1 root gdm   2457 Dec 29 21:29 :1-greeter.log
-rw-r--r--. 1 root gdm   2625 Dec 27 04:05 :1-greeter.log.1
-rw-r--r--. 1 root root 30176 Dec 29 21:29 :1.log
-rw-r--r--. 1 root root 34053 Dec 27 04:06 :1.log.1
-rw-r--r--. 1 root root   957 Dec 29 21:29 :1-slave.log
-rw-r--r--. 1 root root   884 Dec 27 04:06 :1-slave.log.1
Comment 1 Bill Nottingham 2013-01-02 13:40:36 EST
When this happens, what is the output of 'loginctl'?
Comment 2 RudraB 2013-01-02 15:51:25 EST
I will submit the output the next time this happens.
To be sure that I submit correct loginctl, should I cancel the poweroff and take the output?
Comment 3 RudraB 2013-01-06 03:24:40 EST
I just got the error when I clicked "install updates and restart" 
As asked, here is the loginctl
$ loginctl 
   SESSION        UID USER             SEAT            
         2       1000 rudra            seat0           
         4          0 root                             
         5         42 gdm              seat0           
         6       1000 rudra            seat0           

4 sessions listed.
Comment 4 RudraB 2013-01-06 03:26:53 EST
I just got the error when I clicked "install updates and restart" 
As asked, here is the loginctl
$ loginctl 
   SESSION        UID USER             SEAT            
         2       1000 rudra            seat0           
         4          0 root                             
         5         42 gdm              seat0           
         6       1000 rudra            seat0           

4 sessions listed.
Comment 5 Michal Schmidt 2013-01-07 09:24:49 EST
(In reply to comment #4)
> $ loginctl 
>    SESSION        UID USER             SEAT            
...
>          4          0 root                             

This could be a cron job belonging to root. Check it using:
 loginctl session-status 4
Comment 6 RudraB 2013-01-10 03:45:42 EST
yes...crond is running!
$  loginctl session-status 4
4 - root (0)
           Since: Thu, 2013-01-10 08:01:01 GMT; 42min ago
          Leader: 15419
         Service: crond; type unspecified; class user
           State: closing
          CGroup: name=systemd:/user/root/4
                  └ 15431 /usr/sbin/anacron -s

But I have not started any cron, and this problem was never shown in previous fedora releases.
Comment 7 Lennart Poettering 2013-01-11 08:37:06 EST
Hmm, we might want to ignore non-tty and non-graphical sessions for this check.
Comment 8 Lennart Poettering 2013-01-14 15:30:13 EST
*** Bug 840844 has been marked as a duplicate of this bug. ***
Comment 10 Fedora Update System 2013-01-28 14:13:10 EST
systemd-197-1.fc18.2 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/systemd-197-1.fc18.2
Comment 11 Fedora Update System 2013-01-29 19:34:43 EST
Package systemd-197-1.fc18.2:
* 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-197-1.fc18.2'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-1590/systemd-197-1.fc18.2
then log in and leave karma (feedback).
Comment 12 Michal Schmidt 2013-01-30 17:37:59 EST
*** Bug 906080 has been marked as a duplicate of this bug. ***
Comment 13 Michal Schmidt 2013-02-05 11:48:40 EST
*** Bug 907162 has been marked as a duplicate of this bug. ***
Comment 14 Mark Harfouche 2013-02-05 14:07:35 EST
Could this be the same bug?
https://bugzilla.redhat.com/show_bug.cgi?id=869576
Comment 15 Michael Catanzaro 2013-02-13 22:16:17 EST
Looks like it.

Lennart I got this today and it was the same issue, cron job running according to loginctl. However *I have already updated to systemd 197.*

[michael@victory-road ~]$ loginctl list-sessions
   SESSION        UID USER             SEAT            
         3          0 root                             
         5          0 root             seat0           
         6       1000 michael          seat0           

3 sessions listed.
[michael@victory-road ~]$ loginctl session-status 3
3 - root (0)
           Since: Wed 2013-02-13 21:01:01 CST; 13min ago
          Leader: 4519
         Service: crond; type unspecified; class user
           State: closing
          CGroup: name=systemd:/user/root/3
                  └─4531 /usr/sbin/anacron -s
Comment 16 Michal Schmidt 2013-02-14 09:26:05 EST
(In reply to comment #15)
> Lennart I got this today and it was the same issue, cron job running
> according to loginctl. However *I have already updated to systemd 197.*

But was it systemd-197-1.fc18.2 specifically? The last digit really really matters too.
Comment 17 Michael Catanzaro 2013-02-14 10:14:05 EST
Oh I'm blind, sorry that is my fault for not reading properly. (I have 197-1.fc18.1.)
Comment 18 Michal Schmidt 2013-02-15 04:43:23 EST
*** Bug 911500 has been marked as a duplicate of this bug. ***
Comment 19 Fedora Update System 2013-02-22 20:02:29 EST
Package initscripts-9.42.2-1.fc18, systemd-197-1.fc18.2:
* 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 initscripts-9.42.2-1.fc18 systemd-197-1.fc18.2'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-1590/initscripts-9.42.2-1.fc18,systemd-197-1.fc18.2
then log in and leave karma (feedback).
Comment 20 Fedora Update System 2013-02-25 21:44:20 EST
initscripts-9.42.2-1.fc18, systemd-197-1.fc18.2 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 21 Adam Pribyl 2013-04-01 13:03:15 EDT
Reopening the bug, as this still happens to me, just the scenario is bit different. I am using IceWM and after I end up a session, I can not power off the machine for a few seconds from a GDM screen - I am still getting the dialog asking for a root password. After few attempts it suddenly powers off OK.

It looks to me, like there is some kind of timeout or polling before the shutdown works. So far I was not able to get the loginctl output within this period.
Comment 22 Fedora End Of Life 2013-12-21 10:16:15 EST
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. 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 WONTFIX if it remains open with a Fedora 
'version' of '18'.

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 prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 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 to Fedora 18's end of life.

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 23 Fedora End Of Life 2014-02-05 17:56:30 EST
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 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.