Bug#1070295: cgroupfs-mount: Fails to upgrade or remove if elogind is running: "umount: /sys/fs/cgroup/elogind: target is busy."

2024-05-03 Thread Mark Hindley
Lorenzo,

Thanks for the reminder.

On Fri, May 03, 2024 at 03:10:57PM +0200, Lorenzo wrote:
> Is this is a duplicate of #950986?
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=950986
> I bet the patch there would fix this bug too

Embarrassingly, that is my patch which I clearly have no recollection of! :-|

Now I look, we have been shipping a variation on it in Devuan since 2020[1].

Mark

[1]  
https://git.devuan.org/devuan/cgroupfs-mount/commit/ff91abfaf3a5c5633744ea552084125ec6c68ce5



Bug#1070295: cgroupfs-mount: Fails to upgrade or remove if elogind is running: "umount: /sys/fs/cgroup/elogind: target is busy."

2024-05-03 Thread Lorenzo
Hi,

On Fri, 03 May 2024 13:05:15 +0200 Axel Beckert  wrote:
> Package: cgroupfs-mount
> Severity: serious
> Version: 1.4+nmu1
> 
> Hi,
> 
> cgroupfs-mount fails to upgrade from 1.4 to 1.4+nmu1 for me (elogind +
> sysvinit) as follows:
> 
> Setting up cgroupfs-mount (1.4+nmu1) ...
> Unmounting cgroupfs hierarchyumount: /sys/fs/cgroup/elogind: target
> is busy. invoke-rc.d: initscript cgroupfs-mount, action "restart"
> failed. dpkg: error processing package cgroupfs-mount (--configure):
>  installed cgroupfs-mount package post-installation script subprocess
> returned error exit status 1
> 
>

Is this is a duplicate of #950986?
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=950986
I bet the patch there would fix this bug too

Lorenzo



Bug#1070295: cgroupfs-mount: Fails to upgrade or remove if elogind is running: "umount: /sys/fs/cgroup/elogind: target is busy."

2024-05-03 Thread Mark Hindley
Axel,

On Fri, May 03, 2024 at 01:05:15PM +0200, Axel Beckert wrote:
> P.S.: Given that Christian's NMU doesn't even touch the maintainer
> scripts, I suspect that this issue is also present in version 1.4. I
> though didn't notice it before then, so it might be related to recent
> elogind changes, hence Cc'ing the Debian Init System Diversity Team,
> too.

Since this is the first cgroupfs-mount update since 2017 (which predates
elogind's arrival in Debian) I suspect it has always been there, just uncovered
by the cgroupfs-mount NMU.

My gut reaction is that cgroupfs-mount shouldn't be unmounting and remounting
cgroups on upgrade and it needs some dh_installinit magic in d/rules.

Mark



Bug#1070295: cgroupfs-mount: Fails to upgrade or remove if elogind is running: "umount: /sys/fs/cgroup/elogind: target is busy."

2024-05-03 Thread Axel Beckert
Package: cgroupfs-mount
Severity: serious
Version: 1.4+nmu1

Hi,

cgroupfs-mount fails to upgrade from 1.4 to 1.4+nmu1 for me (elogind +
sysvinit) as follows:

Setting up cgroupfs-mount (1.4+nmu1) ...
Unmounting cgroupfs hierarchyumount: /sys/fs/cgroup/elogind: target is busy.
invoke-rc.d: initscript cgroupfs-mount, action "restart" failed.
dpkg: error processing package cgroupfs-mount (--configure):
 installed cgroupfs-mount package post-installation script subprocess returned 
error exit status 1

Trying to remove the package fails in the same way:

Removing cgroupfs-mount (1.4+nmu1) ...
Unmounting cgroupfs hierarchyumount: /sys/fs/cgroup/elogind: target is busy.
invoke-rc.d: initscript cgroupfs-mount, action "stop" failed.
dpkg: error processing package cgroupfs-mount (--remove):
 installed cgroupfs-mount package pre-removal script subprocess returned error 
exit status 1

Stopping elogind before trying to unmount /sys/fs/cgroup/elogind solves
the issue.

P.S.: Given that Christian's NMU doesn't even touch the maintainer
scripts, I suspect that this issue is also present in version 1.4. I
though didn't notice it before then, so it might be related to recent
elogind changes, hence Cc'ing the Debian Init System Diversity Team,
too.

-- System Information:
Debian Release: trixie/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (600, 'testing'), (500, 'unstable-debug'), 
(500, 'buildd-unstable'), (110, 'experimental'), (1, 'experimental-debug'), (1, 
'buildd-experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.7.12-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled