Xen 8 9 DomU kernel panic with 2 or more virtual CPU

2010-03-31 Thread Guillaume Seigneuret
Dear all,

 

When I try to make FreeBSD work in Xen domU with multiple vcups, I got a
kernel panic. If someone have a clue .

 

I got the following error :

 

WARNING: loader(8) metadata is missing!

GDB: no debug ports present

KDB: debugger backends: ddb

KDB: current backend: ddb

Copyright (c) 1992-2010 The FreeBSD Project.

Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994

The Regents of the University of California. All rights reserved.

FreeBSD is a registered trademark of The FreeBSD Foundation.

FreeBSD 9.0-CURRENT #1: Tue Mar 23 20:38:17 CET 2010

drgk...@redproxy2:/usr/obj/usr/src/sys/XEN i386

WARNING: WITNESS option enabled, expect reduced performance.

Xen reported: 2526.982 MHz processor.

Timecounter ixen frequency 10 Hz quality 0

CPU: Intel(R) Xeon(R) CPU   X3440  @ 2.53GHz (2526.98-MHz 686-class
CPU)

  Origin = GenuineIntel  Id = 0x106e5  Family = 6  Model = 1e  Stepping =
5

 
Features=0xbfebfbffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA
,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE

 
Features2=0x98e3fdSSE3,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PD
CM,SSE4.1,SSE4.2,POPCNT

  AMD Features=0x2810NX,RDTSCP,LM

  AMD Features2=0x1LAHF

  TSC: P-state invariant

 

Data TLB: 4 KB pages, 4-way set associative, 64 entries

1st-level data cache: 32 KB, 8-way set associative, 64 byte line size

L2 cache: 256 kbytes, 8-way associative, 64 bytes/line

real memory  = 536870912 (512 MB)

Physical memory chunk(s):

0x007f - 0x1f638fff, 518295552 bytes (126537 pages)

avail memory = 515362816 (491 MB)

APIC: Using the MPTable enumerator.

SMP: Added CPU 0 (BSP)

ULE: setup cpu 0

[XEN] IPI cpu=0 irq=128 vector=RESCHEDULE_VECTOR (0)

[XEN] IPI cpu=0 irq=129 vector=CALL_FUNCTION_VECTOR (1)

Event-channel device installed.

mem: memory

Pentium Pro MTRR support enabled

nfslock: pseudo-device

null: null device, zero device

random: entropy source, Software, Yarrow

io: I/O

crypto: crypto core

Grant table initialized

xenbus0: Xen Devices on motherboard

xc0: Xen Console on motherboard

kernel trap 12 with interrupts disabled

Fatal trap 12: page fault while in kernel mode

cpuid = 0; apic id = 00

fault virtual address   = 0x8

fault code  = supervisor read, page not present

instruction pointer = 0x21:0xc0389142

stack pointer   = 0x29:0xc06c6ad8

frame pointer   = 0x29:0xc06c6af0

code segment= base 0x0, limit 0xf, type 0x1b

= DPL 1, pres 1, def32 1, gran 1

processor eflags= resume, IOPL = 0

current process = 0 (swapper)

[ thread pid 0 tid 10 ]

Stopped at  intr_execute_handlers+0x12: movl0x8(%ebx),%eax

db

db

db show alllocks

Process 0 (kernel) thread 0xc044f430 (10)

exclusive sleep mutex Giant (Giant) r = 0 (0xc0450c50) locked @
/usr/src/sys/kern/kern_module.c:117

 

 

Or :

 

Started domain RedProxy2 (id=23)

WARNING: loader(8) metadata is missing!

GDB: no debug ports present

KDB: debugger backends: ddb

KDB: current backend: ddb

Copyright (c) 1992-2010 The FreeBSD Project.

Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994

The Regents of the University of California. All rights reserved.

FreeBSD is a registered trademark of The FreeBSD Foundation.

FreeBSD 9.0-CURRENT #1: Tue Mar 23 20:38:17 CET 2010

