Package: systemd Version: 250.4-1 Severity: normal Dear Maintainer,
I activated KillUserProcesses=true for systemd-logind by creating a file /etc/systemd/logind.conf.d/99-killuserprocs.conf with the content below. Some users have user session mounts configured by a unit file ~/.config/systemd/user/home-user-some-path.mount with the content similar to below. This leads to all stale user process being killed after logout, which was basically the intention. However, the user mount of type davfs also spawns a user process /sbin/mount.davfs each. Apparently, these processes get killed as well before a proper unmount of the user mounts. This leads to stale mount points and stale PID files requiring manual removal by the user before the directory can be mounted again. I would have expected that processes spawned by the mount unit file do not get killed by the logind session but are handled with the life cycle of the mount unit. I did not fiddle with the KillMode settin of the mount unit, because it says to be strongly discouraged by the man page. Yours Andreas. -- Content of 99-killuserprocs.conf: [Login] KillUserProcesses=true KillExcludeUsers=sddm root -- -- Content of ~/.config/systemd/user/home-user-some-path.mount: [Unit] Description=Nextcloud DAV mount [Install] WantedBy=default.target [Mount] What=https://some.server.example/nextcloud/remote.php/webdav/ Where=/home/user/some/path Type=davfs Options=noexec,nosuid,grpid,user,_netdev KillMode=mixed -- -- Package-specific info: -- System Information: Debian Release: bookworm/sid APT prefers testing APT policy: (990, 'testing'), (500, 'stable-security'), (500, 'stable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.16.0-1-amd64 (SMP w/4 CPU threads; PREEMPT) Kernel taint flags: TAINT_FIRMWARE_WORKAROUND Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages systemd depends on: ii adduser 3.121 ii libacl1 2.3.1-1 ii libapparmor1 3.0.4-2 ii libaudit1 1:3.0.7-1+b1 ii libblkid1 2.37.3-1+b1 ii libc6 2.33-7 ii libcap2 1:2.44-1 ii libcrypt1 1:4.4.27-1.1 ii libcryptsetup12 2:2.4.3-1 ii libfdisk1 2.37.3-1+b1 ii libgcrypt20 1.9.4-5 ii libgnutls30 3.7.3-4+b1 ii libgpg-error0 1.43-3 ii libip4tc2 1.8.7-1 ii libkmod2 29-1 ii liblz4-1 1.9.3-2 ii liblzma5 5.2.5-2 ii libmount1 2.37.3-1+b1 ii libpam0g 1.4.0-11 ii libseccomp2 2.5.3-2 ii libselinux1 3.3-1+b2 ii libsystemd0 250.4-1 ii libzstd1 1.4.9+dfsg-1 ii mount 2.37.3-1+b1 ii util-linux 2.37.3-1+b1 Versions of packages systemd recommends: ii dbus [default-dbus-system-bus] 1.14.0-1 ii ntp [time-daemon] 1:4.2.8p15+dfsg-1 Versions of packages systemd suggests: ii libfido2-1 1.10.0-1 ii libtss2-esys-3.0.2-0 3.2.0-1 ii libtss2-mu0 3.2.0-1 pn libtss2-rc0 <none> ii policykit-1 0.105-33 pn systemd-container <none> Versions of packages systemd is related to: ii dbus-user-session 1.14.0-1 pn dracut <none> ii initramfs-tools 0.140 ii libnss-systemd 250.4-1 ii libpam-systemd 250.4-1 ii udev 250.4-1 -- no debconf information