[systemd-bugs] [Bug 62676] New: systemctl [reboot|shutdown] wronly believes root is still logged in on a tty

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Mar 23 10:31:51 PDT 2013


https://bugs.freedesktop.org/show_bug.cgi?id=62676

          Priority: medium
            Bug ID: 62676
          Assignee: systemd-bugs at lists.freedesktop.org
           Summary: systemctl [reboot|shutdown] wronly believes root is
                    still logged in on a tty
        QA Contact: systemd-bugs at lists.freedesktop.org
          Severity: major
    Classification: Unclassified
                OS: Linux (All)
          Reporter: peter.weber at ttyhoney.com
          Hardware: x86-64 (AMD64)
            Status: NEW
           Version: unspecified
         Component: general
           Product: systemd

Created attachment 76945
  --> https://bugs.freedesktop.org/attachment.cgi?id=76945&action=edit
logind.conf with HandleLidSwitch=ignore (GNOME dconf is buggy and can't do
this)

Hello!
I'm using Systemd-198 on Archlinux. Today I've upgraded various packages on my
box, including Systemd. Sadly it looks like, if "root" has logged in and *out*
in on one off the tty's this prevents executing successfully "sytemctl reboot"
or "sytemctl poweroff".

Example:
$ systemctl reboot # return-code 1
User root is logged in on tty4.
User root is logged in on tty4.
Please retry operation after closing inhibitors and logging out other users.
Alternatively, ignore inhibitors and users with 'systemctl reboot -i'.


In fact I logged in as root two times on tty4 and logged out, every time. But
Systemd seems to believe this sessions still last.

$ loginctl # this is just me regular user (tty2, tty3, gnome-terminal)
   SESSION        UID USER             SEAT            
         2       1000 peter            seat0           
         3       1000 peter            seat0           
         6       1000 peter            seat0           

3 sessions listed.

$ systemd-inhibit --list # looks normal to me
     Who: root (UID 0, PID 299)
    What: sleep
     Why: inhibited
    Mode: delay

     Who: peter (UID 1000, PID 590)
    What: sleep
     Why: GNOME needs to lock the screen
    Mode: delay

     Who: peter (UID 1000, PID 590)
    What: handle-power-key:handle-suspend-key:handle-hibernate-key
     Why: GNOME handling keypresses
    Mode: block

3 inhibitors listed.

Steps to reproduce:
1. power on system
2. login as regular user on a tty
3. login as root on a tty
4. logout as root
5. execute "sytemctl reboot"
6. fails with message from above


Further resources (I'm not involved):
https://bbs.archlinux.de/viewtopic.php?id=23634 # german, warning -> the get
confused during discussion (e.g. sudo, mix old "poweroff" with "systemctl
poweroff")
http://www.mail-archive.com/arch-general@archlinux.org/msg32977.html # english
(but server seem to be buggy, at time of writing)

Bug maybe related with this new feature?
>           Inhibitors are now honored and listed by "systemctl
>           suspend", "systemctl poweroff" (and similar) too, not only
>           GNOME. These commands will also list active sessions by
>           other users.

Thank you

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20130323/05a46806/attachment-0001.html>


More information about the systemd-bugs mailing list