NetBSD Problem Report #46465

From www@NetBSD.org  Fri May 18 16:42:57 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id EE18563B89C
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 18 May 2012 16:42:56 +0000 (UTC)
Message-Id: <20120518164255.551A363B882@www.NetBSD.org>
Date: Fri, 18 May 2012 16:42:55 +0000 (UTC)
From: cbajus@mts.net
Reply-To: cbajus@mts.net
To: gnats-bugs@NetBSD.org
Subject: netbsd-5 branch no longer boots as KVM guest
X-Send-Pr-Version: www-1.0

>Number:         46465
>Category:       port-amd64
>Synopsis:       netbsd-5 branch no longer boots as KVM guest
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-amd64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 18 16:45:00 +0000 2012
>Last-Modified:  Fri May 18 20:55:01 +0000 2012
>Originator:     Cory Bajus
>Release:        netbsd-5 branch
>Organization:
none
>Environment:
NetBSD 5.1_STABLE (INSTALL) #0: Mon Apr 23 05:28:21 UTC 2012
        builds@b6.netbsd.org:/home/builds/ab/netbsd-5/amd64
>Description:
Between 2012-04-14 and 2012-04-23, the netbsd-5 branch began hanging on boot when running as a KVM guest.  The boot output is as follows:

> boot netbsd-INSTALL-0423
booting hd0a:netbsd-INSTALL-0423
10183024+5692928+782240=0x10e42a0
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 5.1_STABLE (INSTALL) #0: Mon Apr 23 05:28:21 UTC 2012
        builds@b6.netbsd.org:/home/builds/ab/netbsd-5/amd64/201204230400Z-obj/home/builds/ab/netbsd-5/src/sys/arch/amd64/compile/INSTALL
total memory = 511 MB
avail memory = 477 MB
SMBIOS rev. 2.4 @ 0x1ffffea0 (11 entries)
Red Hat KVM (RHEL 6.2.0 PC)
mainbus0 (root)
cpu0 at mainbus0 apid 0: Intel 686-class, 3059MHz, id 0x6d3
cpu1 at mainbus0 apid 1: Intel 686-class, 3059MHz, id 0x6d3
ioapic0 at mainbus0 apid 2
acpi0 at mainbus0: Intel ACPICA 20080321
pckbc1 at acpi0 (KBD, PNP0303) (kbd port): io 0x60,0x64 irq 1
pckbc2 at acpi0 (MOU, PNP0F13) (aux port): irq 12
FDC0 (PNP0700) at acpi0 not configured
COM1 (PNP0501) at acpi0 not configured
hpet0 at acpi0 (HPET, PNP0103-0): mem 0xfed00000-0xfed003ff
hpet0: invalid timer period
pckbd0 at pckbc1 (kbd slot)
pckbc1: using irq 1 for kbd slot
wskbd0 at pckbd0 mux 1
pms0 at pckbc1 (aux slot)
pckbc1: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pci0 at mainbus0 bus 0: configuration mode 1
pchb0 at pci0 dev 0 function 0
pchb0: vendor 0x8086 product 0x1237 (rev. 0x02)
pcib0 at pci0 dev 1 function 0
pcib0: vendor 0x8086 product 0x7000 (rev. 0x00)
piixide0 at pci0 dev 1 function 1
piixide0: Intel 82371SB IDE Interface (PIIX3) (rev. 0x00)
piixide0: primary channel interrupting at irq 14
atabus0 at piixide0 channel 0
piixide0: secondary channel interrupting at irq 15
atabus1 at piixide0 channel 1
uhci0 at pci0 dev 1 function 2: vendor 0x8086 product 0x7020 (rev. 0x01)
uhci0: interrupting at irq 11
usb0 at uhci0: USB revision 1.0
piixpm0 at pci0 dev 1 function 3
piixpm0: vendor 0x8086 product 0x7113 (rev. 0x03)
piixpm0: 24-bit timer
piixpm0: interrupting at irq 9
iic0 at piixpm0: I2C bus
virtio0 at pci0 dev 3 function 0
virtio0: Virtio Network Device (rev. 0x00)
vioif0 at virtio0: Ethernet address 52:54:00:c4:42:d8
virtio0: interrupting at irq 11
virtio1 at pci0 dev 5 function 0
virtio1: Virtio Memory Balloon Device (rev. 0x00)
viomb0 at virtio1
virtio1: interrupting at irq 10
virtio2 at pci0 dev 6 function 0
virtio2: Virtio Block Device (rev. 0x00)
ld0 at virtio2
ld0: 20480 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 41943040 sectors
virtio2: interrupting at irq 10
isa0 at pcib0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com0: console
attimer0 at isa0 port 0x40-0x43: AT Timer
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker (CPU-intensive output)
sysbeep0 at pcppi0
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
attimer0: attached to pcppi0
uhub0 at usb0: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1

At this point, the boot hangs.

For comparison, here are the boot messages from a 2012-04-14 snapshot:
> boot netbsd-INSTALL-0414
booting hd0a:netbsd-INSTALL-0414
10182992+5692928+782240=0x10e42a0
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 5.1_STABLE (INSTALL) #0: Sat Apr 14 17:23:46 UTC 2012
        builds@b6.netbsd.org:/home/builds/ab/netbsd-5/amd64/201204141600Z-obj/home/builds/ab/netbsd-5/src/sys/arch/amd64/compile/INSTALL
