Bug#1110414: systemd-sysv: Missing versioned dependency on libsystemd-shared

Julian Andres Klode jak at debian.org
Tue Aug 5 15:43:54 BST 2025


On Tue, Aug 05, 2025 at 03:19:51PM +0200, Samuel Thibault wrote:
> Control: reassign -1 systemd
> 
> Michael Biebl, le mar. 05 août 2025 11:43:39 +0200, a ecrit:
> > On Tue, 5 Aug 2025 01:28:27 +0200 Samuel Thibault <sthibault at debian.org>
> > wrote:
> > > Package: systemd-sysv
> > > And then I lost the box. On restart I am getting:
> > > 
> > > /sbin/init: error while loading shared libraries: libsystemd-core-252.so: cannot open shared object file: No such file or directory
> > > 
> > 
> > ...
> > 
> > > So it upgraded libsystemd-shared but didn't upgrade systemd-sysv
> > > alongside, and thus /sbin/init is now broken...
> > > 
> > > systemd-sysv must have a versioned dependency on libsystemd-shared to
> > > avoid such situation.
> 
> > I'm curious about this line:
> > > Suppression de sysvinit (2.88dsf-59) ...
> > 
> > Do you have some sysvinit left-overs which could have prevented the upgrade
> > of systemd?
> 
> There were some leftovers yes (initscripts insserv startpar sysv-rc) but
> the full-upgrade properly dropped them and let systemd upgrade. Once
> full-upgrade was finished, the reboot went completely fine.
> 
> > The systemd-sysv package only provides a bunch of compat symlinks, no actual
> > binaries.
> 
> Ah, right, didn't check that /sbin/init is actually a symlink.
> 
> > The actual binaries are shipped in the systemd package, which it has a
> > strictly versioned dependency on.
> > The systemd binary package itself has a strictly versioned dependency on
> > libsystemd-shared.
> 
> Indeed... Unfortunately, the corresponding dpkg.log didn't get written,
> all I know is that the system somehow rebooted by itself, the apt log is
> all I have left.
> 
> That being said, it does say what happens:
> 
> Dépaquetage de libsystemd-shared:amd64 (257.7-1) sur (252.38-1~deb12u1) ...
> Préparation du dépaquetage de .../9-libc6_2.41-11_amd64.deb ...
> Checking for services that may need to be restarted...
> Checking init scripts...
> Dépaquetage de libc6:amd64 (2.41-11) sur (2.36-9+deb12u10) ...
> Paramétrage de libc6:amd64 (2.41-11) ...
> Checking for services that may need to be restarted...
> Checking init scripts...
> 
> Restarting services possibly affected by the upgrade:
>   postgresql: restarting...done.
>   ssh: restarting...done.
>   exim4: restarting...done.
>   cron: restarting...done.
> 
> Services restarted successfully.
> [... and spontaneous reboot after some time]
> 
> It's upgrading libsystemd-shared before upgrading libc6, and the
> configuration of libc6 rightfully restarts some daemons, but then
> systemd is at a loss because at that point libsystemd-shared is upgraded
> but systemd is not (yet).
> 
> I can reproduce from a fresh bookworm system by doing the following to
> force the ordering that happened on my system:
> 
> sed -i s/bookworm/trixie/ /etc/apt/sources.list
> apt install base-files
> apt install --download-only libsystemd-shared
> cd /var/cache/apt/archives
> dpkg -i locales_*
> dpkg -i libsystemd-shared_*
> dpkg -i libc6_*
> 
> and there it restarts cron, and the machine does not respond any more at
> all. On system reset, I then get the 
> 
> /sbin/init: error while loading shared libraries: libsystemd-core-252.so: cannot open shared object file: No such file or directory
> 
> error.
> 
> 
> Setting a Pre-Depends on libc6 (>= 2.39) in the libsystemd-shared
> package would help make it ordered like systemd, and avoid the libc6
> configuration in-between, but there is no real guarantee that something
> else won't slip in-between and try to restart a service...
> 

I believe this mechanism sounds sound, but I'd like to get Helmut's
opinion on it too.

I wonder if there's a less invasive mechanism that we could use
than needlessly exactly ordering libsystemd-shared after libc6.

We need to figure out if there's any conflicting ordering where
libc6 needs to be ordered after libsystemd-shared, but I don't
believe there is.

We may prefer a

    Conflicts: libc6 (<< 2.39)

as we also might need to add some more packages that restart
"foreign" services - everything that restarts a service needs
to be ordered after both or neither systemd package are unpacked.
-- 
debian developer - deb.li/jak | jak-linux.org - free software dev
ubuntu core developer                              i speak de, en



More information about the Pkg-systemd-maintainers mailing list