Bug #2484

virtio hangs boot of i386 Ideapad with acpi disabled

Added by davshao almost 2 years ago. Updated 7 months ago.

Status:ClosedStart date:01/09/2013
Priority:NormalDue date:
Assignee:vsrinivas% Done:

0%

Category:-
Target version:-

Description

For a Lenovo Ideapad netbook (i386) with acpi disabled using master commits through
commit 1d0de3d37b9efb6301b10515fd12d922c8602093
Date: Tue Jan 8 19:21:35 2013 +0100

kernel/vfs: Remove some unused variables.

boot hangs after devices:

md0: invalid primary partition table: no magic
Math emulator present
hptrr: RocketRAID 17xx/2xxx SATA controller driver v1.2
hpt27xx: RocketRAID 27xx controller driver v1.0 (Jan 9 2013 12:15:05)

and before

IOAPIC: rman cpu0 0 - 1
IOAPIC: rman cpu0 3 - 95
IOAPIC: rman cpu0 97 - 191
IOAPIC: rman cpu1 24 - 95
IOAPIC: rman cpu1 97 - 191
npx0.nexus0.root0
npx0: <math processor> [tentative] on motherboard
npx0: INT 16 interface

The boot problem was bisected to be after:

commit 42fdf81ee882d38808efe2772a68a9c4991a5f76
Date: Sun Jan 6 20:01:27 2013 +0800

and before:

commit f31f6d84db329735c062a41c0f729843cd4d0b6f
Date: Mon Jan 7 09:48:18 2013 +0100

kernel/hammer: Remove unused variables and add __debugvar.

In addition a workaround is to disable kernel options for virtio for a custom kernel config:

# VirtIO support
# device virtio # VirtIO core
# device virtio_blk # VirtIO disk driver
# device virtio_pci # VirtIO transport over PCI bus

Attached is a dmesg for the booting configuration with acpi and virtio disabled.

ideapad_novirtio_dmesg.txt Magnifier (41.9 KB) davshao, 01/09/2013 03:47 PM

ideapad_pciconf_novirtio.txt Magnifier (4.23 KB) davshao, 01/16/2013 09:39 AM

acer_725_0687_dmesg.txt Magnifier (44.9 KB) davshao, 01/26/2013 11:15 AM

History

#1 Updated by vsrinivas almost 2 years ago

  • Assignee set to vsrinivas

#2 Updated by vsrinivas almost 2 years ago

Could you get a 'pciconf -l -v' from the system, when booted w/o ACPI and
w/o the virtio driver?

Also, when you boot w/ the virtio driver built-in and with bootverbose
enabled, what is the last message you see?

Thanks,
-- vs;

#3 Updated by davshao almost 2 years ago

The last lines before the hang when using virtio and bootverbose are:

md0: Malloc disk
kbd: new array size 4
kbd1 at kbdmux0
ndepotmags=5 x mag_cap=29 for crypto op
ndepotmags=5 x mag_cap=29 for crypto desc
crypto: <crypto core>
Pentium Pro MTRR support enabled
md0: invalid primary partition table: no magic
Math emulator present
hptrr: RocketRAID 17xx/2xxx SATA controller driver v1.2
hpt27xx: RocketRAID 27xx controller driver v1.0 (Jan 9 2013 07:37:18)

The results of pciconf -l -v are:

