Re: 2.6.16 Guest Hangs on Boot

Alexander Graf
2010-09-16T10:27:34Z

Alec Joseph Rivera wrote:
> On Wed, 2010-09-15 at 20:15 +0200, Alexander Graf wrote:
>
>> On 15.09.2010, at 20:07, Alec Joseph Rivera wrote:
>>
>>
>>> On Wed, 2010-09-15 at 19:51 +0200, Alexander Graf wrote:
>>>
>>>> On 15.09.2010, at 19:48, Alec Joseph Rivera wrote:
>>>>
>>>>
>>>>> On Wed, 2010-09-15 at 19:28 +0200, Alexander Graf wrote:
>>>>>
>>>>>> On 15.09.2010, at 18:53, Alec Joseph Rivera wrote:
>>>>>>
>>>>>>
>>>>>>> Hi all:
>>>>>>>
>>>>>>> I'm Alec Joseph Rivera, from the Philippines and new on this list.
>>>>>>> Anyway, I'm trying to run Lotus Foundations on kvm and it just hangs on
>>>>>>> bootup. It stops right after:
>>>>>>>
>>>>>>> Checking if this processor honours the WP bit even in supervisor
>>>>>>> mode... Ok.
>>>>>>>
>>>>>>> There's no more output after that. My invocation line is:
>>>>>>>
>>>>>>> $ qemu-kvm -cpu host -m 1G -cdrom lfs.iso
>>>>>>>
>>>>>> Your host is probably too new for this old guest. -cpu host directly passes through this host cpu's identifiers on which the guest might choke. Please try again without -cpu.
>>>>>>
>>>>>>
>>>>>>
>>>>> Tried without -cpu, still hangs after the WP bit checking...
>>>>>
>>>>> $ qemu-kvm -m 1G -cdrom lfs.iso
>>>>>
>>>>> I was scanning the changelogs and read something about a
>>>>> -no-kernel-irqchip. The man page doesn't say anything about it but will
>>>>> try this one too..
>>>>>
>>>> Please try:
>>>>
>>>> $ qemu-kvm -m 1G -cdrom lfs.iso -serial stdio
>>>>
>>>> Then when it shows the bootloader, add "console=ttyS0" to the kernel command line. That should give all the debugging output necessary.
>>>>
>>>>
>>>>
>>> Already done this one too (I've read it from your conversations with a
>>> Peter guy if I'm not mistaken).
>>>
>>> It just stops with no panic messages right after the mentioned checking
>>> part, which made me dig after timers (bogomips calibration should be
>>> next I believe). But I've gotten nowhere so far...
>>>
>>> Also, there's no -no-kernel-irqchip parameter, must have been a typo for
>>> -no-kvm-irqchip.
>>>
>>> -- begin kernel messages
>>>
>>>> Linux version 2.6.16.54-0.2.5-bigsmp (geeko@buildhost) (gcc version 4.1.2 20070115 (prerelease) (SUSE Linux)) #1 SMP Mon Jan 21 08:29:51 EST 2008
>>>>

Took me quite a while to find that kernel in the graveyard :). It's a
SLES10 SP1 kernel from the update repo at one specific point in time
(more updates came after that one).

