Devuan bug report logs - #540
slim fails to get logind session if logout/login cycle is rapid

Package: slim; Reported by: Frank <fbug@xs4all.nl>; Done: dak@devuan.org; Maintainer for slim is Devuan Dev Team <devuan-dev@lists.dyne.org>.

Message received at 540-done@bugs.devuan.org:


Received: (at 540-done) by bugs.devuan.org; 21 Jan 2021 17:00:01 +0000
Return-Path: <dak@devuan.org>
Delivered-To: devuanbugs@dyne.org
Received: from tupac3.dyne.org [195.169.149.119]
	by doc.devuan.org with IMAP (fetchmail-6.4.0.beta4)
	for <debbugs@localhost> (single-drop); Thu, 21 Jan 2021 17:00:01 +0000 (UTC)
Received: from mail.devuan.dev (mail.devuan.dev [54.36.142.182])
	by vm6.ganeti.dyne.org (Postfix) with ESMTP id 6718BF604E2
	for <540-done@bugs.devuan.org>; Thu, 21 Jan 2021 17:54:32 +0100 (CET)
Received: from dak.ganeti1.devuan.org (dak.devuan.org [192.168.97.90])
	by mail.devuan.dev (Postfix) with SMTP id AE52F3A07E6
	for <540-done@bugs.devuan.org>; Thu, 21 Jan 2021 16:55:57 +0000 (UTC)
Received: (nullmailer pid 11770 invoked by uid 107);
	Thu, 21 Jan 2021 16:55:58 -0000
From: dak@devuan.org
To: 540-done@bugs.devuan.org
Subject: #540: fixed in src:slim version 1.3.6-5.2+devuan1
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
Date: Thu, 21 Jan 2021 16:55:58 +0000
Message-Id: <1611248158.500049.11769.nullmailer@dak.localnet.devuan.org>
X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_FAIL
	autolearn=disabled version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tupac3.dyne.org


Version: 1.3.6-5.2+devuan1

Source package slim (1.3.6-5.2+devuan1) added to Devuan suite unstable.

This closes bug report 540.

Thanks

