binfmt-support.service errors with "unable to close /proc/sys/fs/binfmt_misc/register: File exists"

Michael Biebl biebl at debian.org
Wed Jun 1 10:25:21 BST 2022


Control: reassign -1 systemd
Control: severity -1 important
Control: affects -1 binfmt-support

Hi Facundo,

what you see here is a race condition between binfmt-support.service and 
systemd-binfmt.service.
E.g. qemu installs binfmt config files for both binfmt-support and 
systemd-binfmt leading to the issue you see.

I plan to add a
ConditionFileIsExecutable=!/usr/sbin/update-binfmts
to systemd-binfmt.service. This will disable systemd-binfmt.service when 
binfmt-support is installed and should mitigate this issue.
(thus reassigning to systemd)

Afaics binfmt-support has remained a Debian-only solution, so long-term 
I'd think it would be beneficial if we'd consider systemd-binfmt as a 
cross-distro solution.

There aren't that many packages installing config snippets in 
/usr/share/binfmts, so a transition seems reasonably doable.

Colin, what's your take on this?

Michael




On Mon, 30 May 2022 19:22:09 -0300 Facundo Gaich <facugaich at gmail.com> 
wrote:
> Package: binfmt-support
> Version: 2.2.1-2
> Severity: grave
> Justification: renders package unusable
> 
> Dear Maintainer,
> 
> The binfmt-support service fails to start, with the following output:
> 
> systemd[1]: Starting Enable support for additional executable binary formats...
> update-binfmts[536]: update-binfmts: warning: unable to close /proc/sys/fs/binfmt_misc/register: File exists
> update-binfmts[536]: update-binfmts: warning: unable to close /proc/sys/fs/binfmt_misc/register: File exists
> update-binfmts[536]: update-binfmts: warning: unable to close /proc/sys/fs/binfmt_misc/register: File exists
> update-binfmts[536]: update-binfmts: exiting due to previous errors
> systemd[1]: binfmt-support.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
> systemd[1]: binfmt-support.service: Failed with result 'exit-code'.
> systemd[1]: Failed to start Enable support for additional executable binary formats.
> 
> Best,
> Facundo
> 
> -- System Information:
> Debian Release: bookworm/sid
>   APT prefers unstable
>   APT policy: (500, 'unstable')
> Architecture: amd64 (x86_64)
> Foreign Architectures: i386
> 
> Kernel: Linux 5.17.0-3-amd64 (SMP w/6 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 /bin/dash
> Init: systemd (via /run/systemd/system)
> LSM: AppArmor: enabled
> 
> Versions of packages binfmt-support depends on:
> ii  libc6         2.33-7
> ii  libpipeline1  1.5.6-1
> ii  lsb-base      11.2
> 
> binfmt-support recommends no packages.
> 
> binfmt-support suggests no packages.
> 
> -- no debconf information
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20220601/e682d8dc/attachment-0001.sig>


More information about the Pkg-systemd-maintainers mailing list