hostb0@pci0:0:0:0: class=0x060000 card=0x386f17aa chip=0x27ac8086 rev=0x03 hdr=0x00
vendor = 'Intel Corporation'
device = 'Mobile 945GSE Express Memory Controller Hub'
class = bridge
subclass = HOST-PCI
vgapci0@pci0:0:2:0: class=0x030000 card=0x387017aa chip=0x27ae8086 rev=0x03 hdr=0x00
vendor = 'Intel Corporation'
device = 'Mobile 945GSE Express Integrated Graphics Controller'
class = display
subclass = VGA
vgapci1@pci0:0:2:1: class=0x038000 card=0x387017aa chip=0x27a68086 rev=0x03 hdr=0x00
vendor = 'Intel Corporation'
device = 'Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller'
class = display
none0@pci0:0:27:0: class=0x040300 card=0x3bf817aa chip=0x27d88086 rev=0x02 hdr=0x00
vendor = 'Intel Corporation'
device = 'NM10/ICH7 Family High Definition Audio Controller'
class = multimedia
subclass = HDA
pcib1@pci0:0:28:0: class=0x060400 card=0x19998086 chip=0x27d08086 rev=0x02 hdr=0x01
vendor = 'Intel Corporation'
device = 'NM10/ICH7 Family PCI Express Port 1'
class = bridge
subclass = PCI-PCI
pcib2@pci0:0:28:1: class=0x060400 card=0x19998086 chip=0x27d28086 rev=0x02 hdr=0x01
vendor = 'Intel Corporation'
device = 'NM10/ICH7 Family PCI Express Port 2'
class = bridge
subclass = PCI-PCI
pcib3@pci0:0:28:2: class=0x060400 card=0x19998086 chip=0x27d48086 rev=0x02 hdr=0x01
vendor = 'Intel Corporation'
device = 'NM10/ICH7 Family PCI Express Port 3'
class = bridge
subclass = PCI-PCI
uhci0@pci0:0:29:0: class=0x0c0300 card=0x380717aa chip=0x27c88086 rev=0x02 hdr=0x00
vendor = 'Intel Corporation'
device = 'NM10/ICH7 Family USB UHCI Controller'
class = serial bus
subclass = USB
uhci1@pci0:0:29:1: class=0x0c0300 card=0x380817aa chip=0x27c98086 rev=0x02 hdr=0x00
vendor = 'Intel Corporation'
device = 'NM10/ICH7 Family USB UHCI Controller'
class = serial bus
subclass = USB
uhci2@pci0:0:29:2: class=0x0c0300 card=0x380917aa chip=0x27ca8086 rev=0x02 hdr=0x00
vendor = 'Intel Corporation'
device = 'NM10/ICH7 Family USB UHCI Controller'
class = serial bus
subclass = USB
uhci3@pci0:0:29:3: class=0x0c0300 card=0x380a17aa chip=0x27cb8086 rev=0x02 hdr=0x00
vendor = 'Intel Corporation'
device = 'NM10/ICH7 Family USB UHCI Controller'
class = serial bus
subclass = USB
ehci0@pci0:0:29:7: class=0x0c0320 card=0x380b17aa chip=0x27cc8086 rev=0x02 hdr=0x00
vendor = 'Intel Corporation'
device = 'NM10/ICH7 Family USB2 EHCI Controller'
class = serial bus
subclass = USB
pcib4@pci0:0:30:0: class=0x060401 card=0x380c17aa chip=0x24488086 rev=0xe2 hdr=0x01
vendor = 'Intel Corporation'
device = '82801 Mobile PCI Bridge'
class = bridge
subclass = PCI-PCI
isab0@pci0:0:31:0: class=0x060100 card=0x380d17aa chip=0x27b98086 rev=0x02 hdr=0x00
vendor = 'Intel Corporation'
device = '82801GBM (ICH7-M) LPC Interface Bridge'
class = bridge
subclass = PCI-ISA
atapci0@pci0:0:31:1: class=0x01018a card=0x381017aa chip=0x27df8086 rev=0x02 hdr=0x00
vendor = 'Intel Corporation'
device = '82801G (ICH7 Family) IDE Controller'
class = mass storage
subclass = ATA
atapci1@pci0:0:31:2: class=0x01018f card=0x383517aa chip=0x27c48086 rev=0x02 hdr=0x00
vendor = 'Intel Corporation'
device = '82801GBM/GHM (ICH7-M Family) SATA Controller [IDE mode]'
class = mass storage
subclass = ATA
none1@pci0:0:31:3: class=0x0c0500 card=0x380f17aa chip=0x27da8086 rev=0x02 hdr=0x00
vendor = 'Intel Corporation'
device = 'NM10/ICH7 Family SMBus Controller'
class = serial bus
subclass = SMBus
bge0@pci0:2:0:0: class=0x020000 card=0x3a2317aa chip=0x171314e4 rev=0x02 hdr=0x00
vendor = 'Broadcom Corporation'
device = 'NetLink BCM5906M Fast Ethernet PCI Express'
class = network
subclass = ethernet
none2@pci0:5:0:0: class=0x028000 card=0x04b514e4 chip=0x431514e4 rev=0x01 hdr=0x00
vendor = 'Broadcom Corporation'
device = 'BCM4312 802.11b/g LP-PHY'
class = network

