NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/58335 (Kernel panic when shutting down a virtual machine with Virtio devices)



The following reply was made to PR kern/58335; it has been noted by GNATS.

From: =?UTF-8?Q?Roddy_Gonz=C3=A1lez?= <roddy.gonzalez.89%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost, kern-bug-people%netbsd.org@localhost,
 netbsd-bugs%netbsd.org@localhost, gnats-admin%netbsd.org@localhost, riastradh%NetBSD.org@localhost
Cc: 
Subject: Re: kern/58335 (Kernel panic when shutting down a virtual machine
 with Virtio devices)
Date: Wed, 26 Jun 2024 13:54:33 +0200

 Hi! Thank you!
 
 I can't reproduce the problem anymore with kern.detachall=0. But with 
 kern.detach=1 I get a different panic.
 
 This is what I get with with kern.detachall=0.
 
 
 ```
   \\-__,------,___.
     \\        __,---`  NetBSD/x86 EFI Boot (x64)
      \\       `---,_.  Revision 1.2 (Tue Jun 25 16:58:24 UTC 2024)
       \\-,_____,.---`
        \\
         \\
          \\
 
  > boot
 21680896+795008+1302144 [947716+1416552+1038933]=0x1b3f8c0
 Loading /stand/amd64/10.99.10/modules/cd9660/cd9660.kmod
 [   1.0000000] cpu_rng: rdrand/rdseed
 [   1.0000000] entropy: ready
 [   1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
 [   1.0000000]     2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 
 2013,
 [   1.0000000]     2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 
 2023,
 [   1.0000000]     2024
 [   1.0000000]     The NetBSD Foundation, Inc.  All rights reserved.
 [   1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
 [   1.0000000]     The Regents of the University of California.  All 
 rights reserved.
 
 [   1.0000000] NetBSD 10.99.10 (GENERIC) #0: Tue Jun 25 16:58:24 UTC 2024
 [   1.0000000] 
 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC
 [   1.0000000] total memory = 2043 MB
 [   1.0000000] avail memory = 1948 MB
 [   1.0000000] WARNING: module error: module `cd9660' pushed by boot 
 loader already exists
 [   1.0000040] efi: systbl at pa 7f9ed018
 [   1.0000040] mainbus0 (root)
 [   1.0000040] ACPI: RSDP 0x000000007FB7D014 000024 (v02 BOCHS )
 [   1.0000040] ACPI: XSDT 0x000000007FB7C0E8 000044 (v01 BOCHS  BXPC 
 00000001      01000013)
 [   1.0000040] ACPI: FACP 0x000000007FB79000 000074 (v01 BOCHS  BXPC 
 00000001 BXPC 00000001)
 [   1.0000040] ACPI: DSDT 0x000000007FB7A000 001792 (v01 BOCHS  BXPC 
 00000001 BXPC 00000001)
 [   1.0000040] ACPI: FACS 0x000000007FBDC000 000040
 [   1.0000040] ACPI: APIC 0x000000007FB78000 000090 (v01 BOCHS  BXPC 
 00000001 BXPC 00000001)
 [   1.0000040] ACPI: WAET 0x000000007FB77000 000028 (v01 BOCHS  BXPC 
 00000001 BXPC 00000001)
 [   1.0000040] ACPI: BGRT 0x000000007FB76000 000038 (v01 INTEL  EDK2 
 00000002      01000013)
 [   1.0000040] ACPI: 1 ACPI AML tables successfully acquired and loaded
 [   1.0000040] ioapic0 at mainbus0 apid 0
 [   1.0000040] cpu0 at mainbus0 apid 0
 [   1.0000040] cpu0: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz, id 0x906ea
 [   1.0000040] cpu0: node 0, package 0, core 0, smt 0
 [   1.0000040] cpu1 at mainbus0 apid 1
 [   1.0000040] cpu1: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz, id 0x906ea
 [   1.0000040] cpu1: node 0, package 1, core 0, smt 0
 [   1.0000040] cpu2 at mainbus0 apid 2
 [   1.0000040] cpu2: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz, id 0x906ea
 [   1.0000040] cpu2: node 0, package 2, core 0, smt 0
 [   1.0000040] cpu3 at mainbus0 apid 3
 [   1.0000040] cpu3: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz, id 0x906ea
 [   1.0000040] cpu3: node 0, package 3, core 0, smt 0
 [   1.0000040] acpi0 at mainbus0: Intel ACPICA 20230628
 [   1.0000040] LNKS: BIOS IRQ 10 for 0.1.INTA is invalid
 [   1.0000040] acpi0: fixed power button present
 [   1.0159697] com0 at acpi0 (COM2, PNP0501-2): io 0x2f8-0x2ff irq 3
 [   1.0159697] com0: ns16550a, 16-byte FIFO
 [   1.0159697] com1 at acpi0 (COM1, PNP0501-1): io 0x3f8-0x3ff irq 4
 [   1.0159697] com1: ns16550a, 16-byte FIFO
 [   1.0159697] com1: console
 [   1.0159697] pckbc1 at acpi0 (KBD, PNP0303) (kbd port): io 0x60,0x64 irq 1
 [   1.0159697] pckbc2 at acpi0 (MOU, PNP0F13) (aux port): irq 12
 [   1.0159697] fdc0 at acpi0 (FDC0, PNP0700): io 0x3f2-0x3f5,0x3f7 irq 6 
 drq 2
 [   1.0159697] qemufwcfg0 at acpi0 (FWCF, QEMU0002): io 0x510-0x51b
 [   1.0159697] ACPI: Enabled 2 GPEs in block 00 to 0F
 [   1.0159697] pckbd0 at pckbc1 (kbd slot)
 [   1.0159697] pckbc1: using irq 1 for kbd slot
 [   1.0159697] wskbd0 at pckbd0 mux 1
 [   1.0159697] pms0 at pckbc1 (aux slot)
 [   1.0159697] pckbc1: using irq 12 for aux slot
 [   1.0159697] wsmouse0 at pms0 mux 0
 [   1.0159697] pci0 at mainbus0 bus 0: configuration mode 1
 [   1.0159697] pchb0 at pci0 dev 0 function 0: Intel 82441FX (PMC) PCI 
 and Memory Controller (rev. 0x02)
 [   1.0159697] pcib0 at pci0 dev 1 function 0: Intel 82371SB (PIIX3) 
 PCI-ISA Bridge (rev. 0x00)
 [   1.0159697] piixide0 at pci0 dev 1 function 1: Intel 82371SB IDE 
 Interface (PIIX3) (rev. 0x00)
 [   1.0159697] piixide0: primary channel interrupting at ioapic0 pin 14
 [   1.0159697] atabus0 at piixide0 channel 0
 [   1.0159697] piixide0: secondary channel ignored (disabled)
 [   1.0159697] piixpm0 at pci0 dev 1 function 3: Intel 82371AB (PIIX4) 
 Power Management Controller (rev. 0x03)
 [   1.0159697] piixpm0: 24-bit timer
 [   1.0159697] piixpm0: interrupting at ioapic0 pin 9
 [   1.0159697] iic0 at piixpm0 port 0: I2C bus
 [   1.0159697] virtio0 at pci0 dev 2 function 0
 [   1.0159697] virtio0: Unknown device (id 16, rev. 0x01)
 [   1.0159697] virtio0: no matching child driver; not configured
 [   1.0159697] wm0 at pci0 dev 3 function 0: Intel i82540EM 1000BASE-T 
 Ethernet (rev. 0x03)
 [   1.0159697] wm0: interrupting at ioapic0 pin 11
 [   1.0159697] wm0: Ethernet address 52:54:00:e7:05:1f
 [   1.0159697] makphy0 at wm0 phy 1: Marvell 88E1011 Gigabit PHY, rev. 0
 [   1.0159697] makphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 
 1000baseT, 1000baseT-FDX, auto
 [   1.0159697] hdaudio0 at pci0 dev 4 function 0: HD Audio Controller
 [   1.0159697] hdaudio0: interrupting at msi0 vec 0
 [   1.0159697] hdaudio0: HDA ver. 1.0, OSS 4, ISS 4, BSS 0, SDO 1, 64-bit
 [   1.0159697] hdafg0 at hdaudio0: vendor 1af4 product 0022
 [   1.0159697] hdafg0: DAC00 2ch: Speaker [Jack]
 [   1.0159697] hdafg0: ADC01 2ch: Line In [Jack]
 [   1.0159697] hdafg0: 2ch/2ch 16000Hz 22050Hz 32000Hz 44100Hz 48000Hz 
 88200Hz 96000Hz PCM16
 [   1.0159697] audio0 at hdafg0: playback, capture, full duplex, independent
 [   1.0159697] audio0: slinear_le:16 2ch 48000Hz, blk 1920 bytes (10ms) 
 for playback
 [   1.0159697] audio0: slinear_le:16 2ch 48000Hz, blk 1920 bytes (10ms) 
 for recording
 [   1.0159697] spkr0 at audio0: PC Speaker (synthesized)
 [   1.0159697] wsbell at spkr0 not configured
 [   1.0159697] uhci0 at pci0 dev 5 function 0: Intel 82801I USB UHCI 
 Controller (rev. 0x03)
 [   1.0159697] uhci0: interrupting at ioapic0 pin 10
 [   1.0159697] usb0 at uhci0: USB revision 1.0
 [   1.0159697] uhci1 at pci0 dev 5 function 1: Intel 82801I USB UHCI 
 Controller (rev. 0x03)
 [   1.0159697] uhci1: interrupting at ioapic0 pin 10
 [   1.0159697] usb1 at uhci1: USB revision 1.0
 [   1.0159697] uhci2 at pci0 dev 5 function 2: Intel 82801I USB UHCI 
 Controller (rev. 0x03)
 [   1.0159697] uhci2: interrupting at ioapic0 pin 11
 [   1.0159697] usb2 at uhci2: USB revision 1.0
 [   1.0159697] ehci0 at pci0 dev 5 function 7: Intel 82801I USB EHCI 
 Controller (rev. 0x03)
 [   1.0159697] ehci0: interrupting at ioapic0 pin 11
 [   1.0159697] ehci0: 3 companion controllers, 2 ports each: uhci0 uhci1 
 uhci2
 [   1.0159697] ehci0: Using DMA subregion for control data structures
 [   1.0159697] usb3 at ehci0: USB revision 2.0
 [   1.0159697] virtio1 at pci0 dev 6 function 0
 [   1.0159697] virtio1: console device (id 3, rev. 0x00)
 [   1.0159697] virtio1: no matching child driver; not configured
 [   1.0159697] virtio2 at pci0 dev 7 function 0
 [   1.0159697] virtio2: memory balloon device (id 5, rev. 0x00)
 [   1.0159697] viomb0 at virtio2: features: 0x10000000<INDIRECT_DESC>
 [   1.0159697] virtio2: interrupting at ioapic0 pin 11
 [   1.0159697] isa0 at pcib0
 [   1.0159697] attimer0 at isa0 port 0x40-0x43
 [   1.0159697] pcppi0 at isa0 port 0x61
 [   1.0159697] spkr1 at pcppi0: PC Speaker
 [   1.0159697] wsbell at spkr1 not configured
 [   1.0159697] midi0 at pcppi0: PC speaker
 [   1.0159697] sysbeep0 at pcppi0
 [   1.0159697] attimer0: attached to pcppi0
 [   1.0159697] acpicpu0 at cpu0: ACPI CPU
 [   1.0159697] acpicpu1 at cpu1: ACPI CPU
 [   1.0159697] acpicpu2 at cpu2: ACPI CPU
 [   1.0159697] acpicpu3 at cpu3: ACPI CPU
 [   1.4304028] atapibus0 at atabus0: 2 targets
 [   1.4408849] uhub0 at usb1: NetBSD (0x0000) UHCI root hub (0x0000), 
 class 9/0, rev 1.00/1.00, addr 1
 [   1.4514013] uhub1 at usb3: NetBSD (0x0000) EHCI root hub (0x0000), 
 class 9/0, rev 2.00/1.00, addr 1
 [   1.4618859] uhub2 at usb0: NetBSD (0x0000) UHCI root hub (0x0000), 
 class 9/0, rev 1.00/1.00, addr 1
 [   1.4763573] uhub3 at usb2: NetBSD (0x0000) UHCI root hub (0x0000), 
 class 9/0, rev 1.00/1.00, addr 1
 [   1.4829360] cd0 at atapibus0 drive 1: <QEMU DVD-ROM, QM00002, 2.5+> 
 cdrom removable
 [   1.4934111] wd0 at atabus0 drive 0
 [   1.4934111] wd0: <QEMU HARDDISK>
 [   1.4934111] wd0: 20480 MB, 41610 cyl, 16 head, 63 sec, 512 bytes/sect 
 x 41943040 sectors
 [   1.5249204] dk0 at wd0: "EFI", 262144 blocks at 4096, type: msdos
 [   1.5354609] dk1 at wd0: "NetBSD", 16777216 blocks at 266240, type: ffs
 [   1.5354609] dk2 at wd0: "syscgd", 24895488 blocks at 17043456, type: cgd
 [   2.6375962] uhidev0 at uhub1 port 1 configuration 1 interface 0
 [   2.6375962] uhidev0: QEMU (0x0627) QEMU USB Tablet (0x0001), rev 
 2.00/0.00, addr 2, iclass 3/0
 [   2.6583969] ums0 at uhidev0: 3 buttons and Z dir
 [   2.6583969] wsmouse1 at ums0 mux 0
 [   2.6692279] swwdog0: software watchdog initialized
 [   2.7004994] WARNING: 2 errors while detecting hardware; check system log.
 [   2.7177502] boot device: cd0
 [   2.7423374] root on cd0a dumps on cd0b
 [   2.7738197] root file system type: cd9660
 [   2.7843246] kern.module.path=/stand/amd64/10.99.10/modules
 Created tmpfs /dev (1835008 byte, 3552 inodes)
 
 
 You are using a serial console, we do not know your terminal emulation.
 Please select one, typical values are:
 
          vt100
          ansi
          xterm
 
 Terminal type (just hit ENTER for 'vt220'): xterm
 # uname -a
 NetBSD  10.99.10 NetBSD 10.99.10 (GENERIC) #0: Tue Jun 25 16:58:24 UTC 
 2024  mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC 
 amd64
 # sysctl kern.detachall
 kern.detachall = 0
 # uname -a
 NetBSD  10.99.10 NetBSD 10.99.10 (GENERIC) #0: Tue Jun 25 16:58:24 UTC 
 2024  mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC 
 amd64
 # shutdown -p now
 Shutdown NOW!
 shutdown: [pid 506]
 # wall: You have write permission turned off; no reply possible
 wall: Cannot stat `/var/run/utmp': No such file or directory
 shutdown: poweroff by root:
 
 System shutdown time has arrived
 
 About to run shutdown hooks...
 cron not running? (check /var/run/cron.pid).
 inetd not running? (check /var/run/inetd.pid).
 Saved entropy to /var/db/entropy-file.
 Forcibly unmounting /tmp
 Forcibly unmounting /var
 Forcibly unmounting /etc
 Removing block-type swap devices
 Wed Jun 26 11:36:44 UTC 2024
 
 Done running shutdown hooks.
 init: can't add utmpx record for `runlevel': Bad file descriptor
 init: can't add utmpx record for `runlevel': Bad file descriptor
 init: can't add utmpx record for `console': Bad file descriptor
 [  71.2384052] syncing disks... done
 [  71.3199488] sysbeep0: detached
 [  71.3199488] midi0: detached
 [  71.3199488] dk2 at wd0 (syscgd) deleted
 [  71.3305114] dk1 at wd0 (NetBSD) deleted
 [  71.3305114] dk0 at wd0 (EFI) deleted
 [  71.3409082] wd0: detached
 [  71.3409082] uhub3: detached
 [  71.3409082] uhub2: detached
 [  71.3409082] uhub0: detached
 [  71.3514758] usb2: detached
 [  71.3514758] usb1: detached
 [  71.3514758] usb0: detached
 [  71.3620416] iic0: detached
 [  71.3724619] uhci2: detached
 [  71.3724619] uhci1: detached
 [  71.3829049] uhci0: detached
 [  71.3829049] makphy0: detached
 [  71.3935202] wm0: detached
 [  71.3935202] pchb0: detached
 [  71.4144145] cd0: detached
 [  71.4144145] atapibus0: detached
 [  71.4249750] atabus0: detached
 [  71.4354267] acpi0: entering state S5
 ```
 
 
 This is what I get with kern.detachall=1
 
 
 ```
    \\-__,------,___.
     \\        __,---`  NetBSD/x86 EFI Boot (x64)
      \\       `---,_.  Revision 1.2 (Tue Jun 25 16:58:24 UTC 2024)
       \\-,_____,.---`
        \\
         \\
          \\
 
  > boot
 21680896+795008+1302144 [947716+1416552+1038933]=0x1b3f8c0
 Loading /stand/amd64/10.99.10/modules/cd9660/cd9660.kmod
 [   1.0000000] cpu_rng: rdrand/rdseed
 [   1.0000000] entropy: ready
 [   1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
 [   1.0000000]     2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 
 2013,
 [   1.0000000]     2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 
 2023,
 [   1.0000000]     2024
 [   1.0000000]     The NetBSD Foundation, Inc.  All rights reserved.
 [   1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
 [   1.0000000]     The Regents of the University of California.  All 
 rights reserved.
 
 [   1.0000000] NetBSD 10.99.10 (GENERIC) #0: Tue Jun 25 16:58:24 UTC 2024
 [   1.0000000] 
 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC
 [   1.0000000] total memory = 2043 MB
 [   1.0000000] avail memory = 1948 MB
 [   1.0000000] WARNING: module error: module `cd9660' pushed by boot 
 loader already exists
 [   1.0000040] efi: systbl at pa 7f9ed018
 [   1.0000040] mainbus0 (root)
 [   1.0000040] ACPI: RSDP 0x000000007FB7D014 000024 (v02 BOCHS )
 [   1.0000040] ACPI: XSDT 0x000000007FB7C0E8 000044 (v01 BOCHS  BXPC 
 00000001      01000013)
 [   1.0000040] ACPI: FACP 0x000000007FB79000 000074 (v01 BOCHS  BXPC 
 00000001 BXPC 00000001)
 [   1.0000040] ACPI: DSDT 0x000000007FB7A000 001792 (v01 BOCHS  BXPC 
 00000001 BXPC 00000001)
 [   1.0000040] ACPI: FACS 0x000000007FBDC000 000040
 [   1.0000040] ACPI: APIC 0x000000007FB78000 000090 (v01 BOCHS  BXPC 
 00000001 BXPC 00000001)
 [   1.0000040] ACPI: WAET 0x000000007FB77000 000028 (v01 BOCHS  BXPC 
 00000001 BXPC 00000001)
 [   1.0000040] ACPI: BGRT 0x000000007FB76000 000038 (v01 INTEL  EDK2 
 00000002      01000013)
 [   1.0000040] ACPI: 1 ACPI AML tables successfully acquired and loaded
 [   1.0000040] ioapic0 at mainbus0 apid 0
 [   1.0000040] cpu0 at mainbus0 apid 0
 [   1.0000040] cpu0: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz, id 0x906ea
 [   1.0000040] cpu0: node 0, package 0, core 0, smt 0
 [   1.0000040] cpu1 at mainbus0 apid 1
 [   1.0000040] cpu1: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz, id 0x906ea
 [   1.0000040] cpu1: node 0, package 1, core 0, smt 0
 [   1.0000040] cpu2 at mainbus0 apid 2
 [   1.0000040] cpu2: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz, id 0x906ea
 [   1.0000040] cpu2: node 0, package 2, core 0, smt 0
 [   1.0000040] cpu3 at mainbus0 apid 3
 [   1.0000040] cpu3: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz, id 0x906ea
 [   1.0000040] cpu3: node 0, package 3, core 0, smt 0
 [   1.0000040] acpi0 at mainbus0: Intel ACPICA 20230628
 [   1.0000040] LNKS: BIOS IRQ 10 for 0.1.INTA is invalid
 [   1.0000040] acpi0: fixed power button present
 [   1.0036891] com0 at acpi0 (COM2, PNP0501-2): io 0x2f8-0x2ff irq 3
 [   1.0036891] com0: ns16550a, 16-byte FIFO
 [   1.0036891] com1 at acpi0 (COM1, PNP0501-1): io 0x3f8-0x3ff irq 4
 [   1.0036891] com1: ns16550a, 16-byte FIFO
 [   1.0036891] com1: console
 [   1.0036891] pckbc1 at acpi0 (KBD, PNP0303) (kbd port): io 0x60,0x64 irq 1
 [   1.0036891] pckbc2 at acpi0 (MOU, PNP0F13) (aux port): irq 12
 [   1.0036891] fdc0 at acpi0 (FDC0, PNP0700): io 0x3f2-0x3f5,0x3f7 irq 6 
 drq 2
 [   1.0036891] qemufwcfg0 at acpi0 (FWCF, QEMU0002): io 0x510-0x51b
 [   1.0036891] ACPI: Enabled 2 GPEs in block 00 to 0F
 [   1.0036891] pckbd0 at pckbc1 (kbd slot)
 [   1.0036891] pckbc1: using irq 1 for kbd slot
 [   1.0036891] wskbd0 at pckbd0 mux 1
 [   1.0036891] pms0 at pckbc1 (aux slot)
 [   1.0036891] pckbc1: using irq 12 for aux slot
 [   1.0036891] wsmouse0 at pms0 mux 0
 [   1.0036891] pci0 at mainbus0 bus 0: configuration mode 1
 [   1.0036891] pchb0 at pci0 dev 0 function 0: Intel 82441FX (PMC) PCI 
 and Memory Controller (rev. 0x02)
 [   1.0036891] pcib0 at pci0 dev 1 function 0: Intel 82371SB (PIIX3) 
 PCI-ISA Bridge (rev. 0x00)
 [   1.0036891] piixide0 at pci0 dev 1 function 1: Intel 82371SB IDE 
 Interface (PIIX3) (rev. 0x00)
 [   1.0036891] piixide0: primary channel interrupting at ioapic0 pin 14
 [   1.0036891] atabus0 at piixide0 channel 0
 [   1.0036891] piixide0: secondary channel ignored (disabled)
 [   1.0036891] piixpm0 at pci0 dev 1 function 3: Intel 82371AB (PIIX4) 
 Power Management Controller (rev. 0x03)
 [   1.0036891] piixpm0: 24-bit timer
 [   1.0036891] piixpm0: interrupting at ioapic0 pin 9
 [   1.0036891] iic0 at piixpm0 port 0: I2C bus
 [   1.0036891] virtio0 at pci0 dev 2 function 0
 [   1.0036891] virtio0: Unknown device (id 16, rev. 0x01)
 [   1.0036891] virtio0: no matching child driver; not configured
 [   1.0036891] wm0 at pci0 dev 3 function 0: Intel i82540EM 1000BASE-T 
 Ethernet (rev. 0x03)
 [   1.0036891] wm0: interrupting at ioapic0 pin 11
 [   1.0036891] wm0: Ethernet address 52:54:00:e7:05:1f
 [   1.0036891] makphy0 at wm0 phy 1: Marvell 88E1011 Gigabit PHY, rev. 0
 [   1.0036891] makphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 
 1000baseT, 1000baseT-FDX, auto
 [   1.0036891] hdaudio0 at pci0 dev 4 function 0: HD Audio Controller
 [   1.0036891] hdaudio0: interrupting at msi0 vec 0
 [   1.0036891] hdaudio0: HDA ver. 1.0, OSS 4, ISS 4, BSS 0, SDO 1, 64-bit
 [   1.0036891] hdafg0 at hdaudio0: vendor 1af4 product 0022
 [   1.0036891] hdafg0: DAC00 2ch: Speaker [Jack]
 [   1.0036891] hdafg0: ADC01 2ch: Line In [Jack]
 [   1.0036891] hdafg0: 2ch/2ch 16000Hz 22050Hz 32000Hz 44100Hz 48000Hz 
 88200Hz 96000Hz PCM16
 [   1.0036891] audio0 at hdafg0: playback, capture, full duplex, independent
 [   1.0036891] audio0: slinear_le:16 2ch 48000Hz, blk 1920 bytes (10ms) 
 for playback
 [   1.0036891] audio0: slinear_le:16 2ch 48000Hz, blk 1920 bytes (10ms) 
 for recording
 [   1.0036891] spkr0 at audio0: PC Speaker (synthesized)
 [   1.0036891] wsbell at spkr0 not configured
 [   1.0036891] uhci0 at pci0 dev 5 function 0: Intel 82801I USB UHCI 
 Controller (rev. 0x03)
 [   1.0036891] uhci0: interrupting at ioapic0 pin 10
 [   1.0036891] usb0 at uhci0: USB revision 1.0
 [   1.0036891] uhci1 at pci0 dev 5 function 1: Intel 82801I USB UHCI 
 Controller (rev. 0x03)
 [   1.0036891] uhci1: interrupting at ioapic0 pin 10
 [   1.0036891] usb1 at uhci1: USB revision 1.0
 [   1.0036891] uhci2 at pci0 dev 5 function 2: Intel 82801I USB UHCI 
 Controller (rev. 0x03)
 [   1.0036891] uhci2: interrupting at ioapic0 pin 11
 [   1.0036891] usb2 at uhci2: USB revision 1.0
 [   1.0036891] ehci0 at pci0 dev 5 function 7: Intel 82801I USB EHCI 
 Controller (rev. 0x03)
 [   1.0036891] ehci0: interrupting at ioapic0 pin 11
 [   1.0036891] ehci0: 3 companion controllers, 2 ports each: uhci0 uhci1 
 uhci2
 [   1.0036891] ehci0: Using DMA subregion for control data structures
 [   1.0036891] usb3 at ehci0: USB revision 2.0
 [   1.0036891] virtio1 at pci0 dev 6 function 0
 [   1.0036891] virtio1: console device (id 3, rev. 0x00)
 [   1.0036891] virtio1: no matching child driver; not configured
 [   1.0036891] virtio2 at pci0 dev 7 function 0
 [   1.0036891] virtio2: memory balloon device (id 5, rev. 0x00)
 [   1.0036891] viomb0 at virtio2: features: 0x10000000<INDIRECT_DESC>
 [   1.0036891] virtio2: interrupting at ioapic0 pin 11
 [   1.0036891] isa0 at pcib0
 [   1.0036891] attimer0 at isa0 port 0x40-0x43
 [   1.0036891] pcppi0 at isa0 port 0x61
 [   1.0036891] spkr1 at pcppi0: PC Speaker
 [   1.0036891] wsbell at spkr1 not configured
 [   1.0036891] midi0 at pcppi0: PC speaker
 [   1.0036891] sysbeep0 at pcppi0
 [   1.0036891] attimer0: attached to pcppi0
 [   1.0036891] acpicpu0 at cpu0: ACPI CPU
 [   1.0036891] acpicpu1 at cpu1: ACPI CPU
 [   1.0036891] acpicpu2 at cpu2: ACPI CPU
 [   1.0036891] acpicpu3 at cpu3: ACPI CPU
 [   1.4185731] atapibus0 at atabus0: 2 targets
 [   1.4304302] uhub0 at usb1: NetBSD (0x0000) UHCI root hub (0x0000), 
 class 9/0, rev 1.00/1.00, addr 1
 [   1.4422904] uhub1 at usb3: NetBSD (0x0000) EHCI root hub (0x0000), 
 class 9/0, rev 2.00/1.00, addr 1
 [   1.4541542] uhub2 at usb0: NetBSD (0x0000) UHCI root hub (0x0000), 
 class 9/0, rev 1.00/1.00, addr 1
 [   1.4660258] uhub3 at usb2: NetBSD (0x0000) UHCI root hub (0x0000), 
 class 9/0, rev 1.00/1.00, addr 1
 [   1.4801094] cd0 at atapibus0 drive 1: <QEMU DVD-ROM, QM00002, 2.5+> 
 cdrom removable
 [   1.4902859] wd0 at atabus0 drive 0
 [   1.4902859] wd0: <QEMU HARDDISK>
 [   1.4902859] wd0: 20480 MB, 41610 cyl, 16 head, 63 sec, 512 bytes/sect 
 x 41943040 sectors
 [   1.5137218] dk0 at wd0: "EFI", 262144 blocks at 4096, type: msdos
 [   1.5303644] dk1 at wd0: "NetBSD", 16777216 blocks at 266240, type: ffs
 [   1.5303644] dk2 at wd0: "syscgd", 24895488 blocks at 17043456, type: cgd
 [   2.8062802] uhidev0 at uhub1 port 1 configuration 1 interface 0
 [   2.8062802] uhidev0: QEMU (0x0627) QEMU USB Tablet (0x0001), rev 
 2.00/0.00, addr 2, iclass 3/0
 [   2.8191260] ums0 at uhidev0: 3 buttons and Z dir
 [   2.8306825] wsmouse1 at ums0 mux 0
 [   2.8306825] swwdog0: software watchdog initialized
 [   2.8655213] WARNING: 2 errors while detecting hardware; check system log.
 [   2.8826796] boot device: cd0
 [   2.9129672] root on cd0a dumps on cd0b
 [   2.9485480] root file system type: cd9660
 [   2.9485480] kern.module.path=/stand/amd64/10.99.10/modules
 Created tmpfs /dev (1835008 byte, 3552 inodes)
 
 
 You are using a serial console, we do not know your terminal emulation.
 Please select one, typical values are:
 
          vt100
          ansi
          xterm
 
 Terminal type (just hit ENTER for 'vt220'): xterm
 # sysctl -w kern.detachall=1
 kern.detachall: 0 -> 1
 # uname -a
 NetBSD  10.99.10 NetBSD 10.99.10 (GENERIC) #0: Tue Jun 25 16:58:24 UTC 
 2024  mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC 
 amd64
 # shutdown -p now
 Shutdown NOW!
 shutdown: [pid 507]
 # wall: You have write permission turned off; no reply possible
 wall: Cannot stat `/var/run/utmp': No such file or directory
 shutdown: poweroff by root:
 
 System shutdown time has arrived
 
 About to run shutdown hooks...
 cron not running? (check /var/run/cron.pid).
 inetd not running? (check /var/run/inetd.pid).
 Saved entropy to /var/db/entropy-file.
 Forcibly unmounting /tmp
 Forcibly unmounting /var
 Forcibly unmounting /etc
 Removing block-type swap devices
 Wed Jun 26 11:44:34 UTC 2024
 
 Done running shutdown hooks.
 init: can't add utmpx record for `runlevel': Bad file descriptor
 init: can't add utmpx record for `runlevel': Bad file descriptor
 init: can't add utmpx record for `console': Bad file descriptor
 [ 151.0339731] syncing disks... done
 [ 151.1047106] wsmouse1: detached
 [ 151.1186892] ums0: detached
 [ 151.1186892] uhidev0: detached
 [ 151.1186892] sysbeep0: detached
 [ 151.1284332] midi0: detached
 [ 151.1284332] spkr1: detached
 [ 151.1284332] spkr0: detached
 [ 151.1284332] dk2 at wd0 (syscgd) deleted
 [ 151.1402925] dk1 at wd0 (NetBSD) deleted
 [ 151.1402925] dk0 at wd0 (EFI) deleted
 [ 151.1521717] wd0: detached
 [ 151.1521717] uhub3: detached
 [ 151.1521717] uhub2: detached
 [ 151.1642215] uhub1: detached
 [ 151.1642215] uhub0: detached
 [ 151.1642215] pcppi0: detached
 [ 151.1642215] attimer0: detached
 [ 151.1768930] audio0: detached
 [ 151.1768930] wsmouse0: detached
 [ 151.1768930] wskbd0: detached
 [ 151.1877675] isa0: detached
 [ 151.1877675] usb3: detached
 [ 151.1877675] usb2: detached
 [ 151.1995984] usb1: detached
 [ 151.1995984] usb0: detached
 [ 151.1995984] hdafg0: detached
 [ 151.2114529] makphy0: detached
 [ 151.2114529] iic0: detached
 [ 151.2114529] acpicpu3: detached
 [ 151.2233436] acpicpu2: detached
 [ 151.2233436] acpicpu1: detached
 [ 151.2233436] acpicpu0: detached
 [ 151.2351655] virtio1: detached
 [ 151.2351655] ehci0: detached
 [ 151.2470231] uhci2: detached
 [ 151.2470231] uhci1: detached
 [ 151.2588757] uhci0: detached
 [ 151.2588757] hdaudio0: detached
 [ 151.2588757] Skipping crash dump on recursive panic
 [ 151.2708496] panic: kernel diagnostic assertion "!dv->dv_detach_done" 
 failed: file "/usr/src/sys/kern/subr_autoconf.c", line 2916 makphy0
 [ 151.2834657] cpu3: Begin traceback...
 [ 151.2834657] vpanic() at netbsd:vpanic+0x171
 [ 151.2944786] kern_assert() at netbsd:kern_assert+0x4b
 [ 151.3063340] config_detach() at netbsd:config_detach+0x67
 [ 151.3182165] mii_detach() at netbsd:mii_detach+0xde
 [ 151.3182165] wm_detach() at netbsd:wm_detach+0x3f9
 [ 151.3301923] config_detach_release() at netbsd:config_detach_release+0x1fc
 [ 151.3419109] config_detach_all() at netbsd:config_detach_all+0xd1
 [ 151.3538233] cpu_reboot() at netbsd:cpu_reboot+0x1b9
 [ 151.3656482] kern_reboot() at netbsd:kern_reboot+0x93
 [ 151.3656482] sys_reboot() at netbsd:sys_reboot+0x63
 [ 151.3775400] syscall() at netbsd:syscall+0x112
 [ 151.3775400] --- syscall (number 208) ---
 [ 151.3894108] netbsd:syscall+0x112:
 [ 151.3894108] cpu3: End traceback...
 [ 151.3894108] fatal breakpoint trap in supervisor mode
 [ 151.4012525] trap type 1 code 0 rip 0xffffffff80235415 cs 0x8 rflags 
 0x202 cr2 0x7573dedce420 ilevel 0 rsp 0xffff9080b4262c60
 [ 151.4131624] curlwp 0xffffbddf0ea6a000 pid 507.507 lowest kstack 
 0xffff9080b425e2c0
 Stopped in pid 507.507 (halt) at        netbsd:breakpoint+0x5:  leave
 breakpoint() at netbsd:breakpoint+0x5
 vpanic() at netbsd:vpanic+0x171
 kern_assert() at netbsd:kern_assert+0x4b
 config_detach() at netbsd:config_detach+0x67
 mii_detach() at netbsd:mii_detach+0xde
 wm_detach() at netbsd:wm_detach+0x3f9
 config_detach_release() at netbsd:config_detach_release+0x1fc
 config_detach_all() at netbsd:config_detach_all+0xd1
 cpu_reboot() at netbsd:cpu_reboot+0x1b9
 kern_reboot() at netbsd:kern_reboot+0x93
 sys_reboot() at netbsd:sys_reboot+0x63
 syscall() at netbsd:syscall+0x112
 --- syscall (number 208) ---
 netbsd:syscall+0x112:
 ds          8
 es          3
 fs          180
 gs          2c10
 rdi         0
 rsi         3f8
 rbp         ffff9080b4262c60
 rbx         ffffffff813f4610    ostype+0x51adf
 rdx         1
 rcx         ffffffffffffff
 rax         800000000000000
 r8          0
 r9          0
 r10         0
 r11         0
 r12         ffff9080b4262ca8
 r13         4
 r14         ffffffff
 r15         ffff908003eab458
 rip         ffffffff80235415    breakpoint+0x5
 cs          8
 rflags      202
 rsp         ffff9080b4262c60
 ss          10
 netbsd:breakpoint+0x5:  leave
 db{3}>
 
 ```
 
 
 On 6/25/24 17:02, riastradh%NetBSD.org@localhost wrote:
 > Synopsis: Kernel panic when shutting down a virtual machine with Virtio devices
 > 
 > State-Changed-From-To: open->feedback
 > State-Changed-By: riastradh%NetBSD.org@localhost
 > State-Changed-When: Tue, 25 Jun 2024 15:02:39 +0000
 > State-Changed-Why:
 > Thanks for the report!  Can you see if you can still reproduce the
 > symptom?  And, can you also try reproducing the symptom after running
 > `sysctl -w kern.detachall=1' (each time you boot)?
 > 
 > You can find daily kernel builds for testing here:
 > https://nycdn.netbsd.org/
 > 
 > 
 > 
 



Home | Main Index | Thread Index | Old Index