>>>> BIOS-provided physical RAM map:
>>>> BIOS-e820: 0000000000000000 - 000000000009f400 (usable)
>>>> BIOS-e820: 000000000009f400 - 00000000000a0000 (reserved)
>>>> BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
>>>> BIOS-e820: 0000000000100000 - 000000003fffd000 (usable)
>>>> BIOS-e820: 000000003fffd000 - 0000000040000000 (reserved)
>>>> BIOS-e820: 00000000fffbc000 - 0000000100000000 (reserved)
>>>> 127MB HIGHMEM available.
>>>> 895MB LOWMEM available.
>>>> found SMP MP-table at 000f8990
>>>> DMI 2.4 present.
>>>> Using APIC driver default
>>>> ACPI: PM-Timer IO Port: 0xb008
>>>> ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
>>>> Processor #0 15:11 APIC version 20
>>>> ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] enabled)
>>>> Processor #1 15:11 APIC version 20
>>>> Overriding APIC driver with bigsmp
>>>> ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])
>>>> IOAPIC[0]: apic_id 2, version 17, address 0xfec00000, GSI 0-23
>>>> ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
>>>> ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
>>>> ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
>>>> ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
>>>> ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level)
>>>> Enabling APIC mode: Physflat. Using 1 I/O APICs
>>>> ACPI: HPET id: 0x8086a201 base: 0xfed00000
>>>> Using ACPI (MADT) for SMP configuration information
>>>> Allocating PCI resources starting at 50000000 (gap: 40000000:bffbc000)
>>>> Built 1 zonelists
>>>> Kernel command line: ramdisk_size=32768 initrd=initrd root=/dev/ram BOOT_IMAGE=k12_1009 console=ttyS0
>>>> Enabling fast FPU save and restore... done.
>>>> Enabling unmasked SIMD FPU exception support... done.
>>>> Initializing CPU#0
>>>> PID hash table entries: 4096 (order: 12, 65536 bytes)
>>>> Console: colour VGA+ 80x25
>>>> Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
>>>> Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
>>>> Memory: 1022272k/1048564k available (1671k kernel code, 25488k reserved, 890k data, 200k init, 131064k highmem)
>>>> Checking if this processor honours the WP bit even in supervisor mode... Ok.
>>>>
>> Interesting. Mind to check if you find a the vmlinux binary for that kernel on the cd? Maybe it's hidden inside an rpm. Then you can use:
>>
>> $ qemu-kvm -s -cdrom ...
>> $ gdb <vmlinux> -ex 'target remote localhost:1234'
>>
>> (gdb) bt
>>
>> That should give us a clue on what's going wrong.
>>
>>
>
> I did the steps you mentioned. Here's the gdb transcript:
>
> $ gdb k12_1009 -ex 'target remote localhost:1234'
> GNU gdb (GDB) 7.2
> Copyright (C) 2010 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law. Type "show
> copying"
> and "show warranty" for details.
> This GDB was configured as "i686-pc-linux-gnu".
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>...
> "/home/agi/k12_1009": not in executable format: File format not
> recognized
> Remote debugging using localhost:1234
> 0x0000dfe3 in ?? ()
> (gdb) bt
> #0 0x0000dfe3 in ?? ()
> (gdb) continue
> Continuing.
> ^C
> Program received signal SIGINT, Interrupt.
> 0xc015405f in ?? ()
> (gdb) bt
> #0 0xc015405f in ?? ()
>

0xc015405a <__pte_alloc_kernel+82>: mov (%edi),%eax
0xc015405c <__pte_alloc_kernel+84>: mov 0x4(%edi),%edx
0xc015405f <__pte_alloc_kernel+87>: lock cmpxchg8b (%edi)
0xc0154063 <__pte_alloc_kernel+91>: jne 0xc015405a
<__pte_alloc_kernel+82>

> Cannot access memory at address 0xfed00403
> (gdb)
>
>
> There's no action, no messages after the WP bit part so I had to do ^C.
> I hope that doesn't taint the debug session.
>
> I tried running qemu-kvm without an -m parameter, the result is not that
> different:
>
> $ gdb k12_1009 -ex 'target remote localhost:1234'
> GNU gdb (GDB) 7.2
> Copyright (C) 2010 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law. Type "show
> copying"
> and "show warranty" for details.
> This GDB was configured as "i686-pc-linux-gnu".
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>...
> "/home/agi/k12_1009": not in executable format: File format not
> recognized
> Remote debugging using localhost:1234
> 0x00009751 in ?? ()
> (gdb) bt
> #0 0x00009751 in ?? ()
>

This looks odd. Why would anything be in non-kernel here?

Alex