#1058880 systemd-binfmt.service: unit fails to start when /proc/sys/fs/binfmt_misc is not mounted

Package:
systemd
Source:
systemd
Description:
system and service manager
Submitter:
Aurelien Jarno
Date:
2024-02-28 11:57:14 UTC
Severity:
normal
Tags:
#1058880#5
Date:
2023-12-17 12:44:41 UTC
From:
To:
Dear maintainers,

When /proc/sys/fs/binfmt_misc is not mounted (on purpose),
systemd-binfmt.service fails to start:

× systemd-binfmt.service - Set Up Additional Binary Formats
     Loaded: loaded (/lib/systemd/system/systemd-binfmt.service; static)
     Active: failed (Result: exit-code) since Sat 2023-12-16 14:27:55 UTC; 22h ago
       Docs: man:systemd-binfmt.service(8)
             man:binfmt.d(5)
https://docs.kernel.org/admin-guide/binfmt-misc.html
https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
   Main PID: 1408 (code=exited, status=1/FAILURE)
        CPU: 5ms

déc. 16 14:27:54 prokofiev systemd[1]: Starting systemd-binfmt.service - Set Up Additional Binary Formats...
déc. 16 14:27:54 prokofiev systemd[1]: systemd-binfmt.service: Main process exited, code=exited, status=1/FAILURE
déc. 16 14:27:54 prokofiev systemd[1]: systemd-binfmt.service: Failed with result 'exit-code'.
déc. 16 14:27:54 prokofiev systemd[1]: Failed to start systemd-binfmt.service - Set Up Additional Binary Formats.
déc. 16 14:27:55 prokofiev systemd[1]: Starting systemd-binfmt.service - Set Up Additional Binary Formats...
déc. 16 14:27:55 prokofiev systemd[1]: systemd-binfmt.service: Main process exited, code=exited, status=1/FAILURE
déc. 16 14:27:55 prokofiev systemd[1]: systemd-binfmt.service: Failed with result 'exit-code'.
déc. 16 14:27:55 prokofiev systemd[1]: Failed to start systemd-binfmt.service - Set Up Additional Binary Formats.

This has already been fixed upstream by the following commit, which is
in trixie/sid, but not in bookworm:

commit f74a7cb45c2458f90de6d37c70fa3afc1a3be279
Author: Yu Watanabe <watanabe.yu+github@gmail.com>
Date:   Sat Dec 10 11:46:45 2022 +0900

    unit: check more specific path to be written by systemd-binfmt

    Follow-up for 41807efb1594ae8e71e0255e154ea7d17be2251a.
    Replaces #25690.

Would it be possible to backport this commit to bookworm?

Thanks,
Aurelien

#1058880#12
Date:
2023-12-18 00:47:51 UTC
From:
To:
Am 17.12.23 um 13:44 schrieb Aurelien Jarno:

Seems reasonable.
@Luca: can you include that in your next 252-stable batch? Should we
file this as an issue in systemd/systemd-stable as a reminder?

Regards,
Michael

#1058880#17
Date:
2023-12-31 16:43:50 UTC
From:
To:
This was cherry-picked into v252-stable and is part of v252.21 which is
very likely to be uploaded for the next Debian stable release.

#1058880#22
Date:
2023-12-31 16:44:56 UTC
From:
To:
Great, thanks!
#1058880#27
Date:
2023-12-31 16:59:04 UTC
From:
To:
Am 31.12.23 um 17:43 schrieb Michael Biebl:

s/uploaded/accepted/ , see

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1057861

#1058880#34
Date:
2024-02-28 11:54:45 UTC
From:
To:
Version: 252.22-1~deb12u1

stable has now 252.22, so closing for that version.

Michael