Subject: bug#61011: ‘guix system vm’ spawns QEMU and hangs

From: Efraim Flashner <[email-masked]>
Date: Tue, 24 Jan 2023 12:24:33 +0200

On Sun, Jan 22, 2023 at 10:36:21PM +0100, Ludovic Courtès wrote:
> Hello,
> 
> On my Guix System machine, the ‘qemu-system-x86_64’ spawned by ‘guix
> system vm’ hangs after printing “Booting from ROM...”; it has to be
> terminated with SIGKILL, SIGINT is not enough.
> 
> Specifically:
> 
>   $(guix time-machine --commit=66188398c446bdf9ce044fa539536e9b54c28c60 \
>     -- system vm gnu/system/examples/bare-bones.tmpl) -m 1024  # Good.
> 
> … whereas:
> 
>   $(guix time-machine --commit=9923100a42ffa80f604c1c13a5e999e6a4c15146 \
>     -- system vm gnu/system/examples/bare-bones.tmpl) -m 1024  # Bad!
> 
> I thought the culprit might be this commit:
> 
>   commit 9923100a42ffa80f604c1c13a5e999e6a4c15146
>   Date:   Fri Dec 23 09:42:27 2022 +0200
> 
>       gnu: sgabios: Fix build on cross-build architectures.
> 
>       * gnu/packages/firmware.scm (sgabios)[arguments]: When cross-building
>       add a make-flag to use the correct objcopy.
> 
> … but even after reverting it on today’s master, QEMU occasionally hangs
> as before, though not always.
> 
> ‘qemu-minimal’ as used for “make check-system” seems to work fine.
> 
> There have been a number of packages unbundled, so I wonder if another
> one of these might be causing problems.
> 
> What do you think?

I remember feeling overwhelmed by the build failures after the
unbundling (but I didn't reach out! I should've said something.) and
worked to try and quickly fix the builds.

I looked at reverting it locally, but with or without that patch I got
the same derivation for sgabios when built on x86_64. I tried firing up
diffoscope and I found no differences between the sgabios built on
x86_64, aarch64 or armhf (wow!).

I've run diffoscope against the sga I tried firing up diffoscope and I
found no differences between the sgabios built on x86_64, aarch64 or
armhf (wow!).

I've run diffoscope against the sgabios.bin that we build and the one
that comes in the qemu release tarball and I've included the output in
the email.

-- 
Efraim Flashner   <[email-masked]>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted