[systemd-bugs] [Bug 67273] New: logind writes out session state file before creating fifo so users end up in CLOSING state
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Jul 24 13:40:09 PDT 2013
https://bugs.freedesktop.org/show_bug.cgi?id=67273
Priority: medium
Bug ID: 67273
CC: dwalsh at redhat.com
Assignee: systemd-bugs at lists.freedesktop.org
Summary: logind writes out session state file before creating
fifo so users end up in CLOSING state
QA Contact: systemd-bugs at lists.freedesktop.org
Severity: normal
Classification: Unclassified
OS: All
Reporter: rstrode at redhat.com
Hardware: Other
Status: NEW
Version: unspecified
Component: general
Product: systemd
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 <lennart at poettering.net>
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)
--
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/20130724/ac665971/attachment.html>
More information about the systemd-bugs
mailing list