From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 01 10:58:30 2019 Received: (at submit) by debbugs.gnu.org; 1 Feb 2019 15:58:30 +0000 Received: from localhost ([127.0.0.1]:55165 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gpbD4-0003Qo-H5 for submit@debbugs.gnu.org; Fri, 01 Feb 2019 10:58:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gpbD1-0003QX-Ls for submit@debbugs.gnu.org; Fri, 01 Feb 2019 10:58:29 -0500 Received: from lists.gnu.org ([209.51.188.17]:51972) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gpbCv-0006qZ-NF for submit@debbugs.gnu.org; Fri, 01 Feb 2019 10:58:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57081) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpbCu-0005lA-OC for bug-guix@gnu.org; Fri, 01 Feb 2019 10:58:21 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpbCt-0006pO-7e for bug-guix@gnu.org; Fri, 01 Feb 2019 10:58:20 -0500 Received: from tobias.gr ([2001:470:7405::1]:43716) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gpbCs-0006lv-1m for bug-guix@gnu.org; Fri, 01 Feb 2019 10:58:19 -0500 Received: by tobias.gr (OpenSMTPD) with ESMTP id 9420957b for ; Fri, 1 Feb 2019 15:58:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=tobias.gr; h=from:to :subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=2018; i=me@tobias.gr; bh=ta/uen3kb +winSWcV//ucKwK+DejGLRUIjU3C6FNOk4=; b=bFPWea5WiVsHKDSggbAi5Ddgm 2PLUWqQqQ2GDpGacUUsDNIQS/e/O3tqg70baUkMIQ2Ukm4bTfSSEt2mErCF78CUe +mXhIPaGGgsx5b2F/q4RiUU+AoVU5lwmHJmkC0hXxdepDTTB1JRf1Mq/I3vI81Os SF3h80+Pcph56lqox/DHf87M2nPsnX2Ejrp1eks1bd6B8h2dGmG8DKEqhzOmLX03 G8aIPcbY7P9NxsuAiFiQ5oa+XSxl0UHObF58EWbY/iRlNjkaPJyy4OXpaDpWqfGF yDVnjuWnVgnT+13iwOkUFgrEHJW5fM1RSUYKOecISPgmAcIJ30Pcchq69tp/g== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 68eec9ce (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Fri, 1 Feb 2019 15:58:07 +0000 (UTC) From: Tobias Geerinckx-Rice To: Bug Guix Subject: =?utf-8?Q?=E2=80=98guix?= system =?utf-8?Q?disk-image=E2=80=99?= successfully builds a bad image Date: Fri, 01 Feb 2019 16:57:48 +0100 Message-ID: <877eejfqmb.fsf@nckx> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:470:7405::1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) Hullo! I wanted to install this =E2=80=98Guix=E2=80=99 thing that everyone's so hy= ped up=20 about. I have a small forgotten script in my ~/guix.git that runs: ./pre-inst-env guix system disk-image --fallback=20 --image-size=3D1.5G \ gnu/system/install.scm This was written back when 1.5G was higher than the default. Now it's much lower and too small to store all the Guix. However,=20 the command completes =E2=80=98successfully=E2=80=99: copying 422 store items [#########: In srfi/srfi-1.scm: 466:18 19 (fold # ?) In unknown file: 18 (_ #=20 # ?) In ice-9/ftw.scm: 452:32 17 (loop _ _ #(21 1706421 16749 3 0 0 0 4096 1548869386=20 ?) ?) In srfi/srfi-1.scm: 466:18 16 (fold # ?) In unknown file: 15 (_ #=20 # ?) In ice-9/ftw.scm: 452:32 14 (loop _ _ #(21 1739151 16749 3 0 0 0 4096 1548869386=20 ?) ?) In srfi/srfi-1.scm: 466:18 13 (fold # ?) In unknown file: 12 (_ #=20 # ?) In ice-9/ftw.scm: 452:32 11 (loop _ _ #(21 1772091 16749 13 0 0 0 4096 1548869389=20 ?) ?) In srfi/srfi-1.scm: 466:18 10 (fold # ?) In unknown file: 9 (_ #=20 # ?) In ice-9/ftw.scm: 452:32 8 (loop _ _ #(21 2132258 16749 98 0 0 0 4096 1548869432=20 ?) ?) In srfi/srfi-1.scm: 466:18 7 (fold # ?) In unknown file: 6 (_ #=20 # ?) In ice-9/ftw.scm: 452:32 5 (loop _ _ #(21 4589344 16749 24 0 0 0 4096 1548869676=20 ?) ?) In srfi/srfi-1.scm: 466:18 4 (fold # ?) In unknown file: 3 (_ #=20 # ?) In ice-9/ftw.scm: 482:39 2 (loop _ _ #(21 4589402 16749 3 0 0 0 4096 1548869687=20 ?) ?) In ./guix/build/utils.scm: 312:27 1 (_=20 "/gnu/store/ricf82z3mqqrqim67jz3jlsglfm1g1a8-linux-?" ?) In unknown file: 0 (copy-file=20 "/gnu/store/ricf82z3mqqrqim67jz3jlsglfm1g1a?" ?) ERROR: In procedure copy-file: In procedure copy-file: No space left on device ^MESC[Kcopying 422 store items boot program=20 '/gnu/store/lbvrvrlqab4qpw9f907na445kppmknab-linux-vm-loader'=20 terminated, rebooting [ 1071.512054] Unregister pv shared memory for cpu 0 [ 1071.522414] reboot: Restarting system [ 1071.542285] reboot: machine restart successfully built=20 /gnu/store/lbyq5790j5hfq3spbm76i1yw3sj41l8b-disk-image.drv /gnu/store/dby523cy1l4wrqi8wwmk5ln9qr7g5mh8-disk-image Kind regards, T G-R Sent from my GNU Emacs From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 17 08:09:47 2019 Received: (at 34276) by debbugs.gnu.org; 17 Mar 2019 12:09:47 +0000 Received: from localhost ([127.0.0.1]:46988 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h5Ubr-0002M1-2I for submit@debbugs.gnu.org; Sun, 17 Mar 2019 08:09:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57936) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h5Ubo-0002Lp-Qz for 34276@debbugs.gnu.org; Sun, 17 Mar 2019 08:09:45 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43782) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h5Ubj-00064T-7O; Sun, 17 Mar 2019 08:09:39 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=41608 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h5Ubi-0003s4-Jr; Sun, 17 Mar 2019 08:09:39 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Tobias Geerinckx-Rice Subject: Re: bug#34276: =?utf-8?Q?=E2=80=98guix?= system =?utf-8?Q?disk-im?= =?utf-8?Q?age=E2=80=99?= successfully builds a bad image References: <877eejfqmb.fsf@nckx> Date: Sun, 17 Mar 2019 13:09:35 +0100 In-Reply-To: <877eejfqmb.fsf@nckx> (Tobias Geerinckx-Rice's message of "Fri, 01 Feb 2019 16:57:48 +0100") Message-ID: <878sxdzoqo.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 34276 Cc: 34276@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, Tobias Geerinckx-Rice 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 =E2=80=9Cpvpanic=E2=80=9D paravirtualized device (the = =E2=80=98pvpanic.ko=E2=80=99 module in the guest, and =E2=80=9C-device pvpanic=E2=80=9D on the QEMU comm= and line), but unfortunately that thing is almost undocumented and I can=E2=80=99t get= it to turn the panic into a non-zero exit code, nor do I know if it=E2=80=99s possible. Thoughts anyone? The other option would be to create a special file in the 9p mount that=E2=80=99s shared with the host upon success, but that seems a bit hack= y. Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 =C2=A9 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Court=C3= =A8s +;;; Copyright =C2=A9 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Cour= t=C3=A8s ;;; Copyright =C2=A9 2016 Mark H Weaver ;;; Copyright =C2=A9 2016 Jan Nieuwenhuizen ;;; Copyright =C2=A9 2017 Mathieu Othacehe @@ -279,6 +279,7 @@ FILE-SYSTEMS." "isci") ;for SAS controllers like Intel C= 602 '()) =20 + "pvpanic" ,@virtio-modules)) =20 (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)))) =20 (let ((initrd (or initrd (base-initrd file-systems --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed May 01 16:19:59 2019 Received: (at control) by debbugs.gnu.org; 1 May 2019 20:19:59 +0000 Received: from localhost ([127.0.0.1]:45017 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLvhs-0006RJ-B4 for submit@debbugs.gnu.org; Wed, 01 May 2019 16:19:56 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35946) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLvhr-0006R8-Gx for control@debbugs.gnu.org; Wed, 01 May 2019 16:19:55 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60551) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLvhl-0006cB-Rh for control@debbugs.gnu.org; Wed, 01 May 2019 16:19:50 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=48868 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hLvhl-0003Sv-3I for control@debbugs.gnu.org; Wed, 01 May 2019 16:19:49 -0400 Date: Wed, 01 May 2019 22:19:46 +0200 Message-Id: <87ef5iexlp.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #34276 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) severity 34276 important From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 01 16:37:59 2019 Received: (at control) by debbugs.gnu.org; 1 Sep 2019 20:37:59 +0000 Received: from localhost ([127.0.0.1]:57293 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4Wbm-0004gL-Q0 for submit@debbugs.gnu.org; Sun, 01 Sep 2019 16:37:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50195) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4Wbl-0004g6-CD for control@debbugs.gnu.org; Sun, 01 Sep 2019 16:37:57 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:52594) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i4Wbg-0008FK-8O for control@debbugs.gnu.org; Sun, 01 Sep 2019 16:37:52 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=41000 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i4Wbf-0000wz-Nz for control@debbugs.gnu.org; Sun, 01 Sep 2019 16:37:52 -0400 Date: Sun, 01 Sep 2019 22:37:50 +0200 Message-Id: <878sr792ht.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #34276 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) merge 34276 37164 quit From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 19 16:05:19 2020 Received: (at 34276) by debbugs.gnu.org; 19 Mar 2020 20:05:19 +0000 Received: from localhost ([127.0.0.1]:43663 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jF1Pr-0002IP-7b for submit@debbugs.gnu.org; Thu, 19 Mar 2020 16:05:19 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:60813) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jF1Pn-0002I7-F1 for 34276@debbugs.gnu.org; Thu, 19 Mar 2020 16:05:18 -0400 Received: from webmail.gandi.net (webmail18.sd4.0x35.net [10.200.201.18]) (Authenticated sender: brice@waegenei.re) by relay4-d.mail.gandi.net (Postfix) with ESMTPA id E7B0DE0007 for <34276@debbugs.gnu.org>; Thu, 19 Mar 2020 20:05:08 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Thu, 19 Mar 2020 20:05:08 +0000 From: Brice Waegeneire To: 34276@debbugs.gnu.org Subject: =?UTF-8?Q?Re=3A_bug=2334276=3A_=E2=80=98guix_system_disk-im_age?= =?UTF-8?Q?=E2=80=99_successfully_builds_a_bad_image?= Message-ID: <7a36cb1fc7c68f5d63a324df49170cdc@waegenei.re> X-Sender: brice@waegenei.re User-Agent: Roundcube Webmail/1.3.8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 34276 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hello Ludovic, > 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? I looked a little into it and I have found how to use pvpanic. Unfortunately it's not as straight forward as getting a non-zero exit code form qemu. When pvpanic is loaded in a VṂ, as you did with “-device pvpanic”, generate events[0] on the QMP interface when a crash happen and qemu either shutdown or pause when using --no-shutdown[1]. (gnu build marionette) which use the “-monitor” interface could be recycled to use “-qmp” a machine interface using JSON. Following is log of a QMP session where the guest panicked[2]: --8<---------------cut here---------------start------------->8--- { "QMP": { "version": { "qemu": { "micro": 0, "minor": 2, "major": 4 }, "package": "" }, "capabilities": [ "oob" ] } } { "execute": "qmp_capabilities" } { "return": { } } { "timestamp": { "seconds": 1584645026, "microseconds": 936550 }, "event": "GUEST_PANICKED", "data": { "action": "pause" } } { "timestamp": { "seconds": 1584645026, "microseconds": 936675 }, "event": "GUEST_PANICKED", "data": { "action": "poweroff" } } { "timestamp": { "seconds": 1584645026, "microseconds": 936776 }, "event": "SHUTDOWN", "data": { "guest": true, "reason": "guest-panic" } } --8<---------------cut here---------------end--------------->8--- [0]: https://github.com/qemu/qemu/blob/9ced5c7c20cb16dff0c2fa3242c3ee96b68cec2a/qapi/run-state.json#L339-L355 [1]: https://github.com/qemu/qemu/blob/4dd6517e369828171290b65e11f6a45aeeed15af/softmmu/vl.c#L1423-L1427 [2]: https://git.qemu.org/?p=qemu.git;a=blob_plain;f=docs/interop/qmp-intro.txt;hb=HEAD Brice. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 21 11:58:13 2020 Received: (at 34276) by debbugs.gnu.org; 21 Mar 2020 15:58:13 +0000 Received: from localhost ([127.0.0.1]:47828 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFgVo-0005ZI-Sl for submit@debbugs.gnu.org; Sat, 21 Mar 2020 11:58:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58072) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFgVn-0005Z5-80 for 34276@debbugs.gnu.org; Sat, 21 Mar 2020 11:58:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47018) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jFgVh-0006GY-ND; Sat, 21 Mar 2020 11:58:05 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=56006 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jFgVf-0007LV-NL; Sat, 21 Mar 2020 11:58:04 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Brice Waegeneire Subject: Re: bug#34276: =?utf-8?Q?=E2=80=98guix?= system disk-im =?utf-8?Q?age=E2=80=99?= successfully builds a bad image References: <877eejfqmb.fsf@nckx> <7a36cb1fc7c68f5d63a324df49170cdc@waegenei.re> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 2 Germinal an 228 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 21 Mar 2020 16:58:02 +0100 In-Reply-To: <7a36cb1fc7c68f5d63a324df49170cdc@waegenei.re> (Brice Waegeneire's message of "Thu, 19 Mar 2020 20:05:08 +0000") Message-ID: <875zex1z05.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 34276 Cc: 34276@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi Brice, Brice Waegeneire skribis: >> I investigated a bit. I managed to get our code to cause a kernel=20 >> panic >> upon failure (patch below). However I fail to turn that guest kernel >> panic into a different QEMU exit code. >>=20 >> I tried to use the =E2=80=9Cpvpanic=E2=80=9D paravirtualized device (the= =E2=80=98pvpanic.ko=E2=80=99 >> module in the guest, and =E2=80=9C-device pvpanic=E2=80=9D on the QEMU c= ommand line), >> but unfortunately that thing is almost undocumented and I can=E2=80=99t = get it >> to turn the panic into a non-zero exit code, nor do I know if it=E2=80= =99s >> possible. >>=20 >> Thoughts anyone? > > I looked a little into it and I have found how to use pvpanic. > Unfortunately it's not as straight forward as getting a non-zero exit > code form qemu. When pvpanic is loaded in a VM=CC=A3, as you did with=20 > =E2=80=9C-device > pvpanic=E2=80=9D, generate events[0] on the QMP interface when a crash ha= ppen > and qemu either shutdown or pause when using --no-shutdown[1]. > > (gnu build marionette) which use the =E2=80=9C-monitor=E2=80=9D interface= could be > recycled to use =E2=80=9C-qmp=E2=80=9D a machine interface using JSON. > > Following is log of a QMP session where the guest panicked[2]: Oooh, I see, thanks for digging into this! Any idea how to implement it? Is QMP a request/reply kind of interface like the monitor? Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 21 12:44:11 2020 Received: (at 34276) by debbugs.gnu.org; 21 Mar 2020 16:44:11 +0000 Received: from localhost ([127.0.0.1]:47897 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFhEJ-00071j-Az for submit@debbugs.gnu.org; Sat, 21 Mar 2020 12:44:11 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:45585) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFhEG-00071Q-Rx for 34276@debbugs.gnu.org; Sat, 21 Mar 2020 12:44:09 -0400 Received: from webmail.gandi.net (webmail18.sd4.0x35.net [10.200.201.18]) (Authenticated sender: brice@waegenei.re) by relay8-d.mail.gandi.net (Postfix) with ESMTPA id 671C61BF20B; Sat, 21 Mar 2020 16:44:02 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Sat, 21 Mar 2020 16:44:02 +0000 From: Brice Waegeneire To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Subject: =?UTF-8?Q?Re=3A_bug=2334276=3A_=E2=80=98guix_system_disk-im_age?= =?UTF-8?Q?=E2=80=99_successfully_builds_a_bad_image?= In-Reply-To: <875zex1z05.fsf@gnu.org> References: <877eejfqmb.fsf@nckx> <7a36cb1fc7c68f5d63a324df49170cdc@waegenei.re> <875zex1z05.fsf@gnu.org> Message-ID: X-Sender: brice@waegenei.re User-Agent: Roundcube Webmail/1.3.8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 34276 Cc: 34276@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hello Ludo, On 2020-03-21 15:58, Ludovic Courtès wrote: > Any idea how to implement it? Is QMP a request/reply kind of interface > like the monitor? Not really or I would have sent a patch instead. QMP is similar to the the monitor in the sense that you can send a command and receive a reply but it give us access to more features; in our case asynchronous events. To get notified by the pvpanic device that a panic occured on the guest it is needed to do the following: 1. Connect to the socket 2. Receive the server greetings 3. Respond with the capabilites request 4. Receive the capabilites respond 5. Listen on GUEST_PANICKED events The QMP specifications are available here[0]. [0]: https://git.qemu.org/?p=qemu.git;a=blob_plain;f=docs/interop/qmp-spec.txt;hb=HEAD Brice. From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 26 18:58:03 2020 Received: (at 34276-done) by debbugs.gnu.org; 26 Mar 2020 22:58:03 +0000 Received: from localhost ([127.0.0.1]:60349 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jHbRr-0004N9-52 for submit@debbugs.gnu.org; Thu, 26 Mar 2020 18:58:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54261) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jHbRp-0004Md-Jt for 34276-done@debbugs.gnu.org; Thu, 26 Mar 2020 18:58:01 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45507) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jHbRk-0007D3-0l; Thu, 26 Mar 2020 18:57:56 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=38830 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jHbRi-0006no-PG; Thu, 26 Mar 2020 18:57:55 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Tobias Geerinckx-Rice Subject: Re: bug#34276: =?utf-8?Q?=E2=80=98guix?= system =?utf-8?Q?disk-im?= =?utf-8?Q?age=E2=80=99?= successfully builds a bad image References: <877eejfqmb.fsf@nckx> <878sxdzoqo.fsf@gnu.org> Date: Thu, 26 Mar 2020 23:57:53 +0100 In-Reply-To: <878sxdzoqo.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sun, 17 Mar 2019 13:09:35 +0100") Message-ID: <877dz6911q.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 34276-done Cc: 34276-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi, Ludovic Court=C3=A8s skribis: > The other option would be to create a special file in the 9p mount > that=E2=80=99s shared with the host upon success, but that seems a bit ha= cky. Turns out that was easily done and better than the status quo. Done in commit be6520e6a58d7f6ee58f4cab76db9d1245410113! Ludo=E2=80=99. From unknown Sun Jun 15 08:47:16 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 24 Apr 2020 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator