Subject: Re: bug#540: elogind unmounts /run/user/$UID tmpfs filesystem after logging in again

From: Mark Hindley <[email-masked]>
Date: Tue, 19 Jan 2021 18:22:59 +0000

Control: reassign -1 slim
Control: retitle slim fails to get logind session if logout/login cycle is rapid
Control: tags -1 -moreinfo
Control: forwarded -1 https://github.com/elogind/elogind/issues/95

Frank,

On Tue, Jan 19, 2021 at 02:51:03PM +0100, Frank wrote:
> Hi Mark,
> 
> I am using slim, this is the default DM in Beowulf.
> Not sure if the issue is related to the bug you are referring to.
> 
> I also tested with a bare minimum xsession with xterm; the issue remains the
> same.
> So I would say, the issue is either with slim or elogind, or the combination
> of the two.

I believe the issue is with the way slim opens and closes the logind session. It
takes time to close the session when you logout. If you logout and then back in
quickly (which you indicated was a requirement to trigger the bug), the previous
slim session is still closing and, hence /run/user/$UID gets unmounted for the
second login. The umount is actually a symptom of the fact that the second login
has no logind session at all. You should be able to verify that with the
loginctl command.

If you have a short (about 15s IIRC) wait before logging back in, the first
session has closed properly and everything should work normally.

Having said that I think I have seen this before and know what is going on, as
Sven pointed out in the upstream bug, we could not find a solution within
slim. slim upstream is dormant and has not been updated 2014[1].

Other than documenting not to log out and back in very quickly, I am unsure what
else we can do. Do you think that would be enough?

[1]  https://sourceforge.net/projects/slim.berlios/