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

version graph

Package: slim; Maintainer for slim is Devuan Dev Team <devuan-dev@lists.dyne.org>; Source for slim is src:slim.

Reported by: Frank <fbug@xs4all.nl>

Date: Mon, 18 Jan 2021 20:33:01 UTC

Severity: normal

Fixed in version 1.3.6-5.2+devuan1

Done: dak@devuan.org

Forwarded to https://github.com/elogind/elogind/issues/95

Full log


🔗 View this message in rfc822 format

X-Loop: owner@bugs.devuan.org
Subject: bug#540: elogind unmounts /run/user/$UID tmpfs filesystem after logging in again
Reply-To: Frank <fbug@xs4all.nl>, 540@bugs.devuan.org
Resent-From: Frank <fbug@xs4all.nl>
Resent-To: devuan-bugs@lists.dyne.org
Resent-CC: Devuan Dev Team <devuan-dev@lists.dyne.org>
X-Loop: owner@bugs.devuan.org
Resent-Date: Wed, 20 Jan 2021 15:48:01 +0000
Resent-Message-ID: <handler.540.B540.16111572036227@bugs.devuan.org>
Resent-Sender: owner@bugs.devuan.org
X-Devuan-PR-Message: followup 540
X-Devuan-PR-Package: slim
X-Devuan-PR-Keywords: 
References: <799226dc9af49ffdf449c54e013032e1@xs4all.nl> <YAbC59HtYZjxzfBo@hindley.org.uk> <799226dc9af49ffdf449c54e013032e1@xs4all.nl> <0d28c7c8b0ca461ef8376eee0c5ec18e@xs4all.nl> <YAcjg31ZR9ilODdY@hindley.org.uk> <7b2bac156d658c49f638856d445a3b3b@xs4all.nl> <799226dc9af49ffdf449c54e013032e1@xs4all.nl>
Received: via spool by 540-submit@bugs.devuan.org id=B540.16111572036227
          (code B ref 540); Wed, 20 Jan 2021 15:48:01 +0000
Received: (at 540) by bugs.devuan.org; 20 Jan 2021 15:40:03 +0000
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
In-Reply-To: <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.
> 

Send a report that this bug log contains spam.


Devuan BTS -- Powered by Debian bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.

Devuan Bugs Owner <owner@bugs.devuan.org>.
Last modified: Sat Apr 27 20:20:48 2024;