<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - logind writes out session state file before creating fifo so users end up in CLOSING state"
href="https://bugs.freedesktop.org/show_bug.cgi?id=67273">67273</a>
</td>
</tr>
<tr>
<th>CC</th>
<td>dwalsh@redhat.com
</td>
</tr>
<tr>
<th>Assignee</th>
<td>systemd-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Summary</th>
<td>logind writes out session state file before creating fifo so users end up in CLOSING state
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>systemd-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Reporter</th>
<td>rstrode@redhat.com
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Component</th>
<td>general
</td>
</tr>
<tr>
<th>Product</th>
<td>systemd
</td>
</tr></table>
<p>
<div>
<pre>Dan Walsh came to my cube with a user who couldn't get unlocked. After some
debugging we discovered the user's session was in the closing state and so was
being ignored by GDM. After some more code digging we found out why. This
commit:
commit fb6becb4436ae4078337011b2017ce294e7361cf
Author: Lennart Poettering <<a href="mailto:lennart@poettering.net">lennart@poettering.net</a>>
Date: Tue Jul 2 01:46:30 2013 +0200
logind: port over to use scopes+slices for all cgroup stuff
defers creating a reply for CreateSession until after hearing back from systemd
about the user's slice job. Since the CreateSession reply contains one end of
the fifo fd, that commit also defers creating the fifo fd until hearing back.
Previously the fifo fd was created before session_start() was called.
session_start() calls session_save() which depends on the fifo fd being around
to give correct state information. Because the fifo fd isn't created with
session_save() is called, CLOSING gets written into it instead of ACTIVE.
session_save() isn't gauranteed to get called again for the session and so the
session stays in the CLOSING state indefinitely.
Possible fixes I can think of are:
1) keep create_fifo where it was previously and tuck the resulting fifo fd
away like the create_message is tucked away, so it can be used to construct the
reply
2) create the replies up front and tuck them away instead of tucking the
create_message away
3) call session_save again after the slice job finishes (and maybe change the
initial session_save call to write OPENING instead of CLOSING into the file)</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>