[systemd-bugs] [Bug 89834] New: user service fails to restart

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Mar 31 01:12:51 PDT 2015


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

            Bug ID: 89834
           Summary: user service fails to restart
           Product: systemd
           Version: unspecified
          Hardware: Other
                OS: All
            Status: NEW
          Severity: major
          Priority: medium
         Component: general
          Assignee: systemd-bugs at lists.freedesktop.org
          Reporter: jobol at nonadev.net
        QA Contact: systemd-bugs at lists.freedesktop.org

Created attachment 114751
  --> https://bugs.freedesktop.org/attachment.cgi?id=114751&action=edit
systemctl status

There are 3 entities/processes:
 - M the manager process, its role is to launch/relaunch session processes S
 - S the session process, its role is to open a user session using PAM
(pam_start, pam_open_session, pam_close_session, pam_end) for a utility process
U and for a user given (as parameter)
 - U a utility process that should run under a user session

M fork/exec S and re-launch it when it dies.

S open the session (using PAM) for the given user, fork exec U and when U dies,
close the PAM session and dies itself.

U does something (for our concern, it is a graphical launcher).

Let the user be of UID 1000.

This works only the first time: the user session is well created, I can see the
status of user-1000.slice that handles the user at 1000.service and the session's
scope.

Then when U dies and thus S closes the session and dies and thus M relaunches S
that reopens the session, the service user at 1000.service is not started but is
stopped. Thus the user context set by the service user at 1000.service is NOT
available nor set for the new sessions.

>From my investigations, closing the session doesn't close immediately anything:
neither scope nor slice nor user service are closed. When opening a new
session, I can see that user-1000.slice and user at 1000.service units are stopped
(StopUnit). This stoppings are mixed with creation messages then I suspect an
internal problem in systemd-logind.

An other interesting observation is that if I stop manually the scope unit of
the session (systemctl stop session-cXX.scope), the user at 1000.service is
correctly started half the time (once of two).

I attached the status of the slice as returned by the commands:
 - systemctl status user-1000.slice
 - systemctl status user at 1000.service

-- 
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/20150331/883671a0/attachment.html>


More information about the systemd-bugs mailing list