[systemd-devel] [PATCH v2 0/7] logind: close races on user and session states

Djalal Harouni tixxdz at opendz.org
Mon Feb 10 06:48:07 PST 2014


On Sat, Feb 08, 2014 at 05:00:57PM +0100, Djalal Harouni wrote:
> On Sat, Feb 08, 2014 at 12:39:25AM +0100, Zbigniew Jędrzejewski-Szmek wrote:
> > On Thu, Feb 06, 2014 at 09:37:13PM +0100, Djalal Harouni wrote:
> > > Summary:
> > > Currently logind will not clear sessions on logout. The bug is confirmed
> > > for getty and ssh logins. This series is preparation for next patches to
> > > address that bug, it does not fix it.
> > > However, this series also fixe real races on user and session states.
> > > This ensures that user_save() and session_save() functions will write the
> > > correct user and session state to the state files.
> > > 
> > > 
> > > The logind bug was already discussed here:
> > > http://lists.freedesktop.org/archives/systemd-devel/2014-January/015968.html
> > 
> > So, I did some testing with current git (ba978d7). And this bug
> > appears to be only partially gone. After my second user logs out, loginctl
> > stops showing the session. But the manager *remains*.
> I confirm this, I've identified the problem, please see below.
> 
> > Hm, the manager remains, but /run/user/<uid>/systemd/ gets nuked.
> > So when the user logins in a second time, communication with user manager
> > is broken.
> I also confirm, I didn't have time to debug this one.
Ok this one was also fixed by the same patch:
http://lists.freedesktop.org/archives/systemd-devel/2014-February/016754.html

I guess, the runtime dir will be removed on logout in user_finalize(),
but user_stop() was never called so the service is still active. During
next loggin, the service unit which is still active will prevent creating
the private dbus socket... anyway it works now, we'll see what Lennart
thinks.

-- 
Djalal Harouni
http://opendz.org


More information about the systemd-devel mailing list