NetBSD Problem Report #57002
From hf@nt.tu-darmstadt.de Fri Sep 9 17:00:52 2022
Return-Path: <hf@nt.tu-darmstadt.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id C1BE71A921F
for <gnats-bugs@gnats.NetBSD.org>; Fri, 9 Sep 2022 17:00:51 +0000 (UTC)
Message-Id: <202209091700.289H0epd001104@Treffauer.nt.e-technik.tu-darmstadt.de>
Date: Fri, 9 Sep 2022 19:00:40 +0200 (CEST)
From: Hauke Fath <hf@spg.tu-darmstadt.de>
Reply-To: Hauke Fath <hf@spg.tu-darmstadt.de>
To: gnats-bugs@NetBSD.org
Cc: Hauke Fath <hf@spg.tu-darmstadt.de>
Subject: Starting NetBSD in a HVM DomU crashes Dom0
X-Send-Pr-Version: 3.95
>Number: 57002
>Category: kern
>Synopsis: Starting NetBSD in a HVM DomU crashes Dom0
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Sep 09 17:05:00 +0000 2022
>Last-Modified: Fri May 12 20:05:02 +0000 2023
>Originator: Hauke Fath
>Release: NetBSD 9.3
>Organization:
Technische Universitaet Darmstadt
>Environment:
System: NetBSD Treffauer 9.3 NetBSD 9.3 (FEUERKOGEL_DOM0-$Revision$) #0: Tue Aug 9 15:30:14 CEST 2022 hf@Hochstuhl:/var/obj/netbsd-builds/9/amd64/sys/arch/amd64/compile/FEUERKOGEL_DOM0 amd64
Architecture: x86_64
Machine: amd64
% pkg_info | grep xen
xenkernel413-4.13.4nb1 Xen 4.13.x Kernel
xentools413-4.13.4nb6 Userland Tools for Xen 4.13.x
%
>Description:
Starting a Xen HVM DomU from a NetBSD 9 install iso crashes
the Dom0 with
[...]
[ 296.6180677] xbd backend: attach device vg0-hazel_root (size 20971520) for domain 2
[ 300.3380380] pmap_unwire: wiring for pmap 0xffffb48004fcf060 va 0x7c0c00107000 did not change!
[ 334.8277708] pmap_unwire: wiring for pmap 0xffffb48004fcf060 va 0x7c0c00151000 did not change!
[ 334.8277708] pmap_unwire: wiring for pmap 0xffffb48004fcf060 va 0x7c0c00152000 did not change!
[ 334.8277708] pmap_unwire: wiring for pmap 0xffffb48004fcf060 va 0x7c0c00153000 did not change!
[ 337.3877490] pmap_unwire: wiring for pmap 0xffffb48004fcf060 va 0x7c0bf5dfc000 did not change!
[ 337.3877490] panic: kernel diagnostic assertion "pg->wire_count != 0" failed: file "/u/netbsd-9/src/sys/uvm/uvm_page.c", line 1618
[ 337.3877490] cpu0: Begin traceback...
[ 337.3977488] vpanic() at netbsd:vpanic+0x143
[ 337.3977488] kern_assert() at netbsd:kern_assert+0x48
[ 337.3977488] uvm_pageunwire() at netbsd:uvm_pageunwire+0x81
[ 337.3977488] uvm_fault_unwire_locked() at netbsd:uvm_fault_unwire_locked+0x135
[ 337.3977488] uvm_fault_unwire() at netbsd:uvm_fault_unwire+0x29
[ 337.3977488] physio_done() at netbsd:physio_done+0x77
[ 337.3977488] workqueue_worker() at netbsd:workqueue_worker+0xce
[ 337.3977488] cpu0: End traceback...
[ 337.3977488] dumping to dev 18,1 (offset=33554431, size=0): not possible
[ 337.3977488] rebooting...
(XEN) Hardware Dom0 shutdown: rebooting machine
(XEN) Resetting with ACPI MEMORY or I/O RESET_REG.[-- hf@localhost detached -- Fri Sep 9 18:44:46 2022]
>How-To-Repeat:
Set up a Xen DomU HVM configuration with an lvm disk device and a
NetBSD 9 iso image. Have it render to VNC.
Watch the boot freeze while probing the disk device, then
watch the Xen host crash and reboot.
The DomU configuration is
type = "hvm"
firmware = "seabios"
kernel = "/usr/pkg/libexec/xen/boot/hvmloader"
memory = 1024
vcpus = 1
acpi = 1
name = "Hazel"
ioemu = [ 'mac=00:16:3e:NN:MM:OO, bridge=bridge1' ]
disk = [ 'backendtype=phy, vdev=hda, target=/dev/mapper/vg0-hazel_root',
'vdev=hdb, devtype=cdrom, target=/var/tmp/NetBSD-9.0_STABLE-amd64.iso']
vga="cirrus"
vnc=1
vnclisten="127.0.0.1"
vncdisplay=10
serial = "pty"
>Fix:
Yes, please.
>Audit-Trail:
From: Brad Spencer <brad@anduin.eldar.org>
To: gnats-bugs@netbsd.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: kern/57002: Starting NetBSD in a HVM DomU crashes Dom0
Date: Fri, 09 Sep 2022 15:50:45 -0400
Hauke Fath <hf@spg.tu-darmstadt.de> writes:
>>Number: 57002
>>Category: kern
>>Synopsis: Starting NetBSD in a HVM DomU crashes Dom0
>>Confidential: no
>>Severity: critical
>>Priority: high
>>Responsible: kern-bug-people
>>State: open
>>Class: sw-bug
>>Submitter-Id: net
>>Arrival-Date: Fri Sep 09 17:05:00 +0000 2022
>>Originator: Hauke Fath
>>Release: NetBSD 9.3
>>Organization:
> Technische Universitaet Darmstadt
>>Environment:
>
>
> System: NetBSD Treffauer 9.3 NetBSD 9.3 (FEUERKOGEL_DOM0-$Revision$) #0: Tue Aug 9 15:30:14 CEST 2022 hf@Hochstuhl:/var/obj/netbsd-builds/9/amd64/sys/arch/amd64/compile/FEUERKOGEL_DOM0 amd64
> Architecture: x86_64
> Machine: amd64
> % pkg_info | grep xen
> xenkernel413-4.13.4nb1 Xen 4.13.x Kernel
> xentools413-4.13.4nb6 Userland Tools for Xen 4.13.x
> %
>
>>Description:
>
> Starting a Xen HVM DomU from a NetBSD 9 install iso crashes
> the Dom0 with
>
> [...]
> [ 296.6180677] xbd backend: attach device vg0-hazel_root (size 20971520) for domain 2
> [ 300.3380380] pmap_unwire: wiring for pmap 0xffffb48004fcf060 va 0x7c0c00107000 did not change!
> [ 334.8277708] pmap_unwire: wiring for pmap 0xffffb48004fcf060 va 0x7c0c00151000 did not change!
> [ 334.8277708] pmap_unwire: wiring for pmap 0xffffb48004fcf060 va 0x7c0c00152000 did not change!
> [ 334.8277708] pmap_unwire: wiring for pmap 0xffffb48004fcf060 va 0x7c0c00153000 did not change!
> [ 337.3877490] pmap_unwire: wiring for pmap 0xffffb48004fcf060 va 0x7c0bf5dfc000 did not change!
> [ 337.3877490] panic: kernel diagnostic assertion "pg->wire_count != 0" failed: file "/u/netbsd-9/src/sys/uvm/uvm_page.c", line 1618
> [ 337.3877490] cpu0: Begin traceback...
> [ 337.3977488] vpanic() at netbsd:vpanic+0x143
> [ 337.3977488] kern_assert() at netbsd:kern_assert+0x48
> [ 337.3977488] uvm_pageunwire() at netbsd:uvm_pageunwire+0x81
> [ 337.3977488] uvm_fault_unwire_locked() at netbsd:uvm_fault_unwire_locked+0x135
> [ 337.3977488] uvm_fault_unwire() at netbsd:uvm_fault_unwire+0x29
> [ 337.3977488] physio_done() at netbsd:physio_done+0x77
> [ 337.3977488] workqueue_worker() at netbsd:workqueue_worker+0xce
> [ 337.3977488] cpu0: End traceback...
>
> [ 337.3977488] dumping to dev 18,1 (offset=33554431, size=0): not possible
> [ 337.3977488] rebooting...
> (XEN) Hardware Dom0 shutdown: rebooting machine
> (XEN) Resetting with ACPI MEMORY or I/O RESET_REG.[-- hf@localhost detached -- Fri Sep 9 18:44:46 2022]
>
>
>
>>How-To-Repeat:
>
>
> Set up a Xen DomU HVM configuration with an lvm disk device and a
> NetBSD 9 iso image. Have it render to VNC.
>
> Watch the boot freeze while probing the disk device, then
> watch the Xen host crash and reboot.
>
> The DomU configuration is
>
> type = "hvm"
> firmware = "seabios"
> kernel = "/usr/pkg/libexec/xen/boot/hvmloader"
> memory = 1024
> vcpus = 1
> acpi = 1
> name = "Hazel"
> ioemu = [ 'mac=00:16:3e:NN:MM:OO, bridge=bridge1' ]
> disk = [ 'backendtype=phy, vdev=hda, target=/dev/mapper/vg0-hazel_root',
> 'vdev=hdb, devtype=cdrom, target=/var/tmp/NetBSD-9.0_STABLE-amd64.iso']
> vga="cirrus"
> vnc=1
> vnclisten="127.0.0.1"
> vncdisplay=10
> serial = "pty"
>
>>Fix:
>
> Yes, please.
>
>>Unformatted:
>
>
I saw this too with Xen 4.15 with a 9.2_STABLE DOM0 and mentioned this
all in a post on port-xen. The problem goes away for me if I use file
backstore and not LVM LVs. Further, I do not always get a immediate
crash, but the DOM0 *WILL* panic at some point usually in the 24 hours
or so after I messed with a HVM that trips this.
--
Brad Spencer - brad@anduin.eldar.org - KC8VKS - http://anduin.eldar.org
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: kern/57002: Starting NetBSD in a HVM DomU crashes Dom0
Date: Fri, 12 May 2023 20:02:44 +0000
This didn't make it to gnats (you tend to have to set the reply
address explicitly when replying to your own post)
------
From: Hauke Fath <hf@spg.tu-darmstadt.de>
To: kern-bug-people@netbsd.org, gnats-admin@netbsd.org
Subject: Re: kern/57002: Starting NetBSD in a HVM DomU crashes Dom0
Date: Fri, 9 Sep 2022 19:07:04 +0200
On 9/9/22 7:05 PM, Hauke Fath wrote:
> The DomU configuration is
>
> [...]
> kernel = "/usr/pkg/libexec/xen/boot/hvmloader"
Ignore that, it's wrong. Doesn't change the outcome, though.
--
The ASCII Ribbon Campaign Hauke Fath
() No HTML/RTF in email Institut f?r Nachrichtentechnik
/\ No Word docs in email TU Darmstadt
Respect for open standards Ruf +49-6151-16-21344
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.