DAK managing the Devuan archive

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 21 Jan 2021 15:45:24 +0000
Source: slim
Architecture: source
Version: 1.3.6-5.2+devuan1
Distribution: unstable
Urgency: medium
Maintainer: Devuan Dev Team <devuan-dev@lists.dyne.org>
Changed-By: Mark Hindley <mark@hindley.org.uk>
Closes: 540
Changes:
 slim (1.3.6-5.2+devuan1) unstable; urgency=medium
 .
   * Set slim PAM session as class greeter. This ensures sessions
     are closed promptly on logout and we always get a session on
     a rapid logout/login cycle (Closes: #540).
   * Merge changes from debian 1.3.6-5.2 NMU.
   * d/control: add Origin: Devuan
   * d/control: update Vcs-* following Gitea migration.
Checksums-Sha1:
 27cfbd8b51acec941688a682088571d13d3fded5 1820 slim_1.3.6-5.2+devuan1.dsc
 1ac15bb91d18a6411e6561b5c1bd27268e1a1b55 34920 slim_1.3.6-5.2+devuan1.debian.tar.xz
 871d2441196a63c99c3c8005e9df9f05168c8d8e 5140 slim_1.3.6-5.2+devuan1_source.buildinfo
Checksums-Sha256:
 61219a1f733a8e8a2f68eda91018ecf8d5157b297de611c71b1b18d7054fe87e 1820 slim_1.3.6-5.2+devuan1.dsc
 40bb4c9e245f8ed4d74812d8ea40dc13f909d97b0676d8723ac93a12e65d1ae4 34920 slim_1.3.6-5.2+devuan1.debian.tar.xz
 0aebdf10f207f95702fb5837fa12749021b2316a4bfc6d70e3df1f4e69de0592 5140 slim_1.3.6-5.2+devuan1_source.buildinfo
Files:
 0303aae3315c0bacfbb9acce3e161014 1820 x11 optional slim_1.3.6-5.2+devuan1.dsc
 5882ad896f73c8e4563aeef8f78edba4 34920 x11 optional slim_1.3.6-5.2+devuan1.debian.tar.xz
 424f2ff1f49888df6e323c141d18aa2f 5140 x11 optional slim_1.3.6-5.2+devuan1_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEcuPLdzMV36LkZHQ9lFMhJFQZIvsFAmAJsF4ACgkQlFMhJFQZ
Ivt15AgAjbP9z+Jzh7NCsd9sK5bxnSvinjw60Fwu4zuLI6kUAxSf9lu227kVv5+O
NKtctWFWIqxRivQbEm3fCrOg8jOIDeyC9hKyTuq5udvtfbZ85fV8iFcgvV9dXK//
DDTN9ihQM/D8iZ3GX0fCCRYlSAEHFVOiv5e9mO6v42GNwGllf9nGA8VfW7vudf0R
QSR0UyjvJ8KW6UyXzthYGmLFSuV8+9CCBh97ulIIKM/i4d0VybSwPXzX046aGeuK
/cWweBh1U16vm37Pfe94Z4q+U9bSvMVTUReAfYSqkzgny8zSt9cHtoXpVtaEN4Gs
OMtd6exc6bompQrnMdhuNyj5LDut+Q==
=b6Iq
-----END PGP SIGNATURE-----

Notification sent to Frank <fbug@xs4all.nl>:
bug acknowledged by developer. Full text available.
Reply sent to dak@devuan.org:
You have taken responsibility. Full text available.

Message received at 540@bugs.devuan.org:


Received: (at 540) by bugs.devuan.org; 21 Jan 2021 14:30:03 +0000
Return-Path: <fbug@xs4all.nl>
Delivered-To: devuanbugs@dyne.org
Received: from tupac3.dyne.org [195.169.149.119]
	by doc.devuan.org with IMAP (fetchmail-6.4.0.beta4)
	for <debbugs@localhost> (single-drop); Thu, 21 Jan 2021 14:30:03 +0000 (UTC)
Received: from lb1-smtp-cloud7.xs4all.net (lb1-smtp-cloud7.xs4all.net [194.109.24.24])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by vm6.ganeti.dyne.org (Postfix) with ESMTPS id 82ED3F606F6
	for <540@bugs.devuan.org>; Thu, 21 Jan 2021 15:19:58 +0100 (CET)
Authentication-Results: vm6.ganeti.dyne.org;
	dkim=pass (2048-bit key; secure) header.d=xs4all.nl header.i=@xs4all.nl header.b="GN76V54n";
	dkim-atps=neutral
Received: from webmail.xs4all.nl ([IPv6:2001:888:0:22:194:109:20:217])
	by smtp-cloud7.xs4all.net with ESMTPA
	id 2aoVlboRMyutM2aoVlhRH9; Thu, 21 Jan 2021 15:19:57 +0100
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2;
	t=1611238797; bh=CtRVzVoMyeTB5WUJQQ0K8EGQThf20BUYwmLi9mEUsxg=;
	h=MIME-Version:Date:From:To:Subject:Message-ID:Content-Type:From:
	 Subject;
	b=GN76V54nddjUIX/GNoiNQSnpityCaA5JPusPv0zqdAMw5rPHx5lysxp98qkTBYLNE
	 IMVsXu1wV6XOirNm1oxjTY6djJJuD/BAjTz4C65Ve3CqXug5Weo7u+caRFNac0AcOY
	 QbZyVWETCBy16/DQfC8fEEVFyVvdrnqEDbuzc72EJz4R9Fq4B3jm63U4v7tJZlf3fj
	 hmnZ/nXrW5H2+BJ07pZ201411U6WAqUNGBwR70jHDs4+zEVNMbRgrbcK0AJYWZhSe/
	 M3gfFutoFlIzb8bSR1TVhPoB11eyw8WfRfTwQMR5e/IGj6gLQJUPSYinzo8IbJqwA3
	 /bQFhMAfgDmmg==
Received: from roothub.nl ([83.68.19.244])
 by webmail.xs4all.nl
 with HTTP (HTTP/1.1 POST); Thu, 21 Jan 2021 15:19:55 +0100
MIME-Version: 1.0
Date: Thu, 21 Jan 2021 15:19:55 +0100
From: Frank <fbug@xs4all.nl>
To: Mark Hindley <mark@hindley.org.uk>
Cc: 540@bugs.devuan.org
Subject: Re: bug#540: elogind unmounts /run/user/$UID tmpfs filesystem after
 logging in again
In-Reply-To: <YAlQqj7R/L1rZj2x@hindley.org.uk>
References: <799226dc9af49ffdf449c54e013032e1@xs4all.nl>
 <YAbC59HtYZjxzfBo@hindley.org.uk>
 <799226dc9af49ffdf449c54e013032e1@xs4all.nl>
 <0d28c7c8b0ca461ef8376eee0c5ec18e@xs4all.nl>
 <YAcjg31ZR9ilODdY@hindley.org.uk>
 <7b2bac156d658c49f638856d445a3b3b@xs4all.nl>
 <85c8573180e595ee5805d973cc6b1cfa@xs4all.nl>
 <YAhkQkGH3fTAAHdP@hindley.org.uk>
 <a15165161f13c160ee428ad13b24eb6d@xs4all.nl>
 <2a8c1d6c190c0213201a9f496e9363e0@xs4all.nl>
 <YAlQqj7R/L1rZj2x@hindley.org.uk>
Message-ID: <dea0a4184a5362e4dc11341ce8ded9b0@xs4all.nl>
X-Sender: fbug@xs4all.nl
User-Agent: XS4ALL Webmail
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit
X-CMAE-Envelope: MS4xfJ3w8o9ugSW2LygZZYlo0tLV/hY0uMkHHtfHG9teMrfPywpVKt9Fu4MP8dO8zz4NyavOpRJCboVelm6aghV4LnQz1yRw2DKv9tplfs891RdXdY/GPgTI
 NspNUkjYYvuCT3fic3FFwHTEUJ9N6X+cAYthTfsiKMYU9FTc3IY19/l5SKL8/zp/HVnIyQ8fJx70jkLJnODuvsw9rPeDG2VG1ycgKQ2+NEPB1IMOW+NseI5Q
 h6Ri4CM55NZpJVRhdB+MtA==
X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED,
	DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,
	RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS autolearn=disabled
	version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tupac3.dyne.org

Hi Mark,

Cmd "loginctl session-status" shows that class "greeter" is a property 
of service "slim". It looks fine to me since slim does not fork a helper 
process like, for example, lightdm does.

XDG_SESSION_CLASS is set by PAM module pam_elogind.so. Unsetting 
XDG_SESSION_CLASS / changing it to "user" again before pam.open_session 
breaks the fix. Overriding the environment variable by adding 
"pam.setenv("XDG_SESSION_CLASS", "greeter");" to app.cpp (line 560) 
won't change the class, just the variable (see below).

----------------- snip ---------------
devuan@devuan:~$ loginctl session-status | grep Service; set | grep 
XDG_SESSION
	 Service: slim; type x11; class greeter
XDG_SESSION_CLASS=user
XDG_SESSION_ID=1
XDG_SESSION_TYPE=x11
----------------- snip ---------------

I did a quick check in the logind source code and as far as I can see a 
greeter session does not have any additional privileges compared to a 
user session. There is only have_multiple_sessions() in logind-dbus.c 
that checks if there are multiple sessions; greeter sessions are not 
counted.

Slim is a single process (class "greeter") without a helper (class 
"user"). Changing the class to greeter is the best you can do.

Regards,
Frank

Mark Hindley schreef op 2021-01-21 11:00:
> It certainly makes sense for the slim login screen to be greeter class. 
> But,
> semantically, I would also expect the subsequent user login to be class 
> user. I
> don't yet know what other effects (if any) having the user login as 
> class
> greeter has.
> 
> Maybe we unset XDG_SESSION_CLASS again before pam.open_session? But 
> maybe that
> would no longer fix the issue you came across?
> 
>> Writing Display Managers (HOWTO):
>> https://www.freedesktop.org/wiki/Software/systemd/writing-display-managers/
> 
> This seems to confirm that the user login itself should not be class 
> greeter.
> 
> Mark

Acknowledgement sent to Frank <fbug@xs4all.nl>:
Extra info received and forwarded to list. Copy sent to Devuan Dev Team <devuan-dev@lists.dyne.org>. Full text available.
Information forwarded to devuan-bugs@lists.dyne.org, Devuan Dev Team <devuan-dev@lists.dyne.org>:
bug#540; Package slim. Full text available.

Message received at 540@bugs.devuan.org:


Received: (at 540) by bugs.devuan.org; 21 Jan 2021 10:10:04 +0000
Return-Path: <mark@hindley.org.uk>
Delivered-To: devuanbugs@dyne.org
Received: from tupac3.dyne.org [195.169.149.119]
	by doc.devuan.org with IMAP (fetchmail-6.4.0.beta4)
	for <debbugs@localhost> (single-drop); Thu, 21 Jan 2021 10:10:04 +0000 (UTC)
Received: from mx.hindley.org.uk (193-36-131-5.cfwn.uk [193.36.131.5])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by vm6.ganeti.dyne.org (Postfix) with ESMTPS id 7A51AF60574
	for <540@bugs.devuan.org>; Thu, 21 Jan 2021 11:00:12 +0100 (CET)
Received: from apollo.hindleynet ([192.168.1.3] helo=hindley.org.uk)
	by mx.hindley.org.uk with smtp (Exim 4.84_2)
	(envelope-from <mark@hindley.org.uk>)
	id 1l2Wl8-0003K9-Jy; Thu, 21 Jan 2021 10:00:10 +0000
Received: (nullmailer pid 25241 invoked by uid 1000);
	Thu, 21 Jan 2021 10:00:10 -0000
Date: Thu, 21 Jan 2021 10:00:10 +0000
From: Mark Hindley <mark@hindley.org.uk>
To: Frank <fbug@xs4all.nl>
Cc: 540@bugs.devuan.org
Subject: Re: bug#540: elogind unmounts /run/user/$UID tmpfs filesystem after
 logging in again
Message-ID: <YAlQqj7R/L1rZj2x@hindley.org.uk>
References: <799226dc9af49ffdf449c54e013032e1@xs4all.nl>
 <YAbC59HtYZjxzfBo@hindley.org.uk>
 <799226dc9af49ffdf449c54e013032e1@xs4all.nl>
 <0d28c7c8b0ca461ef8376eee0c5ec18e@xs4all.nl>
 <YAcjg31ZR9ilODdY@hindley.org.uk>
 <7b2bac156d658c49f638856d445a3b3b@xs4all.nl>
 <85c8573180e595ee5805d973cc6b1cfa@xs4all.nl>
 <YAhkQkGH3fTAAHdP@hindley.org.uk>
 <a15165161f13c160ee428ad13b24eb6d@xs4all.nl>
 <2a8c1d6c190c0213201a9f496e9363e0@xs4all.nl>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <2a8c1d6c190c0213201a9f496e9363e0@xs4all.nl>
X-Spam-Status: No, score=0.4 required=5.0 tests=RDNS_DYNAMIC,SPF_PASS
	autolearn=disabled version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tupac3.dyne.org

Frank,

Thanks. Very helpful.

On Wed, Jan 20, 2021 at 08:15:25PM +0100, Frank wrote:
> Adding "pam.setenv("XDG_SESSION_CLASS", "greeter");" to app.cpp, line 228,
> also works.
> That might be better than adding "export XDG_SESSION_CLASS=greeter" to
> "/etc/init.d/slim".

I am still trying to fully understand the implications of this.

It certainly makes sense for the slim login screen to be greeter class. But,
semantically, I would also expect the subsequent user login to be class user. I
don't yet know what other effects (if any) having the user login as class
greeter has.

Maybe we unset XDG_SESSION_CLASS again before pam.open_session? But maybe that
would no longer fix the issue you came across?

> Writing Display Managers (HOWTO):
> https://www.freedesktop.org/wiki/Software/systemd/writing-display-managers/

This seems to confirm that the user login itself should not be class greeter.

Mark

Acknowledgement sent to Mark Hindley <mark@hindley.org.uk>:
Extra info received and forwarded to list. Copy sent to Devuan Dev Team <devuan-dev@lists.dyne.org>. Full text available.
Information forwarded to devuan-bugs@lists.dyne.org, Devuan Dev Team <devuan-dev@lists.dyne.org>:
bug#540; Package slim. Full text available.

Message received at 540@bugs.devuan.org:


Received: (at 540) by bugs.devuan.org; 20 Jan 2021 19:20:02 +0000
Return-Path: <fbug@xs4all.nl>
Delivered-To: devuanbugs@dyne.org
Received: from tupac3.dyne.org [195.169.149.119]
	by doc.devuan.org with IMAP (fetchmail-6.4.0.beta4)
	for <debbugs@localhost> (single-drop); Wed, 20 Jan 2021 19:20:02 +0000 (UTC)
Received: from lb1-smtp-cloud7.xs4all.net (lb1-smtp-cloud7.xs4all.net [194.109.24.24])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by vm6.ganeti.dyne.org (Postfix) with ESMTPS id 3BC3DF604EB
	for <540@bugs.devuan.org>; Wed, 20 Jan 2021 20:15:26 +0100 (CET)
Authentication-Results: vm6.ganeti.dyne.org;
	dkim=pass (2048-bit key; secure) header.d=xs4all.nl header.i=@xs4all.nl header.b="DzwybuqU";
	dkim-atps=neutral
Received: from webmail.xs4all.nl ([IPv6:2001:888:0:22:194:109:20:216])
	by smtp-cloud7.xs4all.net with ESMTPA
	id 2IwvlX034yutM2IwvlfJ41; Wed, 20 Jan 2021 20:15:25 +0100
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2;
	t=1611170125; bh=89etCOjt99x3hA7QcXfMR5Me51+Km6ufJz6Q1X80Wx4=;
	h=MIME-Version:Date:From:To:Subject:Message-ID:Content-Type:From:
	 Subject;
	b=DzwybuqUw0QNHk4fBsPexXsZFYbD8qQQJFUAXt0cUy3USuihGZYQd25Ju0OniD0q3
	 bKkO4RKImInmOjl2G8wrjH0YhzbXw0+1+/l1cP72Yhylo8I4QYEW4Pe8KyHa6CH5YM
	 lIGOfhTMYApfVL5ks9AahvyjSrQRYnsgAauGDq6jny6llO3rXQmth5o49Ki7Ur80nu
	 aYFkUOEyUijczoUjlI7PxSohkSWSkKyf5HcVKxT2eC5YVsXMHMfv0ZajUdqEGz/iLo
	 MUqbSCauMPsIi/KXBDMBkhaL57tLK8AM8MTLdMTo4hJAekjQJD7QEt5+eCfNpFyWEa
	 ab6YrNXprntZQ==
Received: from roothub.nl ([83.68.19.244])
 by webmail.xs4all.nl
 with HTTP (HTTP/1.1 POST); Wed, 20 Jan 2021 20:15:25 +0100
MIME-Version: 1.0
Date: Wed, 20 Jan 2021 20:15:25 +0100
From: Frank <fbug@xs4all.nl>
To: Mark Hindley <mark@hindley.org.uk>
Cc: 540@bugs.devuan.org
Subject: Re: bug#540: elogind unmounts /run/user/$UID tmpfs filesystem after
 logging in again
In-Reply-To: <a15165161f13c160ee428ad13b24eb6d@xs4all.nl>
References: <799226dc9af49ffdf449c54e013032e1@xs4all.nl>
 <YAbC59HtYZjxzfBo@hindley.org.uk>
 <799226dc9af49ffdf449c54e013032e1@xs4all.nl>
 <0d28c7c8b0ca461ef8376eee0c5ec18e@xs4all.nl>
 <YAcjg31ZR9ilODdY@hindley.org.uk>
 <7b2bac156d658c49f638856d445a3b3b@xs4all.nl>
 <85c8573180e595ee5805d973cc6b1cfa@xs4all.nl>
 <YAhkQkGH3fTAAHdP@hindley.org.uk>
 <a15165161f13c160ee428ad13b24eb6d@xs4all.nl>
Message-ID: <2a8c1d6c190c0213201a9f496e9363e0@xs4all.nl>
X-Sender: fbug@xs4all.nl
User-Agent: XS4ALL Webmail
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit
X-CMAE-Envelope: MS4xfCbfZJ0jYsPvIiZ/YiM7dSmGgiQbt4Dtq/jSPbsfv9wDFWxXIVMyTZaOEvCP/QC8E+pFOCY8XtHRhHdNxqwx4JyOov15G/Sb5CkPRNWGoBHTZ4D/UU9f
 ucfTGRShc3iNYJIwOArb6FOUteUEYQmY/AnVaFm1hd+mKTnIiPe4dRqKZZLgq1MrpnvfSgVPTFuZwqkhEImHdpYGAwy+Qyqg3AWqqzgagL1s6eEncIkN37cX
 3Sxnu9jTVaioKGsBTXh9Fg==
X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED,
	DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,
	RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS autolearn=disabled
	version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tupac3.dyne.org

Adding "pam.setenv("XDG_SESSION_CLASS", "greeter");" to app.cpp, line 
228, also works.
That might be better than adding "export XDG_SESSION_CLASS=greeter" to 
"/etc/init.d/slim".

The decision is yours.

More info:
[gdm] pam: set XDG_SESSION_CLASS variable to "greeter" when setting up 
greeter PAM session: 
https://mail.gnome.org/archives/commits-list/2012-March/msg08054.html
Writing Display Managers (HOWTO): 
https://www.freedesktop.org/wiki/Software/systemd/writing-display-managers/

Acknowledgement sent to Frank <fbug@xs4all.nl>:
Extra info received and forwarded to list. Copy sent to Devuan Dev Team <devuan-dev@lists.dyne.org>. Full text available.
Information forwarded to devuan-bugs@lists.dyne.org, Devuan Dev Team <devuan-dev@lists.dyne.org>:
bug#540; Package slim. Full text available.

Message received at 540@bugs.devuan.org:


Received: (at 540) by bugs.devuan.org; 20 Jan 2021 18:10:02 +0000
Return-Path: <fbug@xs4all.nl>
Delivered-To: devuanbugs@dyne.org
Received: from tupac3.dyne.org [195.169.149.119]
	by doc.devuan.org with IMAP (fetchmail-6.4.0.beta4)
	for <debbugs@localhost> (single-drop); Wed, 20 Jan 2021 18:10:02 +0000 (UTC)
Received: from lb2-smtp-cloud7.xs4all.net (lb2-smtp-cloud7.xs4all.net [194.109.24.28])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by vm6.ganeti.dyne.org (Postfix) with ESMTPS id 8988FF6087C
	for <540@bugs.devuan.org>; Wed, 20 Jan 2021 19:07:17 +0100 (CET)
Authentication-Results: vm6.ganeti.dyne.org;
	dkim=pass (2048-bit key; secure) header.d=xs4all.nl header.i=@xs4all.nl header.b="nSaZwLzV";
	dkim-atps=neutral
Received: from webmail.xs4all.nl ([IPv6:2001:888:0:22:194:109:20:216])
	by smtp-cloud7.xs4all.net with ESMTPA
	id 2HszlWhoIyutM2HszlfAmN; Wed, 20 Jan 2021 19:07:17 +0100
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2;
	t=1611166037; bh=+ZmGTTAO7I38F5q3RFCBPx6/TX+tDuZKf0Ssg4ZRS9A=;
	h=MIME-Version:Date:From:To:Subject:Message-ID:Content-Type:From:
	 Subject;
	b=nSaZwLzVHawzpa8asgXjl/nONQp2h/uwuS6MysGGFLEx9/hwfl8ASiSU2Q/k3/T1o
	 BpuJ3ne1Bk4UUYCxsX15lX27WTC5o7MmCTtln/IRBISx0OvJvVHh/CM3TXpRgG7lOt
	 5IZ/Msc9EvU3/CJCp3OUWSrikZ9XUip0K6m5hlzhwhO6hbfLy8iNbVLn8G5acUqcdA
	 VkGElboNK5LCmVvz2uyFQJoUsaU4zFjvem7jH9xqSJi6rEXLuSbiWwqgx2+/ByFCre
	 9LCxqWFFnXDsx8Kfn0K+jh9zmPkmoI2w6N15mclEyrIzg7q1eOhrXTGxWRjcsczj71
	 K4w8EgAbyXRiw==
Received: from roothub.nl ([83.68.19.244])
 by webmail.xs4all.nl
 with HTTP (HTTP/1.1 POST); Wed, 20 Jan 2021 19:07:17 +0100
MIME-Version: 1.0
Date: Wed, 20 Jan 2021 19:07:17 +0100
From: Frank <fbug@xs4all.nl>
To: Mark Hindley <mark@hindley.org.uk>
Cc: 540@bugs.devuan.org
Subject: Re: bug#540: elogind unmounts /run/user/$UID tmpfs filesystem after
 logging in again
In-Reply-To: <YAhkQkGH3fTAAHdP@hindley.org.uk>
References: <799226dc9af49ffdf449c54e013032e1@xs4all.nl>
 <YAbC59HtYZjxzfBo@hindley.org.uk>
 <799226dc9af49ffdf449c54e013032e1@xs4all.nl>
 <0d28c7c8b0ca461ef8376eee0c5ec18e@xs4all.nl>
 <YAcjg31ZR9ilODdY@hindley.org.uk>
 <7b2bac156d658c49f638856d445a3b3b@xs4all.nl>
 <85c8573180e595ee5805d973cc6b1cfa@xs4all.nl>
 <YAhkQkGH3fTAAHdP@hindley.org.uk>
Message-ID: <a15165161f13c160ee428ad13b24eb6d@xs4all.nl>
X-Sender: fbug@xs4all.nl
User-Agent: XS4ALL Webmail
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit
X-CMAE-Envelope: MS4xfCerq9Bnm2vqEoIE0HHjPKYKGEg9A84+6PxE3iVQDh8H9/uRAfBLmo0Sy58gLJPM0AQvXRrOfWl/TjjjRmeHCcaTDL7pbVyf4p0Uxi4qOHUDFBDKZw58
 TfzB5f/z2ZHC4QBiGhotOXxVldZxZ7ekGpyuOfSERweBPDpFmQB6bsWxql8E8o+CMiW3XPuGm3Y5DHofMyJG8d8aby6z3pkhnNJHvbFVu40vBP/x8BvGS6PU
 BRksQtR8/9AVzd5QdgcLBA==
X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED,
	DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,
	RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS autolearn=disabled
	version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tupac3.dyne.org

Adding "pam.setenv("XDG_SESSION_CLASS", "greeter");" to app.cpp (line 
560) did not work for me, the environment variable is set, but the class 
(according to cmd "loginctl session-status") is still "user". But, 
adding "export XDG_SESSION_CLASS=greeter" to "/etc/init.d/slim" DID 
work, class became "greeter". Even better. Nice and clean.

Mark Hindley schreef op 2021-01-20 18:11:
> On Wed, Jan 20, 2021 at 04:31:25PM +0100, Frank wrote:
>> Hi Mark,
>> 
>> I played around with the slim PAM configuration and found a possible
>> solution: change the elogind class from "user" to "greeter". Slim does 
>> not
>> fork a helper process so changing it makes sense to me. When a new 
>> session
>> is created, previous sessions close in the background, even if the
>> logout/login cycle is rapid. Looks promising?
> 
> Interesting. I am wondering (from a very quick read of the docs) if we 
> can
> achieve the same by setting XDG_SESSION_CLASS within slim.
> 
> Thanks.
> 
> Mark

Acknowledgement sent to Frank <fbug@xs4all.nl>:
Extra info received and forwarded to list. Copy sent to Devuan Dev Team <devuan-dev@lists.dyne.org>. Full text available.
Information forwarded to devuan-bugs@lists.dyne.org, Devuan Dev Team <devuan-dev@lists.dyne.org>:
bug#540; Package slim. Full text available.

Message received at 540@bugs.devuan.org:


Received: (at 540) by bugs.devuan.org; 20 Jan 2021 17:20:02 +0000
Return-Path: <mark@hindley.org.uk>
Delivered-To: devuanbugs@dyne.org
Received: from tupac3.dyne.org [195.169.149.119]
	by doc.devuan.org with IMAP (fetchmail-6.4.0.beta4)
	for <debbugs@localhost> (single-drop); Wed, 20 Jan 2021 17:20:02 +0000 (UTC)
Received: from mx.hindley.org.uk (193-36-131-5.cfwn.uk [193.36.131.5])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by vm6.ganeti.dyne.org (Postfix) with ESMTPS id E8290F604B7
	for <540@bugs.devuan.org>; Wed, 20 Jan 2021 18:11:34 +0100 (CET)
Received: from apollo.hindleynet ([192.168.1.3] helo=hindley.org.uk)
	by mx.hindley.org.uk with smtp (Exim 4.84_2)
	(envelope-from <mark@hindley.org.uk>)
	id 1l2H10-0006NY-Rf; Wed, 20 Jan 2021 17:11:31 +0000
Received: (nullmailer pid 6556 invoked by uid 1000);
	Wed, 20 Jan 2021 17:11:30 -0000
Date: Wed, 20 Jan 2021 17:11:30 +0000
From: Mark Hindley <mark@hindley.org.uk>
To: Frank <fbug@xs4all.nl>
Cc: 540@bugs.devuan.org
Subject: Re: bug#540: elogind unmounts /run/user/$UID tmpfs filesystem after
 logging in again
Message-ID: <YAhkQkGH3fTAAHdP@hindley.org.uk>
References: <799226dc9af49ffdf449c54e013032e1@xs4all.nl>
 <YAbC59HtYZjxzfBo@hindley.org.uk>
 <799226dc9af49ffdf449c54e013032e1@xs4all.nl>
 <0d28c7c8b0ca461ef8376eee0c5ec18e@xs4all.nl>
 <YAcjg31ZR9ilODdY@hindley.org.uk>
 <7b2bac156d658c49f638856d445a3b3b@xs4all.nl>
 <85c8573180e595ee5805d973cc6b1cfa@xs4all.nl>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <85c8573180e595ee5805d973cc6b1cfa@xs4all.nl>
X-Spam-Status: No, score=0.4 required=5.0 tests=RDNS_DYNAMIC,SPF_PASS
	autolearn=disabled version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tupac3.dyne.org

On Wed, Jan 20, 2021 at 04:31:25PM +0100, Frank wrote:
> Hi Mark,
> 
> I played around with the slim PAM configuration and found a possible
> solution: change the elogind class from "user" to "greeter". Slim does not
> fork a helper process so changing it makes sense to me. When a new session
> is created, previous sessions close in the background, even if the
> logout/login cycle is rapid. Looks promising?

Interesting. I am wondering (from a very quick read of the docs) if we can
achieve the same by setting XDG_SESSION_CLASS within slim.

Thanks.

Mark

Acknowledgement sent to Mark Hindley <mark@hindley.org.uk>:
Extra info received and forwarded to list. Copy sent to Devuan Dev Team <devuan-dev@lists.dyne.org>. Full text available.
Information forwarded to devuan-bugs@lists.dyne.org, Devuan Dev Team <devuan-dev@lists.dyne.org>:
bug#540; Package slim. Full text available.

Message received at 540@bugs.devuan.org:


Received: (at 540) by bugs.devuan.org; 20 Jan 2021 15:40:03 +0000
Return-Path: <fbug@xs4all.nl>
Delivered-To: devuanbugs@dyne.org
Received: from tupac3.dyne.org [195.169.149.119]
	by doc.devuan.org with IMAP (fetchmail-6.4.0.beta4)
	for <debbugs@localhost> (single-drop); Wed, 20 Jan 2021 15:40:03 +0000 (UTC)
Received: from lb1-smtp-cloud7.xs4all.net (lb1-smtp-cloud7.xs4all.net [194.109.24.24])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by vm6.ganeti.dyne.org (Postfix) with ESMTPS id E33D1F604D6
	for <540@bugs.devuan.org>; Wed, 20 Jan 2021 16:31:25 +0100 (CET)
Authentication-Results: vm6.ganeti.dyne.org;
	dkim=pass (2048-bit key; secure) header.d=xs4all.nl header.i=@xs4all.nl header.b="eBCoh7Y0";
	dkim-atps=neutral
Received: from webmail.xs4all.nl ([IPv6:2001:888:0:22:194:109:20:216])
	by smtp-cloud7.xs4all.net with ESMTPA
	id 2FS9lW05HyutM2FS9leqhA; Wed, 20 Jan 2021 16:31:25 +0100
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2;
	t=1611156685; bh=bmjUMuO9MVO2yY6WltKc7q0W/MtpUx8JHYVfJEpUYt4=;
	h=MIME-Version:Date:From:To:Subject:Message-ID:Content-Type:From:
	 Subject;
	b=eBCoh7Y02nVmc+ttWjkVBV5hH9xnyEkldtHsZXjKseqprtDmtEsFDt3UpnQ/iKgzc
	 A6rfkXz5/PFP8Yg7SWBQQc4yBIz/Nlrv1HSvFZPPF96oDRpQ2xEountmm7jPEzyHJa
	 3ZxBFvbcbpnvJ0PBBQ13l+H0gJxc8beLOMrfyal6AZul0aQ18cLw5Bc/2BpHyPfLfC
	 jH0n8Bye9Wyof4msd4e4ZBBpW1psrSLIkgj1GINq/VEGHKLtKPZ2HbLp480aV6IqdZ
	 2SDDHnA9GHpaIoZtstEQgW+d4LysE4irxKJUmwalxylY4uh13kbyzs+dtHteCyxOGX
	 jPp027qb8iUcg==
Received: from roothub.nl ([83.68.19.244])
 by webmail.xs4all.nl
 with HTTP (HTTP/1.1 POST); Wed, 20 Jan 2021 16:31:25 +0100
MIME-Version: 1.0
Date: Wed, 20 Jan 2021 16:31:25 +0100
From: Frank <fbug@xs4all.nl>
To: Mark Hindley <mark@hindley.org.uk>, 540@bugs.devuan.org
Subject: Re: bug#540: elogind unmounts /run/user/$UID tmpfs filesystem after
 logging in again
In-Reply-To: <7b2bac156d658c49f638856d445a3b3b@xs4all.nl>
References: <799226dc9af49ffdf449c54e013032e1@xs4all.nl>
 <YAbC59HtYZjxzfBo@hindley.org.uk>
 <799226dc9af49ffdf449c54e013032e1@xs4all.nl>
 <0d28c7c8b0ca461ef8376eee0c5ec18e@xs4all.nl>
 <YAcjg31ZR9ilODdY@hindley.org.uk>
 <7b2bac156d658c49f638856d445a3b3b@xs4all.nl>
Message-ID: <85c8573180e595ee5805d973cc6b1cfa@xs4all.nl>
X-Sender: fbug@xs4all.nl
User-Agent: XS4ALL Webmail
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit
X-CMAE-Envelope: MS4xfJyUyHnKDpFJleP8JiMy7AyPwGAWZzifQAXFrMYtZh52ulNAPKerDWr0LACXE6sH1P0g5MGvuabt/UIQu2xqLCjWSqY52cUvZkHpIKXtSrPy0kNXIO5a
 DgibLFpphXLMKbeCv/MRfYecpfdZBAHdn6hbtgI/VWBYq26B99rAsNK5JfrTiNuR3cjIgV/hyeLdapuq5j5ARmSpAjVaqXyjyM1pOgkGF/Qc6Y7i7aF4uaOe
 +sKAGusHHn2pHV2v0y/d+A==
X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED,
	DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,
	RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS autolearn=disabled
	version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tupac3.dyne.org

Hi Mark,

I played around with the slim PAM configuration and found a possible 
solution: change the elogind class from "user" to "greeter". Slim does 
not fork a helper process so changing it makes sense to me. When a new 
session is created, previous sessions close in the background, even if 
the logout/login cycle is rapid. Looks promising?

This is what I changed (needs polishing, obviously):

--- common-session	2020-05-30 17:32:28.000000000 +0200
+++ common-session-slim	2021-01-20 16:01:33.521567369 +0100
@@ -22,5 +22,5 @@
  session	required			pam_permit.so
  # and here are more per-package modules (the "Additional" block)
  session	required	pam_unix.so
-session	optional			pam_elogind.so
+session	optional	pam_elogind.so class=greeter
  # end of pam-auth-update config

--- slim.orig	2020-01-07 12:09:49.000000000 +0100
+++ slim	2021-01-20 15:55:39.223866000 +0100
@@ -14,7 +14,7 @@
  session [success=ok ignore=ignore module_unknown=ignore default=bad]    
pam_selinux.so close
  session required        pam_limits.so
  session required        pam_loginuid.so
-@include common-session
+@include common-session-slim
  # SELinux needs to intervene at login time to ensure that the process
  # starts in the proper default security context. Only sessions which 
are
  # intended to run in the user's context should be run after this.

The result:
---------------------------- snip -------------------------------
devuan@devuan:~$ loginctl list-sessions; loginctl session-status
SESSION  UID USER   SEAT  TTY
       1 1000 devuan seat0
      c3 1000 devuan seat0

2 sessions listed.
c3 - devuan (1000)
            Since: Wed 2021-01-20 16:04:01 CET; 2s ago
           Leader: 4556 (slim)
             Seat: seat0; vc7
          Display: :0.0
           Remote: user root
          Service: slim; type x11; class greeter
            State: active
---------------------------- snip -------------------------------

Regards,
Frank

> I agree with you that the issue it not easy to fix. I ran into it when
> I was configuring my .xsessionrc and could not figure out what I did
> wrong in order to break the runtime directory. I usually just login
> once a day at most, so I won't run into the issue very often.
> 
> At least the workaround - add "UserStopDelaySec=infinity" to section
> [Login] in config file /etc/elogind/logind.conf - works, but isn't
> great either. Perhaps it would be best to deprecate Slim and switch
> the default DM to either LightDM or SDDM?
> 
> Anyway, I'll play around with the Slim config and PAM config some more
> (until I get bored). If I find a solution (against all odds) I'll let
> you know.
> 

Acknowledgement sent to Frank <fbug@xs4all.nl>:
Extra info received and forwarded to list. Copy sent to Devuan Dev Team <devuan-dev@lists.dyne.org>. Full text available.
Information forwarded to devuan-bugs@lists.dyne.org, Devuan Dev Team <devuan-dev@lists.dyne.org>:
bug#540; Package slim. Full text available.

Message received at 540@bugs.devuan.org:


Received: (at 540) by bugs.devuan.org; 20 Jan 2021 12:50:04 +0000
Return-Path: <fbug@xs4all.nl>
Delivered-To: devuanbugs@dyne.org
Received: from tupac3.dyne.org [195.169.149.119]
	by doc.devuan.org with IMAP (fetchmail-6.4.0.beta4)
	for <debbugs@localhost> (single-drop); Wed, 20 Jan 2021 12:50:04 +0000 (UTC)
Received: from lb1-smtp-cloud7.xs4all.net (lb1-smtp-cloud7.xs4all.net [194.109.24.24])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by vm6.ganeti.dyne.org (Postfix) with ESMTPS id 79425F60404
	for <540@bugs.devuan.org>; Wed, 20 Jan 2021 13:41:50 +0100 (CET)
Authentication-Results: vm6.ganeti.dyne.org;
	dkim=pass (2048-bit key; secure) header.d=xs4all.nl header.i=@xs4all.nl header.b="cxbHXAJ5";
	dkim-atps=neutral
Received: from webmail.xs4all.nl ([IPv6:2001:888:0:22:194:109:20:216])
	by smtp-cloud7.xs4all.net with ESMTPA
	id 2Co1lV8H8yutM2Co1leMJf; Wed, 20 Jan 2021 13:41:50 +0100
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2;
	t=1611146510; bh=0Y9GFQsHj10DLe9L6896i11916p0NqvZeFz7mfUeL2c=;
	h=MIME-Version:Date:From:To:Subject:Message-ID:Content-Type:From:
	 Subject;
	b=cxbHXAJ5Ved0NJVqUkCzS6MrKrXURsvqlOnfkWJSMFA+lkE3KD5oq8HsNRRFJhiWW
	 rtOczIO3dhresxhWCX8gbFkSYeppBzCfCeIeEwQo1wI7y2CRGf5/yEvvFS7gcRa+Dh
	 uvibuzGneEm1sx4mhwPBSWKc2pTrJD87+1MUA2V/axhagYk2cvhb4UC96EETBwJXvm
	 lk0BhvsWIjg0ovrZ5x34C8INRkZ1FAdmdlE+QWp/Th9OhK3PxGDT6TZ9YwnwPtbKsz
	 l/bAsXgbqQ+xeTY+WwN4shV1zDHkR8uPnZwifhwoddDji//nQtGVeqvqS+Vgf2kJrQ
	 GvYJ/pSrmWfZA==
Received: from roothub.nl ([83.68.19.244])
 by webmail.xs4all.nl
 with HTTP (HTTP/1.1 POST); Wed, 20 Jan 2021 13:41:49 +0100
MIME-Version: 1.0
Date: Wed, 20 Jan 2021 13:41:49 +0100
From: Frank <fbug@xs4all.nl>
To: Mark Hindley <mark@hindley.org.uk>, 540@bugs.devuan.org
Subject: Re: bug#540: elogind unmounts /run/user/$UID tmpfs filesystem after
 logging in again
In-Reply-To: <YAcjg31ZR9ilODdY@hindley.org.uk>
References: <799226dc9af49ffdf449c54e013032e1@xs4all.nl>
 <YAbC59HtYZjxzfBo@hindley.org.uk>
 <799226dc9af49ffdf449c54e013032e1@xs4all.nl>
 <0d28c7c8b0ca461ef8376eee0c5ec18e@xs4all.nl>
 <YAcjg31ZR9ilODdY@hindley.org.uk>
Message-ID: <7b2bac156d658c49f638856d445a3b3b@xs4all.nl>
X-Sender: fbug@xs4all.nl
User-Agent: XS4ALL Webmail
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit
X-CMAE-Envelope: MS4xfDQwR1+5QTjLqFBDQLx4Hyl9wEoyXOrRCzhxEUEJW/POkIeGmblBfcooIJscTV48yzfGCzWeUlSFLZliArGEJm8jVFn1QpGHnqkzRVRyNJ68A+svt35o
 wTMVHvYGMqn/JCxK8Oa8///WOmjr+TV/UqFnz6yBisIp7/N6KiOzM5uJIFiwZ4md/cvHhIWUeAa1Aswb85EVwg8NvhK77NJS5Fpz7zRozUu8Yu5Z76dI0Unk
 QhDHgYMS81NObxpdONiGmQ==
X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED,
	DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,
	RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS autolearn=disabled
	version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tupac3.dyne.org

I agree with you that the issue it not easy to fix. I ran into it when I 
was configuring my .xsessionrc and could not figure out what I did wrong 
in order to break the runtime directory. I usually just login once a day 
at most, so I won't run into the issue very often.

At least the workaround - add "UserStopDelaySec=infinity" to section 
[Login] in config file /etc/elogind/logind.conf - works, but isn't great 
either. Perhaps it would be best to deprecate Slim and switch the 
default DM to either LightDM or SDDM?

Anyway, I'll play around with the Slim config and PAM config some more 
(until I get bored). If I find a solution (against all odds) I'll let 
you know.

> 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/

Acknowledgement sent to Frank <fbug@xs4all.nl>:
Extra info received and forwarded to list. Copy sent to Devuan Dev Team <devuan-dev@lists.dyne.org>. Full text available.
Information forwarded to devuan-bugs@lists.dyne.org, Devuan Dev Team <devuan-dev@lists.dyne.org>:
bug#540; Package slim. Full text available.
Changed bug title to 'slim fails to get logind session if logout/login cycle is rapid' from 'elogind unmounts /run/user/$UID tmpfs filesystem after logging in again'. Request was from Mark Hindley <mark@hindley.org.uk> to control@bugs.devuan.org. Full text available.
Set bug forwarded-to-address to 'https://github.com/elogind/elogind/issues/95'. Request was from Mark Hindley <mark@hindley.org.uk> to 540-submit@bugs.devuan.org. Full text available.
Removed tag(s) moreinfo. Request was from Mark Hindley <mark@hindley.org.uk> to 540-submit@bugs.devuan.org. Full text available.
No longer marked as found in versions 241.4-2. Request was from Mark Hindley <mark@hindley.org.uk> to 540-submit@bugs.devuan.org. Full text available.
bug reassigned from package 'elogind' to 'slim'. Request was from Mark Hindley <mark@hindley.org.uk> to 540-submit@bugs.devuan.org. Full text available.

Message received at 540@bugs.devuan.org:


Received: (at 540) by bugs.devuan.org; 19 Jan 2021 18:30:03 +0000
Return-Path: <mark@hindley.org.uk>
Delivered-To: devuanbugs@dyne.org
Received: from tupac3.dyne.org [195.169.149.119]
	by doc.devuan.org with IMAP (fetchmail-6.4.0.beta4)
	for <debbugs@localhost> (single-drop); Tue, 19 Jan 2021 18:30:03 +0000 (UTC)
Received: from mx.hindley.org.uk (193-36-131-5.cfwn.uk [193.36.131.5])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by vm6.ganeti.dyne.org (Postfix) with ESMTPS id 2D8C7F604D8
	for <540@bugs.devuan.org>; Tue, 19 Jan 2021 19:23:02 +0100 (CET)
Received: from apollo.hindleynet ([192.168.1.3] helo=hindley.org.uk)
	by mx.hindley.org.uk with smtp (Exim 4.84_2)
	(envelope-from <mark@hindley.org.uk>)
	id 1l1vee-0007d7-12; Tue, 19 Jan 2021 18:23:00 +0000
Received: (nullmailer pid 21328 invoked by uid 1000);
	Tue, 19 Jan 2021 18:22:59 -0000
Date: Tue, 19 Jan 2021 18:22:59 +0000
From: Mark Hindley <mark@hindley.org.uk>
To: Frank <fbug@xs4all.nl>, 540@bugs.devuan.org
Subject: Re: bug#540: elogind unmounts /run/user/$UID tmpfs filesystem after
 logging in again
Message-ID: <YAcjg31ZR9ilODdY@hindley.org.uk>
References: <799226dc9af49ffdf449c54e013032e1@xs4all.nl>
 <YAbC59HtYZjxzfBo@hindley.org.uk>
 <799226dc9af49ffdf449c54e013032e1@xs4all.nl>
 <0d28c7c8b0ca461ef8376eee0c5ec18e@xs4all.nl>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <0d28c7c8b0ca461ef8376eee0c5ec18e@xs4all.nl>
X-Debbugs-No-Ack: No Thanks
X-Spam-Status: No, score=0.4 required=5.0 tests=RDNS_DYNAMIC,SPF_PASS
	autolearn=disabled version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tupac3.dyne.org

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/


Information forwarded to devuan-bugs@lists.dyne.org:
bug#540; Package elogind. Full text available.

Message received at 540@bugs.devuan.org:


Received: (at 540) by bugs.devuan.org; 19 Jan 2021 14:00:01 +0000
Return-Path: <fbug@xs4all.nl>
Delivered-To: devuanbugs@dyne.org
Received: from tupac3.dyne.org [195.169.149.119]
	by doc.devuan.org with IMAP (fetchmail-6.4.0.beta4)
	for <debbugs@localhost> (single-drop); Tue, 19 Jan 2021 14:00:01 +0000 (UTC)
Received: from lb2-smtp-cloud8.xs4all.net (lb2-smtp-cloud8.xs4all.net [194.109.24.25])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by vm6.ganeti.dyne.org (Postfix) with ESMTPS id CA373F60A13
	for <540@bugs.devuan.org>; Tue, 19 Jan 2021 14:51:04 +0100 (CET)
Authentication-Results: vm6.ganeti.dyne.org;
	dkim=pass (2048-bit key; secure) header.d=xs4all.nl header.i=@xs4all.nl header.b="W7S0fsKW";
	dkim-atps=neutral
Received: from webmail.xs4all.nl ([IPv6:2001:888:0:22:194:109:20:208])
	by smtp-cloud8.xs4all.net with ESMTPA
	id 1rPTlCIdEftvz1rPTl4oDk; Tue, 19 Jan 2021 14:51:04 +0100
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2;
	t=1611064264; bh=OsREwZxW8uNSuvEdSaq3hVhGU183MSLV8TyB0rKH6dI=;
	h=MIME-Version:Date:From:To:Subject:Message-ID:Content-Type:From:
	 Subject;
	b=W7S0fsKW9okAxBFXUmZ/ZcKtE+XUYPypEkln7QojfvsZTCHIjpzcLmxrELmbE7rUR
	 Fps4Sw0VBVFQTHUDVb0fwmGdUG6TX5oDKA6WsAuOWjtIk4NWh/jYVMaV/z+ZhfAsLe
	 kCBN8QbEHIn9LO+KI4TaVBGdGLAAntA5pyukR4TDGKa1OG1nzG984u0kdNzOUqVR4A
	 Z/P8xnseGfawHt+iF+noH/CQb4WkLk9FVZSGoprcHq2T5mTJyOd0GlNK5jH+QtH7P1
	 YrSqBvn5hSKuQI2XacF9FSfEi9+DpfKHGyM47MAW1or8yugIgN9EtGeuDB8MLgUgaR
	 v7ptnRYI35Fpg==
Received: from roothub.nl ([83.68.19.244])
 by webmail.xs4all.nl
 with HTTP (HTTP/1.1 POST); Tue, 19 Jan 2021 14:51:03 +0100
MIME-Version: 1.0
Date: Tue, 19 Jan 2021 14:51:03 +0100
From: Frank <fbug@xs4all.nl>
To: Mark Hindley <mark@hindley.org.uk>, 540@bugs.devuan.org
Subject: Re: bug#540: elogind unmounts /run/user/$UID tmpfs filesystem after
 logging in again
In-Reply-To: <YAbC59HtYZjxzfBo@hindley.org.uk>
References: <799226dc9af49ffdf449c54e013032e1@xs4all.nl>
 <YAbC59HtYZjxzfBo@hindley.org.uk>
Message-ID: <0d28c7c8b0ca461ef8376eee0c5ec18e@xs4all.nl>
X-Sender: fbug@xs4all.nl
User-Agent: XS4ALL Webmail
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit
X-CMAE-Envelope: MS4xfJturo4DvGhFV6TfOqj5JvGAASFMz3f13vyAnwqHWgM5wjdmvsH71JfybFcRrNHKtHzVriMbyTjv6q0DQR8rHpYdICDieu4U60eWoc20cX8ZyiKJQl/g
 EerQabFYMSuN5Ru6pqfBkk4nME8VWDGvtr9PBEB4+93F6ol5k/2Md/QVEpVuJn5Z/ON0F0U0HutEFQk7202La/7zrpaPAy/BOT0sftKGH4wP0MAnUubLEuuy
 pPeLXhEoXVWe9K2s7pIqXQ==
X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
	DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,
	RCVD_IN_MSPIKE_WL,SPF_PASS autolearn=disabled version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tupac3.dyne.org

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.

Regards,
Frank

Mark Hindley schreef op 2021-01-19 12:30:
> Control: tags -1 moreinfo
> 
> Frank,
> 
> Thanks for this.
> 
> On Mon, Jan 18, 2021 at 09:12:24PM +0100, Frank wrote:
>> Package: elogind
>> Version: 241.4-2
>> 
>> elogind unmounts /run/user/$UID tmpfs filesystem after logging in 
>> again. It
>> should not do that.
>> 
>> Devuan was installed using the Refracta installer that is available on 
>> the
>> iso-file devuan_beowulf_3.0.0_amd64_desktop-live.iso.
>> Unable to reproduce the issue in a VM booted of iso-file
>> devuan_beowulf_3.0.0_i386_desktop-live.iso /
>> devuan_beowulf_3.0.0_amd64_desktop-live.iso.
>> 
>> Steps to reproduce (new install, new user, default settings):
>> 1) login to the XFCE desktop environment.
>> 2) in a terminal window, exec df. This shows, amongst others, a tmpfs
>> filesystem mounted at /run/user/$UID.
>> 3) log out and log back in (rapidly).
> 
> Your comment about 'rapidly' reminds me of an issue I have seen 
> before[1]. It is
> only apparent using slim as DM and is really a bug in slim. Can you 
> confirm if
> that is what you have been using?
> 
> Thanks
> 
> Mark
> 
> 
> [1]  https://github.com/elogind/elogind/issues/95