drgk...@redproxy2:/usr/obj/usr/src/sys/XEN i386

WARNING: WITNESS option enabled, expect reduced performance.

Xen reported: 2526.984 MHz processor.

Timecounter ixen frequency 10 Hz quality 0

CPU: Intel(R) Xeon(R) CPU   X3440  @ 2.53GHz (2526.98-MHz 686-class
CPU)

  Origin = GenuineIntel  Id = 0x106e5  Family = 6  Model = 1e  Stepping =
5

 
Features=0xbfebfbffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA
,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE

 
Features2=0x98e3fdSSE3,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PD
CM,SSE4.1,SSE4.2,POPCNT

  AMD Features=0x2810NX,RDTSCP,LM

  AMD Features2=0x1LAHF

  TSC: P-state invariant

 

Data TLB: 4 KB pages, 4-way set associative, 64 entries

1st-level data cache: 32 KB, 8-way set associative, 64 byte line size

L2 cache: 256 kbytes, 8-way associative, 64 bytes/line

real memory  = 536870912 (512 MB)

Physical memory chunk(s):

0x007f - 0x1f638fff, 518295552 bytes (126537 pages)

avail memory = 515362816 (491 MB)

APIC: Using the MPTable enumerator.

SMP: Added CPU 0 (BSP)

SMP: Added CPU 1 (AP)

gdtpfn=219746 pdptpfn=5cc05

panic: HYPERVISOR_vcpu_op(VCPUOP_initialise, cpu, ctxt):
/usr/src/sys/i386/xen/mp_machdep.c:927

cpuid = 0

KDB: enter: panic

 

Here are the kernel informations :

uname -a

FreeBSD RedProxy2 9.0-CURRENT FreeBSD 9.0-CURRENT

 

Kernel conf :

#

# XEN -- Kernel configuration for i386 XEN DomU

#

# $FreeBSD: src/sys/i386/conf/XEN,v 1.13 2010/03/13 09:21:00 ed Exp $

 


Re: Xen 8 9 DomU kernel panic with 2 or more virtual CPU

2010-03-31 Thread Adrian Chadd
The last time I checked, FreeBSD/DomU was highly buggy, and this
includes SMP support.

I never managed to get around to figuring out what wasn't being locked
correctly. :/


Adrian