total memory = 511 MB
avail memory = 477 MB
SMBIOS rev. 2.4 @ 0x1ffffea0 (11 entries)
Red Hat KVM (RHEL 6.2.0 PC)
mainbus0 (root)
cpu0 at mainbus0 apid 0: Intel 686-class, 3059MHz, id 0x6d3
cpu1 at mainbus0 apid 1: Intel 686-class, 3059MHz, id 0x6d3
ioapic0 at mainbus0 apid 2
acpi0 at mainbus0: Intel ACPICA 20080321
pckbc1 at acpi0 (KBD, PNP0303) (kbd port): io 0x60,0x64 irq 1
pckbc2 at acpi0 (MOU, PNP0F13) (aux port): irq 12
FDC0 (PNP0700) at acpi0 not configured
COM1 (PNP0501) at acpi0 not configured
hpet0 at acpi0 (HPET, PNP0103-0): mem 0xfed00000-0xfed003ff
hpet0: invalid timer period
pckbd0 at pckbc1 (kbd slot)
pckbc1: using irq 1 for kbd slot
wskbd0 at pckbd0 mux 1
pms0 at pckbc1 (aux slot)
pckbc1: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pci0 at mainbus0 bus 0: configuration mode 1
pchb0 at pci0 dev 0 function 0
pchb0: vendor 0x8086 product 0x1237 (rev. 0x02)
pcib0 at pci0 dev 1 function 0
pcib0: vendor 0x8086 product 0x7000 (rev. 0x00)
piixide0 at pci0 dev 1 function 1
piixide0: Intel 82371SB IDE Interface (PIIX3) (rev. 0x00)
piixide0: primary channel interrupting at irq 14
atabus0 at piixide0 channel 0
piixide0: secondary channel interrupting at irq 15
atabus1 at piixide0 channel 1
uhci0 at pci0 dev 1 function 2: vendor 0x8086 product 0x7020 (rev. 0x01)
uhci0: interrupting at irq 11
usb0 at uhci0: USB revision 1.0
piixpm0 at pci0 dev 1 function 3
piixpm0: vendor 0x8086 product 0x7113 (rev. 0x03)
piixpm0: 24-bit timer
piixpm0: interrupting at irq 9
iic0 at piixpm0: I2C bus
virtio0 at pci0 dev 3 function 0
virtio0: Virtio Network Device (rev. 0x00)
vioif0 at virtio0: Ethernet address 52:54:00:c4:42:d8
virtio0: interrupting at irq 11
virtio1 at pci0 dev 5 function 0
virtio1: Virtio Memory Balloon Device (rev. 0x00)
viomb0 at virtio1
virtio1: interrupting at irq 10
virtio2 at pci0 dev 6 function 0
virtio2: Virtio Block Device (rev. 0x00)
ld0 at virtio2
ld0: 20480 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 41943040 sectors
virtio2: interrupting at irq 10
isa0 at pcib0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com0: console
attimer0 at isa0 port 0x40-0x43: AT Timer
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker (CPU-intensive output)
sysbeep0 at pcppi0
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
attimer0: attached to pcppi0
uhub0 at usb0: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
Kernelized RAIDframe activated
pad0: outputs: 44100Hz, 16-bit, stereo
audio0 at pad0: half duplex, playback, capture
boot device: ld0
root on md0a dumps on md0b
root file system type: ffs
WARNING: clock gained 33 days
WARNING: CHECK AND RESET THE DATE!
Created tmpfs /dev (1425408 byte, 2752 inodes)
erase ^?, werase ^W, kill ^U, intr ^C


>How-To-Repeat:
Boot a netbsd-5 snapshot from 2012-04-23 or latter as a KVM guest.
>Fix:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: jakllsch@NetBSD.org
Subject: Re: port-amd64/46465: netbsd-5 branch no longer boots as KVM guest
Date: Fri, 18 May 2012 18:56:42 +0200

 Could this be fallout from the fis for PR kern/45160?

 Martin

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-amd64/46465: netbsd-5 branch no longer boots as KVM guest
Date: Fri, 18 May 2012 19:02:46 +0200

 On Fri, May 18, 2012 at 05:00:07PM +0000, Martin Husemann wrote:
 >  Could this be fallout from the fis for PR kern/45160?

 "fix" of course, masking of all 8259 interrupts in ioapic_enable I mean.

 Martin

From: David Laight <david@l8s.co.uk>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-amd64/46465: netbsd-5 branch no longer boots as KVM guest
Date: Fri, 18 May 2012 21:49:42 +0100

 On Fri, May 18, 2012 at 05:05:04PM +0000, Martin Husemann wrote:
 > The following reply was made to PR port-amd64/46465; it has been noted by GNATS.
 > 
 > From: Martin Husemann <martin@duskware.de>
 > To: gnats-bugs@NetBSD.org
 > Cc: 
 > Subject: Re: port-amd64/46465: netbsd-5 branch no longer boots as KVM guest
 > Date: Fri, 18 May 2012 19:02:46 +0200
 > 
 >  On Fri, May 18, 2012 at 05:00:07PM +0000, Martin Husemann wrote:
 >  >  Could this be fallout from the fis for PR kern/45160?
 >  
 >  "fix" of course, masking of all 8259 interrupts in ioapic_enable I mean.

 I recently tried to boot netbsd-5 under bochs, it fails to get any
 disk interrupts because they are enabled on the 8259 between when
 the IOAPIC is initialised and when all the 8259 interrupts are masked
 by (IIRC) ioapic_anable().

 In this case the disks are on piixide0@pci0, but it goes through
 pciide_machdep_compat_intr_enable() - which tries to use 8259 interrupts.

 I gave up working through the morass of the ide code, 'boot -2'
 to disbale ACPI let it boot - which was enough for the tests I was
 running.

 'current' boots fine, dunno what extra changes it has.

 	David

 -- 
 David Laight: david@l8s.co.uk

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.