Acknowledgement sent to Frank <fbug@xs4all.nl>:
Extra info received and forwarded to list. Copy sent to Mark Hindley <mark@hindley.org.uk>. Full text available.
Information forwarded to devuan-bugs@lists.dyne.org, Mark Hindley <mark@hindley.org.uk>:
bug#540; Package elogind. Full text available.
Added tag(s) moreinfo. Request was from Mark Hindley <mark@hindley.org.uk> to 540-submit@bugs.devuan.org. Full text available.

Message received at 540@bugs.devuan.org:


Received: (at 540) by bugs.devuan.org; 19 Jan 2021 11:40:02 +0000
Return-Path: <mark@hindley.org.uk>
Delivered-To: devuanbugs@dyne.org
Received: from tupac3.dyne.org [195.169.149.119]
	by doc.devuan.org with IMAP (fetchmail-6.4.0.beta4)
	for <debbugs@localhost> (single-drop); Tue, 19 Jan 2021 11:40:02 +0000 (UTC)
Received: from mx.hindley.org.uk (193-36-131-5.cfwn.uk [193.36.131.5])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by vm6.ganeti.dyne.org (Postfix) with ESMTPS id 86D85F60BE9
	for <540@bugs.devuan.org>; Tue, 19 Jan 2021 12:30:50 +0100 (CET)
