Am 01.06.22 um 13:18 schrieb Colin Watson:
On Wed, Jun 01, 2022 at 11:25:21AM +0200, Michael Biebl wrote: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)Thanks for investigating that.
Thinking more about it, it might actually be preferrable, if this condition is shipped by binfmt-support via a drop-in config for systemd-binfmt.service.
This way, the condition is only evaluated when binfmt-support is actually installed.
I've attached a possible patch for that.Colin, could you please review and if you agree, I'd re-assign this bug report back to binfmt-support.
Michael
diff --git a/debian/binfmt-support.conf b/debian/binfmt-support.conf new file mode 100644 index 0000000..be7b3b7 --- /dev/null +++ b/debian/binfmt-support.conf @@ -0,0 +1,4 @@ +[Unit] +# Do not run systemd-binfmt.service if binfmt-support is installed +# as this can lead to race conditions during boot. +ConditionFileIsExecutable=!/usr/sbin/update-binfmts diff --git a/debian/binfmt-support.install b/debian/binfmt-support.install new file mode 100644 index 0000000..48b7269 --- /dev/null +++ b/debian/binfmt-support.install @@ -0,0 +1 @@ +debian/binfmt-support.conf lib/systemd/system/systemd-binfmt.service.d/
OpenPGP_signature
Description: OpenPGP digital signature

