Bug#1127314: systemd-binfmt: clobbers registrations from update-binfmts

Kevin Locke kevin at kevinlocke.name
Fri Feb 6 21:21:51 GMT 2026


Package: systemd
Version: 259-1
Severity: normal

Dear Maintainer,

systemd-binfmts unregisters binfmt_misc formats registered by
update-binfmts (from the binfmt-support package).  To demonstrate:

1. `apt install jarwrapper`
2. `update-binfmts --display` shows "jarwrapper (enabled)"
3. `apt install python3.14-minimal` (anything with /usr/lib/binfmt.d/*)
4. `update-binfmts --display` now shows "jarwrapper (disabled)"

I believe this occurs because the installation or removal of a package
with a file in /usr/lib/binfmt.d causes systemd-binfmt.service to be
restarted by the systemd deb-triggers, which calls
/usr/lib/systemd/systemd-binfmt, which unregisters all binfmt_misc
registrations (both on stop due to --unregister and on start when
called without arguments[1]).

This issue affects any package with a registration in /usr/share/binfmts
without a corresponding one in /usr/lib/binfmt.d.  The only packages I
am aware of are jarwrapper and packages providing a jexec-binfmt
alternative (e.g. openjdk-*-jre-headless).

Has a plan for how to handle binfmt_misc registrations in Debian been
discussed?  Are packages expected to provide both?  Should
systemd-binfmts avoid removing registrations from update-binfmts (and
vice versa) or is failure to provide both a bug in the package making
the registration?

Thanks for considering,
Kevin

[1]: https://github.com/systemd/systemd/blob/v259/src/binfmt/binfmt.c#L246-L247

-- Package-specific info:

-- System Information:
Debian Release: forky/sid
  APT prefers testing-debug
  APT policy: (990, 'testing-debug'), (990, 'testing'), (500, 'oldoldstable-security'), (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.18.0 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages systemd depends on:
ii  libc6              2.42-11+b1
ii  libssl3t64         3.5.5-1
ii  libsystemd-shared  259-1
ii  libsystemd0        259-1
ii  mount              2.41.3-3

Versions of packages systemd recommends:
ii  dbus [default-dbus-system-bus]   1.16.2-3
ii  linux-sysctl-defaults            4.15
ii  login                            1:4.16.0-2+really2.41.3-3
ii  systemd-cryptsetup               259-1
ii  systemd-timesyncd [time-daemon]  259-1

Versions of packages systemd suggests:
pn  libtss2-tcti-device0  <none>
ii  polkitd               127-1
pn  systemd-boot          <none>
ii  systemd-container     259-1
pn  systemd-homed         <none>
pn  systemd-repart        <none>
pn  systemd-resolved      <none>
ii  systemd-userdbd       259-1

Versions of packages systemd is related to:
ii  dbus-user-session  1.16.2-3
pn  dracut             <none>
ii  initramfs-tools    0.150
ii  libnss-systemd     259-1
ii  libpam-systemd     259-1
ii  udev               259-1

-- no debconf information



More information about the Pkg-systemd-maintainers mailing list