Received: from apollo.hindleynet ([192.168.1.3] helo=hindley.org.uk)
	by mx.hindley.org.uk with smtp (Exim 4.84_2)
	(envelope-from <mark@hindley.org.uk>)
	id 1l1pDl-0005nK-25; Tue, 19 Jan 2021 11:30:49 +0000
Received: (nullmailer pid 14566 invoked by uid 1000);
	Tue, 19 Jan 2021 11:30:47 -0000
Date: Tue, 19 Jan 2021 11:30:47 +0000
From: Mark Hindley <mark@hindley.org.uk>
To: Frank <fbug@xs4all.nl>, 540@bugs.devuan.org
Subject: Re: bug#540: elogind unmounts /run/user/$UID tmpfs filesystem after
 logging in again
Message-ID: <YAbC59HtYZjxzfBo@hindley.org.uk>
References: <799226dc9af49ffdf449c54e013032e1@xs4all.nl>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <799226dc9af49ffdf449c54e013032e1@xs4all.nl>
X-Debbugs-No-Ack: No Thanks
X-Spam-Status: No, score=0.4 required=5.0 tests=RDNS_DYNAMIC,SPF_PASS
	autolearn=disabled version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tupac3.dyne.org

Control: tags -1 moreinfo

Frank,

Thanks for this.

