From: "Ludovic Courtès" <ludo@gnu.org>
To: Tobias Geerinckx-Rice <me@tobias.gr>
Cc: 34276@debbugs.gnu.org
Subject: bug#34276: ‘guix system disk-image’ successfully builds a bad image
Date: Sun, 17 Mar 2019 13:09:35 +0100 [thread overview]
Message-ID: <878sxdzoqo.fsf@gnu.org> (raw)
In-Reply-To: <877eejfqmb.fsf@nckx> (Tobias Geerinckx-Rice's message of "Fri, 01 Feb 2019 16:57:48 +0100")
[-- Attachment #1: Type: text/plain, Size: 1194 bytes --]
Hello,
Tobias Geerinckx-Rice <me@tobias.gr> skribis:
> ERROR: In procedure copy-file:
> In procedure copy-file: No space left on device
> ^MESC[Kcopying 422 store items
> boot program
> '/gnu/store/lbvrvrlqab4qpw9f907na445kppmknab-linux-vm-loader'
> terminated, rebooting
> [ 1071.512054] Unregister pv shared memory for cpu 0
> [ 1071.522414] reboot: Restarting system
> [ 1071.542285] reboot: machine restart
> successfully built
> /gnu/store/lbyq5790j5hfq3spbm76i1yw3sj41l8b-disk-image.drv
I investigated a bit. I managed to get our code to cause a kernel panic
upon failure (patch below). However I fail to turn that guest kernel
panic into a different QEMU exit code.
I tried to use the “pvpanic” paravirtualized device (the ‘pvpanic.ko’
module in the guest, and “-device pvpanic” on the QEMU command line),
but unfortunately that thing is almost undocumented and I can’t get it
to turn the panic into a non-zero exit code, nor do I know if it’s
possible.
Thoughts anyone?
The other option would be to create a special file in the 9p mount
that’s shared with the host upon success, but that seems a bit hacky.
Thanks,
Ludo’.
[-- Attachment #2: Type: text/x-patch, Size: 1541 bytes --]
diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm
index 983c6d81c8..cb29a656b9 100644
--- a/gnu/system/linux-initrd.scm
+++ b/gnu/system/linux-initrd.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
@@ -279,6 +279,7 @@ FILE-SYSTEMS."
"isci") ;for SAS controllers like Intel C602
'())
+ "pvpanic"
,@virtio-modules))
(define-syntax %base-initrd-modules
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index e561285964..b671c74ab8 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -187,8 +187,9 @@ made available under the /xchg CIFS share."
;; When USER-BUILDER succeeds, reboot (indicating a
;; success), otherwise die, which causes a kernel panic
;; ("Attempted to kill init!").
- #~(when (zero? (system* #$user-builder))
- (reboot))))
+ #~(if (zero? (system* #$user-builder))
+ (reboot)
+ (exit 1))))
(let ((initrd (or initrd
(base-initrd file-systems
next prev parent reply other threads:[~2019-03-17 12:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-01 15:57 bug#34276: ‘guix system disk-image’ successfully builds a bad image Tobias Geerinckx-Rice
2019-03-17 12:09 ` Ludovic Courtès [this message]
2020-03-26 22:57 ` Ludovic Courtès
2020-03-19 20:05 ` bug#34276: ‘guix system disk-im age’ " Brice Waegeneire
2020-03-21 15:58 ` Ludovic Courtès
2020-03-21 16:44 ` Brice Waegeneire
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878sxdzoqo.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=34276@debbugs.gnu.org \
--cc=me@tobias.gr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).