<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - user service fails to restart"
href="https://bugs.freedesktop.org/show_bug.cgi?id=89834">89834</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>user service fails to restart
</td>
</tr>
<tr>
<th>Product</th>
<td>systemd
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>major
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>general
</td>
</tr>
<tr>
<th>Assignee</th>
<td>systemd-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jobol@nonadev.net
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>systemd-bugs@lists.freedesktop.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=114751" name="attach_114751" title="systemctl status">attachment 114751</a> <a href="attachment.cgi?id=114751&action=edit" title="systemctl status">[details]</a></span>
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 <a href="mailto:user@1000.service">user@1000.service</a> 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 <a href="mailto:user@1000.service">user@1000.service</a> is not started but is
stopped. Thus the user context set by the service <a href="mailto:user@1000.service">user@1000.service</a> 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 <a href="mailto:user@1000.service">user@1000.service</a> 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 <a href="mailto:user@1000.service">user@1000.service</a> 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 <a href="mailto:user@1000.service">user@1000.service</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>