On Mon, Jan 18, 2021 at 09:12:24PM +0100, Frank wrote:
> Package: elogind
> Version: 241.4-2
> 
> elogind unmounts /run/user/$UID tmpfs filesystem after logging in again. It
> should not do that.
> 
> Devuan was installed using the Refracta installer that is available on the
> iso-file devuan_beowulf_3.0.0_amd64_desktop-live.iso.
> Unable to reproduce the issue in a VM booted of iso-file
> devuan_beowulf_3.0.0_i386_desktop-live.iso /
> devuan_beowulf_3.0.0_amd64_desktop-live.iso.
> 
> Steps to reproduce (new install, new user, default settings):
> 1) login to the XFCE desktop environment.
> 2) in a terminal window, exec df. This shows, amongst others, a tmpfs
> filesystem mounted at /run/user/$UID.
> 3) log out and log back in (rapidly).

Your comment about 'rapidly' reminds me of an issue I have seen before[1]. It is
only apparent using slim as DM and is really a bug in slim. Can you confirm if
that is what you have been using?

Thanks

Mark


[1]  https://github.com/elogind/elogind/issues/95


Information forwarded to devuan-bugs@lists.dyne.org:
bug#540; Package elogind. Full text available.

Message received at submit@bugs.devuan.org:


Received: (at submit) by bugs.devuan.org; 18 Jan 2021 20:20:02 +0000
Return-Path: <fbug@xs4all.nl>
Delivered-To: devuanbugs@dyne.org
Received: from tupac3.dyne.org [195.169.149.119]
	by doc.devuan.org with IMAP (fetchmail-6.4.0.beta4)
	for <debbugs@localhost> (single-drop); Mon, 18 Jan 2021 20:20:01 +0000 (UTC)
