Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-5896

[spec] user slice unit can fail on logout - invalid unit

    • None
    • Low
    • rhel-sst-cs-plumbers
    • ssg_core_services
    • 1
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • None

      Description of problem:

      A user slice unit can go into a failed state:

      1. systemctl status user@12345.service
        ● user@12345.service - User Manager for UID 12345
        Loaded: loaded (/usr/lib/systemd/system/user@.service; static; vendor preset: disabled)
        Active: failed (Result: timeout) since Thu 2022-01-27 11:43:46 CET; 16min ago
        Process: 3691600 ExecStart=/usr/lib/systemd/systemd --user (code=killed, signal=KILL)
        Main PID: 3691600 (code=killed, signal=KILL)
        Status: "Startup finished in 171ms."

      Jan 27 09:38:20 host.example.org systemd[3691600]: Started Mark boot as successful.
      Jan 27 11:41:46 host.example.org systemd[1]: Stopping User Manager for UID 12345...
      Jan 27 11:41:46 host.example.org systemd[3691600]: /usr/lib/systemd/user/systemd-exit.service:16: Failed to parse failure action specifier, ignoring: exit-force
      Jan 27 11:41:46 host.example.org systemd[3691600]: systemd-exit.service: Service lacks both ExecStart= and ExecStop= setting. Refusing.
      Jan 27 11:41:46 host.example.org systemd[3691600]: Failed to enqueue exit.target job: Unit systemd-exit.service has a bad unit file setting.
      Jan 27 11:43:46 host.example.org systemd[1]: user@12345.service: State 'stop-sigterm' timed out. Killing.
      Jan 27 11:43:46 host.example.org systemd[1]: user@12345.service: Killing process 3691600 (systemd) with signal SIGKILL.
      Jan 27 11:43:46 host.example.org systemd[1]: user@12345.service: Killing process 3691623 (krenew) with signal SIGKILL.
      Jan 27 11:43:46 host.example.org systemd[1]: user@12345.service: Failed with result 'timeout'.
      Jan 27 11:43:46 host.example.org systemd[1]: Stopped User Manager for UID 12345.

      In particular that " Failed to parse failure ac" line looks bad.

      /usr/lib/systemd/user/systemd-exit.service

      changed with this version of the package "systemd-239-55.el8.x86_64"

      It was:
      [Unit]
      Description=Exit the Session
      Documentation=man:systemd.special(7)
      DefaultDependencies=no
      Requires=shutdown.target
      After=shutdown.target

      [Service]
      Type=oneshot
      ExecStart=/usr/bin/systemctl --force exit

      and is now

      [Unit]
      Description=Exit the Session
      Documentation=man:systemd.special(7)
      DefaultDependencies=no
      Requires=shutdown.target
      After=shutdown.target
      SuccessAction=exit-force

      Looks to be:

      https://github.com/systemd/systemd/commit/a400bd8c2a6285576edf8e2147e1d17aab129501

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

      systemd-239-55.el8.x86_64

      How reproducible:

      Tricky. I have not managed to recreate this on demand.

      I do see it often for many users.

      Steps to Reproduce:
      1. User logins
      2. User logouts - I don't know how, will try to find out.
      3. User slice can go bad.

      Actual results:

      Bad user slice as above.

      Expected results:

      User slice should close cleanly.
      Additional info:

              dtardon@redhat.com David Tardon
              stevetraylen Steve Traylen
              David Tardon David Tardon
              Frantisek Sumsal Frantisek Sumsal
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated: