From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#34276: =?UTF-8?Q?=E2=80=98guix?= system disk-im =?UTF-8?Q?age=E2=80=99?= successfully builds a bad image Date: Sat, 21 Mar 2020 16:58:02 +0100 Message-ID: <875zex1z05.fsf@gnu.org> References: <877eejfqmb.fsf@nckx> <7a36cb1fc7c68f5d63a324df49170cdc@waegenei.re> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:45054) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFgWd-0001nz-5F for bug-guix@gnu.org; Sat, 21 Mar 2020 11:59:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jFgWc-00078k-1t for bug-guix@gnu.org; Sat, 21 Mar 2020 11:59:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41858) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jFgWb-00078c-Uh for bug-guix@gnu.org; Sat, 21 Mar 2020 11:59:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jFgWb-0005au-U6 for bug-guix@gnu.org; Sat, 21 Mar 2020 11:59:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <7a36cb1fc7c68f5d63a324df49170cdc@waegenei.re> (Brice Waegeneire's message of "Thu, 19 Mar 2020 20:05:08 +0000") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane-mx.org@gnu.org Sender: "bug-Guix" To: Brice Waegeneire Cc: 34276@debbugs.gnu.org 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.