Received: from lb2-smtp-cloud7.xs4all.net (lb2-smtp-cloud7.xs4all.net [194.109.24.28])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by vm6.ganeti.dyne.org (Postfix) with ESMTPS id D91DDF608D1
	for <submit@bugs.devuan.org>; Mon, 18 Jan 2021 21:12:25 +0100 (CET)
Authentication-Results: vm6.ganeti.dyne.org;
	dkim=pass (2048-bit key; secure) header.d=xs4all.nl header.i=@xs4all.nl header.b="dKo4u7B6";
	dkim-atps=neutral
Received: from webmail.xs4all.nl ([IPv6:2001:888:0:22:194:109:20:208])
	by smtp-cloud7.xs4all.net with ESMTPA
	id 1asylKjZxyutM1asylZrM9; Mon, 18 Jan 2021 21:12:25 +0100
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2;
	t=1611000745; bh=fOMHvQNloKTSWTnvPLQgHxwIv3Q4bHKRQQ3sQIaEY6E=;
	h=MIME-Version:Date:From:To:Subject:Message-ID:Content-Type:From:
	 Subject;
	b=dKo4u7B6I3SLZIwl8qARfeMjo8IlczTlt9izIrtl1fNrbJmZYxLQ6p7aIagxRn8dd
	 XJsDxM7sVK/noOB0Ke+SFZT/5pmUcXXK0S6OKTJjkmUBM7Xdss4lsKY9IHU4eRGDU8
	 S0kPfYe1EIhwAIkSiFgFs/noAFLyRJtt0uTXpREV3e0u3NhuegqHFZCWrUuVE6uBIz
	 6fOw+61wbOtRRxbMjxkVKANxBXI0urusmHLEhGMhYf0IJ0eXgTrYXRQ5sYkBK/9Z2K
	 P+UzCjcZlv4t70Ik2b+e99OdXMJJfSaPqIZrxe34EgotFs4lr8Phja/ARlbupOCHbb
	 k2opaSGXsW8pA==