On 1 April 2010 00:49, Guillaume Seigneuret g...@omegacube.fr wrote:
 Dear all,



 When I try to make FreeBSD work in Xen domU with multiple vcups, I got a
 kernel panic. If someone have a clue .



 I got the following error :



 WARNING: loader(8) metadata is missing!

 GDB: no debug ports present

 KDB: debugger backends: ddb

 KDB: current backend: ddb

 Copyright (c) 1992-2010 The FreeBSD Project.

 Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994

        The Regents of the University of California. All rights reserved.

 FreeBSD is a registered trademark of The FreeBSD Foundation.

 FreeBSD 9.0-CURRENT #1: Tue Mar 23 20:38:17 CET 2010

    drgk...@redproxy2:/usr/obj/usr/src/sys/XEN i386

 WARNING: WITNESS option enabled, expect reduced performance.

 Xen reported: 2526.982 MHz processor.

 Timecounter ixen frequency 10 Hz quality 0

 CPU: Intel(R) Xeon(R) CPU           X3440  @ 2.53GHz (2526.98-MHz 686-class
 CPU)

  Origin = GenuineIntel  Id = 0x106e5  Family = 6  Model = 1e  Stepping =
 5


 Features=0xbfebfbffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA
 ,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE


 Features2=0x98e3fdSSE3,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PD
 CM,SSE4.1,SSE4.2,POPCNT

  AMD Features=0x2810NX,RDTSCP,LM

  AMD Features2=0x1LAHF

  TSC: P-state invariant



 Data TLB: 4 KB pages, 4-way set associative, 64 entries

 1st-level data cache: 32 KB, 8-way set associative, 64 byte line size

 L2 cache: 256 kbytes, 8-way associative, 64 bytes/line

 real memory  = 536870912 (512 MB)

 Physical memory chunk(s):

 0x007f - 0x1f638fff, 518295552 bytes (126537 pages)

 avail memory = 515362816 (491 MB)

 APIC: Using the MPTable enumerator.

 SMP: Added CPU 0 (BSP)

 ULE: setup cpu 0

 [XEN] IPI cpu=0 irq=128 vector=RESCHEDULE_VECTOR (0)

 [XEN] IPI cpu=0 irq=129 vector=CALL_FUNCTION_VECTOR (1)

 Event-channel device installed.

 mem: memory

 Pentium Pro MTRR support enabled

 nfslock: pseudo-device

 null: null device, zero device

 random: entropy source, Software, Yarrow

 io: I/O

 crypto: crypto core

 Grant table initialized

 xenbus0: Xen Devices on motherboard

 xc0: Xen Console on motherboard

 kernel trap 12 with interrupts disabled

 Fatal trap 12: page fault while in kernel mode

 cpuid = 0; apic id = 00

 fault virtual address   = 0x8

 fault code              = supervisor read, page not present

 instruction pointer     = 0x21:0xc0389142

 stack pointer           = 0x29:0xc06c6ad8

 frame pointer           = 0x29:0xc06c6af0

 code segment            = base 0x0, limit 0xf, type 0x1b

                        = DPL 1, pres 1, def32 1, gran 1

 processor eflags        = resume, IOPL = 0

 current process         = 0 (swapper)

 [ thread pid 0 tid 10 ]

 Stopped at      intr_execute_handlers+0x12:     movl    0x8(%ebx),%eax

 db

 db

 db show alllocks

 Process 0 (kernel) thread 0xc044f430 (10)

 exclusive sleep mutex Giant (Giant) r = 0 (0xc0450c50) locked @
 /usr/src/sys/kern/kern_module.c:117





 Or :



 Started domain RedProxy2 (id=23)

 WARNING: loader(8) metadata is missing!

 GDB: no debug ports present

 KDB: debugger backends: ddb

 KDB: current backend: ddb

 Copyright (c) 1992-2010 The FreeBSD Project.

 Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994

        The Regents of the University of California. All rights reserved.

 FreeBSD is a registered trademark of The FreeBSD Foundation.

 FreeBSD 9.0-CURRENT #1: Tue Mar 23 20:38:17 CET 2010

    drgk...@redproxy2:/usr/obj/usr/src/sys/XEN i386

 WARNING: WITNESS option enabled, expect reduced performance.

 Xen reported: 2526.984 MHz processor.

 Timecounter ixen frequency 10 Hz quality 0

 CPU: Intel(R) Xeon(R) CPU           X3440  @ 2.53GHz (2526.98-MHz 686-class
 CPU)

  Origin = GenuineIntel  Id = 0x106e5  Family = 6  Model = 1e  Stepping =
 5


 Features=0xbfebfbffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA
 ,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE


 Features2=0x98e3fdSSE3,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PD
 CM,SSE4.1,SSE4.2,POPCNT

  AMD Features=0x2810NX,RDTSCP,LM

  AMD Features2=0x1LAHF

  TSC: P-state invariant



 Data TLB: 4 KB pages, 4-way set associative, 64 entries

 1st-level data cache: 32 KB, 8-way set associative, 64 byte line size

 L2 cache: 256 kbytes, 8-way associative, 64 bytes/line

 real memory  = 536870912 (512 MB)

 Physical memory chunk(s):

 0x007f - 0x1f638fff, 518295552 bytes (126537 pages)

 avail memory = 515362816 (491 MB)

 APIC: Using the MPTable enumerator.

 SMP: Added CPU 0 (BSP)

 SMP: Added CPU 1 (AP)

 gdtpfn=219746 pdptpfn=5cc05

 panic: