GNU bug report logs - #36117
qemu-binfmt with non-native chroot

Previous Next

Package: guix;

Reported by: Vagrant Cascadian <vagrant <at> debian.org>

Date: Thu, 6 Jun 2019 17:56:01 UTC

Severity: normal

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #29 received at 36117 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: Vagrant Cascadian <vagrant <at> debian.org>, 36117 <at> debbugs.gnu.org
Subject: Re: [PATCH 4/4] services/qemu-binfmt: Use the F flag and the static
 output of QEMU.
Date: Tue, 23 Feb 2021 09:37:18 +0100
Hi Maxim,

Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:

> Fixes <https://issues.guix.gnu.org/36117>.
>
> Before this change, the 'binfmt_misc' entries registered for QEMU would not be
> usable in container contexts outside of guix-daemon (without manually bind
> mounting file names).
>
> For example:
>
> $ docker run --rm arm32v7/debian true
> standard_init_linux.go:207: exec user process caused "no such file or directory"
>
> After this change, any container can make use of the QEMU binfmt_misc
> registrations, as their corresponding QEMU static binaries are fully
> pre-loaded by the kernel.

[...]

> +++ b/gnu/services/virtualization.scm
> @@ -554,13 +554,14 @@ potential infinite waits blocking libvirt."))
>  ;;;
>  
>  ;; Platforms that QEMU can emulate.
> -(define-record-type <qemu-platform>
> -  (qemu-platform name family magic mask)
> +(define-record-type* <qemu-platform>

Since this is for internal consumption, I’m in favor of keeping plain
‘define-record-type’.  Also, I don’t think the “F” flag belongs here,
it’s mostly orthogonal.

>  (define qemu-binfmt-service-type
>    ;; TODO: Make a separate binfmt_misc service out of this?
>    (service-type (name 'qemu-binfmt)
> @@ -800,9 +833,7 @@ given QEMU package."
>                                            (const
>                                             (list %binary-format-file-system)))
>                         (service-extension shepherd-root-service-type
> -                                          qemu-binfmt-shepherd-services)
> -                       (service-extension guix-service-type
> -                                          qemu-binfmt-guix-chroot)))
> +                                          qemu-binfmt-shepherd-services)))

As discussed on IRC, the downside of this approach is increased disk and
memory footprint (those big binaries have to be loaded in memory).

One possibility would be to add an option to choose between this and the
current approach, but maybe it’s not worth the maintenance trouble.

Thoughts?

Thanks for fixing this issue!

Ludo’.




This bug report was last modified 4 years and 72 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.