Received: from roothub.nl ([83.68.19.244])
 by webmail.xs4all.nl
 with HTTP (HTTP/1.1 POST); Mon, 18 Jan 2021 21:12:24 +0100
MIME-Version: 1.0
Date: Mon, 18 Jan 2021 21:12:24 +0100
From: Frank <fbug@xs4all.nl>
To: submit@bugs.devuan.org
Subject: elogind unmounts /run/user/$UID tmpfs filesystem after logging in
 again
Message-ID: <799226dc9af49ffdf449c54e013032e1@xs4all.nl>
X-Sender: fbug@xs4all.nl
User-Agent: XS4ALL Webmail
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit
X-CMAE-Envelope: MS4xfKekSjxC7JaX//qT94YO4ypxqpK9Psoo5HCNBHF7qMSO5B/mMtlj0YuBmFDTwpN6TMnzQrsO+GF9dYeTJJWyNmdXBKcNcuycXAUgkanE7smXSo3FXNiw
 vtDHcrii5Mzuqairt0oMRa9ozCCjpSFXvE4tDoLplI+/Glc2n5p8LKY906tSRUu+YPQHyP3pMFMpHe8QFo/GxseNSevdZaCCykc2RLf8/9wJYyDDBkxu8hQG
X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED,
	DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,
	RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS autolearn=disabled
	version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tupac3.dyne.org

