FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 11-16-2010, 08:10 AM
Stefan Bühler
 
Default Bug#603670: early kernel panic as node under kvm (div-by-zero in pvclock_tsc_khz)

Package: linux-image-2.6.32-5-amd64
Version: 2.6.32-27
Severity: important
Found: linux-image-2.6.30-2-amd64/2.6.30-8squeeze1
Found: linux-image-2.6.36-trunk-amd64/2.6.36-1~experimental.1

Hi,

I get an early kernel panic when i try to run
testing/unstable/experimental kernels in a vm under kvm.

The physical host runs 2.6.32-5-amd64, and uses qemu-kvm/0.12.5+dfsg-4
with libvirt 0.8.3-4.


The stable kernel does not panic: linux-image-2.6.26-2-amd64 2.6.26-25

Example log for 2.6.32-5-amd64 (experimental has similar backtrace); the
panic is caused by a div-by-zero in pvclock_tsc_khz here (v2.6.36 source):

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=arch/x86/kernel/pvclock.c;h=239427ca02af05f8671aacaf9820aa298e94bf f1;hb=f6f94e2ab1b33f0082ac22d71f66385a60d8157f#l11 3

[ 0.000000] kvm-clock: cpu 0, msr 0:14f1701, boot clock
PANIC: early exception 00 rip 10:ffffffff8102cd63 error 0 cr2 0
[ 0.000000] Pid: 0, comm: swapper Not tainted 2.6.32-5-amd64 #1
[ 0.000000] Call Trace:
[ 0.000000] [<ffffffff814f319e>] ? early_idt_handler+0x5e/0x71
[ 0.000000] [<ffffffff8102cd63>] ? pvclock_tsc_khz+0x13/0x2a
[ 0.000000] [<ffffffff81503f17>] ? kvmclock_init+0x133/0x18c
[ 0.000000] [<ffffffff8150ccbe>] ? parse_crashkernel+0x46/0x23f
[ 0.000000] [<ffffffff814f75f8>] ? setup_arch+0x8f6/0x9cb
[ 0.000000] [<ffffffff811f6a9f>] ? extract_entropy+0x6a/0x125
[ 0.000000] [<ffffffff814f3140>] ? early_idt_handler+0x0/0x71
[ 0.000000] [<ffffffff814f39d0>] ? start_kernel+0xdb/0x3e8
[ 0.000000] [<ffffffff814f33b7>] ? x86_64_start_kernel+0xf9/0x106
[ 0.000000] RIP pvclock_tsc_khz+0x13/0x2a