I have also attached the output of pciconf -l -v as the file ideapad_pciconf_novirtio.txt

#4 Updated by swildner almost 2 years ago

On Thu, 10 Jan 2013 00:47:30 +0100, David Shao via Redmine
<> wrote:

>
> Issue #2484 has been reported by David Shao.
>
> ----------------------------------------
> Bug #2484: virtio hangs boot of i386 Ideapad with acpi disabled
> http://bugs.dragonflybsd.org/issues/2484
>
> Author: David Shao
> Status: New
> Priority: Normal
> Assignee:
> Category:
> Target version:
>
>
> For a Lenovo Ideapad netbook (i386) with acpi disabled using master
> commits through
> commit 1d0de3d37b9efb6301b10515fd12d922c8602093
> Date: Tue Jan 8 19:21:35 2013 +0100
>
> kernel/vfs: Remove some unused variables.
>
> boot hangs after devices:
>
> md0: invalid primary partition table: no magic
> Math emulator present
> hptrr: RocketRAID 17xx/2xxx SATA controller driver v1.2
> hpt27xx: RocketRAID 27xx controller driver v1.0 (Jan 9 2013 12:15:05)
>
> and before
>
> IOAPIC: rman cpu0 0 - 1
> IOAPIC: rman cpu0 3 - 95
> IOAPIC: rman cpu0 97 - 191
> IOAPIC: rman cpu1 24 - 95
> IOAPIC: rman cpu1 97 - 191
> npx0.nexus0.root0
> npx0: <math processor> [tentative] on motherboard
> npx0: INT 16 interface
>
> The boot problem was bisected to be after:

Here's what I know about this bug:

* It seems to occur on i386 only.

* The boot hanging occurs randomly. The box I have that exhibits the bug
boots in 70-80% of the cases and hangs in 20-30%. So I think you had a
wrong impression during bisecting when it booted. Just go and try booting
a few times with a state that hung, and you will see that eventually it
will boot. Matt had the same issue once on an Atom box and committed a fix
to alc(4) which he thought was related to the issue, when in fact it was
not, just because it happened to boot after that. The fix was OK
nevertheless (just not related). :)

* The bug is not related to hptrr or hpt27xx drivers. The messages those
drivers give are informational and don't indicate that any such adapter
was found. In a booting dmesg you will notice that later on they both say
that no matching adapter was found. Also, if hpt* drivers are removed from
the kernel config, the boot hanging will continue (just with the "Math
emulator present" as the last message). If _any_ messages are related to
it, it is the IOAPIC: rman stuff (which it doesn't get to when not
booting), but I'm not sure if something in ioapic is related to the issue.

* The bug has nothing to do with virtio either. It started before we
imported that.

Best regards,
Sascha

#5 Updated by davshao almost 2 years ago

Fortunately for me, after

commit 560d12f06f3e4c73abecdac317304b94f7046cca
Date: Wed Jan 23 20:00:10 2013 +0100

the hang on boot disappeared, as in, now the Ideapad with acpi disabled boots fine. Coincidence or not, this was after I did a full
# make buildworld

when updating through the new m4/flex.

#6 Updated by davshao almost 2 years ago

I just encountered an almost identical bug on an Acer Aspire One 725-0687, an AMD C-70 APU machine. This machine is x86_64, has acpi enabled.

Using master through:

commit 2e666a32c5a18f540aa2030ae803c3aa7e9c755a
Date: Fri Jan 25 23:48:59 2013 +0100

kernel/mfi: Sort commands by opcode.

and doing a full make buildworld and make buildkernel, the machine hangs at the same line as the Ideapad used to. Once again the workaround is to compile a custom kernel with the virtio device lines commented out.

Attached is a dmesg for the machine.

#7 Updated by swildner 7 months ago

  • Description updated (diff)
  • Status changed from New to Closed

I believe this should be fixed with 902419bf6d9fd0f80afc9d07cd4b3e99d20f23ca (http://lists.dragonflybsd.org/pipermail/commits/2014-April/269851.html), so closing it. If it is still an issue, please re-open.

Also available in: Atom PDF