Package: elogind
Version: 241.4-2

elogind unmounts /run/user/$UID tmpfs filesystem after logging in again. 
It should not do that.

Devuan was installed using the Refracta installer that is available on 
the iso-file devuan_beowulf_3.0.0_amd64_desktop-live.iso.
Unable to reproduce the issue in a VM booted of iso-file 
devuan_beowulf_3.0.0_i386_desktop-live.iso / 
devuan_beowulf_3.0.0_amd64_desktop-live.iso.

Steps to reproduce (new install, new user, default settings):
1) login to the XFCE desktop environment.
2) in a terminal window, exec df. This shows, amongst others, a tmpfs 
filesystem mounted at /run/user/$UID.
3) log out and log back in (rapidly).
4) in a terminal window, exec watch df. This shows, amongst others, the 
same tmpfs filesystem mounted at /run/user/$UID.
5) wait and watch closely.
6) df no longer shows the tmpfs filesystem mounted at /run/user/$UID, it 
was unmounted by elogind even though the user is still logged in.

Workaround: at "UserStopDelaySec=infinity" to section [Login] in config 
file /etc/elogind/logind.conf. The tmpfs mounted at /run/user/$UID will 
remain available until system reboot.
Workaround: after logout, wait for the tmpfs mounted at /run/user/$UID 
to be unmounted.


Acknowledgement sent to Frank <fbug@xs4all.nl>:
New bug report received and forwarded. Copy sent to Mark Hindley <mark@hindley.org.uk>. Full text available.
Report forwarded to devuan-bugs@lists.dyne.org, Mark Hindley <mark@hindley.org.uk>:
bug#540; Package elogind. Full text available.

Devuan BTS -- Powered by Debian bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.

Devuan Bugs Owner <owner@bugs.devuan.org>.
Last modified: Sun, 22 May 2022 18:39:02 UTC