Regards,
Stefan
Loading Linux 2.6.32-5-amd64 ...
Loading initial ramdisk ...
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 2.6.32-5-amd64 (Debian 2.6.32-27) (maks@debian.org) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Sat Oct 30 14:18:21 UTC 2010
[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-2.6.32-5-amd64 root=/dev/mapper/vg0-stefan ro single console=tty0 console=ttyS0,38400 earlyprintk=ttyS0
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Centaur CentaurHauls
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: 0000000000000000 - 000000000009f000 (usable)
[ 0.000000] BIOS-e820: 000000000009f000 - 00000000000a0000 (reserved)
[ 0.000000] BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
[ 0.000000] BIOS-e820: 0000000000100000 - 000000003fffb000 (usable)
[ 0.000000] BIOS-e820: 000000003fffb000 - 0000000040000000 (reserved)
[ 0.000000] BIOS-e820: 00000000fffbc000 - 0000000100000000 (reserved)
[ 0.000000] bootconsole [earlyser0] enabled
[ 0.000000] DMI 2.4 present.
[ 0.000000] last_pfn = 0x3fffb max_arch_pfn = 0x400000000
[ 0.000000] x86 PAT enabled: cpu 0, old 0x0, new 0x7010600070106
[ 0.000000] init_memory_mapping: 0000000000000000-000000003fffb000
[ 0.000000] RAMDISK: 2f87f000 - 3003c109
[ 0.000000] ACPI: RSDP 00000000000f8830 00014 (v00 BOCHS )
[ 0.000000] ACPI: RSDT 000000003fffde30 00034 (v01 BOCHS BXPCRSDT 00000001 BXPC 00000001)
[ 0.000000] ACPI: FACP 000000003ffffe70 00074 (v01 BOCHS BXPCFACP 00000001 BXPC 00000001)
[ 0.000000] ACPI: DSDT 000000003fffdfd0 01E22 (v01 BXPC BXDSDT 00000001 INTL 20090123)
[ 0.000000] ACPI: FACS 000000003ffffe00 00040
[ 0.000000] ACPI: SSDT 000000003fffdf90 00037 (v01 BOCHS BXPCSSDT 00000001 BXPC 00000001)
[ 0.000000] ACPI: APIC 000000003fffdeb0 00072 (v01 BOCHS BXPCAPIC 00000001 BXPC 00000001)
[ 0.000000] ACPI: HPET 000000003fffde70 00038 (v01 BOCHS BXPCHPET 00000001 BXPC 00000001)
[ 0.000000] No NUMA configuration found
[ 0.000000] Faking a node at 0000000000000000-000000003fffb000
[ 0.000000] Bootmem setup node 0 0000000000000000-000000003fffb000
[ 0.000000] NODE_DATA [0000000000009000 - 0000000000010fff]
[ 0.000000] bootmap [0000000000011000 - 0000000000018fff] pages 8
[ 0.000000] (7 early reservations) ==> bootmem [0000000000 - 003fffb000]
[ 0.000000] #0 [0000000000 - 0000001000] BIOS data page ==> [0000000000 - 0000001000]
[ 0.000000] #1 [0000006000 - 0000008000] TRAMPOLINE ==> [0000006000 - 0000008000]
[ 0.000000] #2 [0001000000 - 0001688414] TEXT DATA BSS ==> [0001000000 - 0001688414]
[ 0.000000] #3 [002f87f000 - 003003c109] RAMDISK ==> [002f87f000 - 003003c109]
[ 0.000000] #4 [000009f000 - 0000100000] BIOS reserved ==> [000009f000 - 0000100000]
[ 0.000000] #5 [0001689000 - 0001689071] BRK ==> [0001689000 - 0001689071]
[ 0.000000] #6 [0000008000 - 0000009000] PGTABLE ==> [0000008000 - 0000009000]
[ 0.000000] found SMP MP-table at [ffff8800000f8880] f8880
[ 0.000000] kvm-clock: cpu 0, msr 0:14f1701, boot clock
PANIC: early exception 00 rip 10:ffffffff8102cd63 error 0 cr2 0
[ 0.000000] Pid: 0, comm: swapper Not tainted 2.6.32-5-amd64 #1
[ 0.000000] Call Trace:
[ 0.000000] [<ffffffff814f319e>] ? early_idt_handler+0x5e/0x71
[ 0.000000] [<ffffffff8102cd63>] ? pvclock_tsc_khz+0x13/0x2a
[ 0.000000] [<ffffffff81503f17>] ? kvmclock_init+0x133/0x18c
[ 0.000000] [<ffffffff8150ccbe>] ? parse_crashkernel+0x46/0x23f
[ 0.000000] [<ffffffff814f75f8>] ? setup_arch+0x8f6/0x9cb
[ 0.000000] [<ffffffff811f6a9f>] ? extract_entropy+0x6a/0x125
[ 0.000000] [<ffffffff814f3140>] ? early_idt_handler+0x0/0x71
[ 0.000000] [<ffffffff814f39d0>] ? start_kernel+0xdb/0x3e8
[ 0.000000] [<ffffffff814f33b7>] ? x86_64_start_kernel+0xf9/0x106
[ 0.000000] RIP pvclock_tsc_khz+0x13/0x2a
 
Old 11-18-2010, 08:22 AM
Stefan Bühler
 
Default Bug#603670: early kernel panic as node under kvm (div-by-zero in pvclock_tsc_khz)

Hi again,

with qemu-kvm from experimental (0.13.0+dfsg-2) you can use:
-cpu kvm64,-kvmclock
as kvm option to disable kvmclock.

for libvirt use the following in your domain config:

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
...
<qemu:commandline>
<qemu:arg value='-cpu'/>
<qemu:arg value='kvm64,-kvmclock'/>
</qemu:commandline>
</domain>

(You may have to replace kvm64 with another cpu model)

I tried using clocksource= in the linux boot commandline,
and had no luck with any value i tried.



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4CE4F06A.6040802@stbuehler.de">http://lists.debian.org/4CE4F06A.6040802@stbuehler.de
 
Old 11-25-2010, 03:46 PM
Ben Hutchings
 
Default Bug#603670: early kernel panic as node under kvm (div-by-zero in pvclock_tsc_khz)

On Tue, 2010-11-16 at 10:10 +0100, Stefan Bühler wrote:
> Package: linux-image-2.6.32-5-amd64
> Version: 2.6.32-27
> Severity: important
> Found: linux-image-2.6.30-2-amd64/2.6.30-8squeeze1
> Found: linux-image-2.6.36-trunk-amd64/2.6.36-1~experimental.1
>
> Hi,
>
> I get an early kernel panic when i try to run
> testing/unstable/experimental kernels in a vm under kvm.
>
> The physical host runs 2.6.32-5-amd64, and uses qemu-kvm/0.12.5+dfsg-4
> with libvirt 0.8.3-4.
>
> The stable kernel does not panic: linux-image-2.6.26-2-amd64 2.6.26-25
>
> Example log for 2.6.32-5-amd64 (experimental has similar backtrace); the
> panic is caused by a div-by-zero in pvclock_tsc_khz here (v2.6.36 source):

I suspect that this is a bug in the host kernel's implementation of the
pvclock (paravirtual clock), not the guest's use of it. The kernel from
stable works because it doesn't attempt to use the pvclock interface.
Unfortunately really isn't enough information logged for me to tell for
sure.

Could you test with Linux 2.6.36 in both host and guest?

Ben.

--
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
 
Old 05-17-2011, 08:59 PM
Moritz Muehlenhoff
 
Default Bug#603670: early kernel panic as node under kvm (div-by-zero in pvclock_tsc_khz)

On Thu, Nov 25, 2010 at 04:46:13PM +0000, Ben Hutchings wrote:
> On Tue, 2010-11-16 at 10:10 +0100, Stefan Bühler wrote:
> > Package: linux-image-2.6.32-5-amd64
> > Version: 2.6.32-27
> > Severity: important
> > Found: linux-image-2.6.30-2-amd64/2.6.30-8squeeze1
> > Found: linux-image-2.6.36-trunk-amd64/2.6.36-1~experimental.1
> >
> > Hi,
> >
> > I get an early kernel panic when i try to run
> > testing/unstable/experimental kernels in a vm under kvm.
> >
> > The physical host runs 2.6.32-5-amd64, and uses qemu-kvm/0.12.5+dfsg-4
> > with libvirt 0.8.3-4.
> >
> > The stable kernel does not panic: linux-image-2.6.26-2-amd64 2.6.26-25
> >
> > Example log for 2.6.32-5-amd64 (experimental has similar backtrace); the
> > panic is caused by a div-by-zero in pvclock_tsc_khz here (v2.6.36 source):
>
> I suspect that this is a bug in the host kernel's implementation of the
> pvclock (paravirtual clock), not the guest's use of it. The kernel from
> stable works because it doesn't attempt to use the pvclock interface.
> Unfortunately really isn't enough information logged for me to tell for
> sure.
>
> Could you test with Linux 2.6.36 in both host and guest?

Stefan, did you test with more recent kernels?

Cheers,
Moritz




--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110517205908.GA4101@inutil.org">http://lists.debian.org/20110517205908.GA4101@inutil.org
 

Thread Tools




All times are GMT. The time now is 12:52 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org