libresociety
(libresociety openworld)
2023 年11 月 20 日 05:51
1
From Systemd v255-rc2 Changes:
The way services are spawned has been overhauled. Previously, a process was forked that shared all of the manager’s memory (via copy-on-write) while doing all the required setup (e.g.: mount namespaces, CGroup configuration, etc.) before exec’ing the target executable. This was problematic for various reasons: several glibc APIs were called that are not supposed to be used after a fork but before an exec, copy-on-write meant that if either process (the manager or the child) touched a memory page a copy was triggered, and also the memory footprint of the child process was that of the manager, but with the memory limits of the service. From this version onward, the new process is spawned using CLONE_VM and CLONE_VFORK semantics via posix_spawn(3), and it immediately execs a new internal binary, systemd-executor, that receives the configuration to apply via memfd, and sets up the process before exec’ing the target executable.
从 systemd v255 版本开始,引入了新二进制文件 systemd-executor
,这应当被包括在 initrd 中。 dracut 修复了这一错误 ,但尚未发布包括这一修改的新版本(实际上,上游已经接近两年没有发表新版本)。
dracut 的 Debian 软件包维护者表示,他已经向后移植修复,因此此问题应当在下次软件包更新时解决:
I’ve already included the upstream patch to the git master branch of dracut on salsa. The next dracut release in Debian will include the fix.
因此,运行 Debian Unstable/sid 且使用 dracut 生成其 initrd 的用户请考虑以下的选项:
修改其 dracut 配置以复制 systemd-executor
至 initrd 中
在 dracut 软件包更新以解决此问题前不要升级 systemd
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1056059
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1056108
opened 12:49AM - 17 Nov 23 UTC
closed 02:12AM - 17 Nov 23 UTC
pid1
not-our-bug
### systemd version the issue has been seen with
255 rc2-1
### Used distributi… on
Debian Sid
### Linux kernel version used
unsure
### CPU architectures issue was seen on
x86_64
### Component
other
### Expected behaviour you didn't see
System boots up fine
### Unexpected behaviour you saw
VERY early in the boot process, my desktop computer stops booting.
Thankfully, I have both a desktop and a laptop computer, so the following is manually "copy & pasted" - Ctrl-C, Ctrl-V isn't available to copy the text off my desktop computer and on to my laptop computer, so apologies for any spelling/capitalisation errors.
> [ 1.410816] systemd[1]: Inserted module 'autofs4'
> [ 1.418158] systemd[1]: systemd 255~rc2-1 running in system mode (+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZTD -BPF_FRAMEWORK -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified)
> [ 1.419059] systemd[1]: Detected architecture x86-64.
> [ 1.419365] systemd[1]: Running in initrd.
>
> Welcome to Debian GNU/Linux trixie/sid dracut-059-4 (Initramfs)!
>
> [ 1.420802] systemd[1]: No hostname configured, using default hostname.
> [ 1.421161] systemd[1]: Hostname set to <localhost>.
> [ 1.421507] systemd[1]: Initializing machine ID from random generator.
> [ 1.459899] systemd[1]: Failed to open executor binary '/usr/lib/systemd/systemd-executor': No such file or directory
> [ 1.460870] systemd[1]: Failed to allocate manager object: No such file or directory
> [!!!!!!] Failed to allocated manager object.
> [ 1.462055] systemd[1]: Freezing execution
Hitting the 'reset' button on my computer produces the same messages, with very slightly different timestamps, and an extra 3 lines:
> [ 1.608864] tsc: Refined TSC clocksource calibration: 3792.873 MHz
> [ 1.609464] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x6d5818a734c, max_idle_ns: 881590694765 ns
> [ 1.610090] clocksource: Switched to clocksource tsc
### Steps to reproduce the problem
1) `apt-get update`
2) `apt-get upgrade`
3) Reboot
NOTE: There was several hours between the `apt-get upgrade` and the reboot (which, technically, was me shutting down the computer just before I went to bed and turning it back on soon after breakfast this morning), I can't remember which packages were upgraded (though I do remember I had a handful of grub packages that had been held back for several days until yesterday) and I do remember that there were no packages that were being held back from being upgraded.
### Additional program output to the terminal or log subsystem illustrating the issue
_No response_