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.