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  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=0xbfebfbff ,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
>
>
> Features2=0x98e3fd CM,SSE4.1,SSE4.2,POPCNT>
>
>  AMD Features=0x2810
>
>  AMD Features2=0x1
>
>  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: 
>
> Pentium Pro MTRR support enabled
>
> nfslock: pseudo-device
>
> null: 
>
> random: 
>
> io: 
>
> crypto: 
>
> Grant table initialized
>
> xenbus0:  on motherboard
>
> xc0:  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=0xbfebfbff ,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
>
>
> Features2=0x98e3fd CM,SSE4.1,SSE4.2,POPCNT>
>
>  AMD Features=0x2810
>
>  AMD Features2=0x1
>
>  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 :
>

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

2010-05-14 Thread masterito
Hello.

I have the same problem, but other error.

When I create machine with 1 CPU (vcpus=1) - all work fine, but when
I  create machine with 4 CPU (vcpus=4) I see kernel panic on console:

APIC: Using the MPTable enumerator.
SMP: Added CPU 0 (BSP)
SMP: Added CPU 1 (AP)
SMP: Added CPU 2 (AP)
SMP: Added CPU 3 (AP)
gdtpfn=3df8cb pdptpfn=f63f4
panic: HYPERVISOR_vcpu_op(VCPUOP_initialise, cpu,
&ctxt): /usr/src/sys/i386/xen/mp_machdep.c:929
cpuid = 0
KDB: enter: panic
[thread pid 0 tid 0 ]
Stopped at  kdb_enter+0x3a: movl$0,kdb_why
db> 

---
Vasilyev Igor

> 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  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=0xbfebfbff > ,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
> >
> >
> > Features2=0x98e3fd > CM,SSE4.1,SSE4.2,POPCNT>
> >
> >  AMD Features=0x2810
> >
> >  AMD Features2=0x1
> >
> >  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: 
> >
> > Pentium Pro MTRR support enabled
> >
> > nfslock: pseudo-device
> >
> > null: 
> >
> > random: 
> >
> > io: 
> >
> > crypto: 
> >
> > Grant table initialized
> >
> > xenbus0:  on motherboard
> >
> > xc0:  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"  I

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

2010-05-14 Thread John Prather
This seems to affect most people trying to use FreeBSD on xen i386 paravirt.

I was trying it on Linode, and got 8.0-RELEASE to actually boot by
hacking MAXCPU to 1 in sys/i386/include/param.h but even then, when it
was under load (building world or lots of ports) it would occasionally
panic.

8-STABLE wouldn't even boot with MAXCPU hacked to 1 to avoid
VCPUOP_initialise panic, throwing panic on
HYPERVISOR_update_va_mapping instead.

I played around a bit with hacking the sys source, but I don't know
enough about XEN or even FreeBSD kernel behavior to figure out what's
going wrong here.



On Fri, May 14, 2010 at 4:31 AM, masterito  wrote:
> Hello.
>
> I have the same problem, but other error.
>
> When I create machine with 1 CPU (vcpus=1) - all work fine, but when
> I  create machine with 4 CPU (vcpus=4) I see kernel panic on console:
>
> APIC: Using the MPTable enumerator.
> SMP: Added CPU 0 (BSP)
> SMP: Added CPU 1 (AP)
> SMP: Added CPU 2 (AP)
> SMP: Added CPU 3 (AP)
> gdtpfn=3df8cb pdptpfn=f63f4
> panic: HYPERVISOR_vcpu_op(VCPUOP_initialise, cpu,
> &ctxt): /usr/src/sys/i386/xen/mp_machdep.c:929
> cpuid = 0
> KDB: enter: panic
> [thread pid 0 tid 0 ]
> Stopped at      kdb_enter+0x3a: movl    $0,kdb_why
> db>
>
> ---
___
freebsd-xen@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-xen
To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"


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

2010-05-16 Thread K. Macy
I'll take a look this week.

On Fri, May 14, 2010 at 4:47 PM, John Prather  wrote:
> This seems to affect most people trying to use FreeBSD on xen i386 paravirt.
>
> I was trying it on Linode, and got 8.0-RELEASE to actually boot by
> hacking MAXCPU to 1 in sys/i386/include/param.h but even then, when it
> was under load (building world or lots of ports) it would occasionally
> panic.
>
> 8-STABLE wouldn't even boot with MAXCPU hacked to 1 to avoid
> VCPUOP_initialise panic, throwing panic on
> HYPERVISOR_update_va_mapping instead.
>
> I played around a bit with hacking the sys source, but I don't know
> enough about XEN or even FreeBSD kernel behavior to figure out what's
> going wrong here.
>
>
>
> On Fri, May 14, 2010 at 4:31 AM, masterito  wrote:
>> Hello.
>>
>> I have the same problem, but other error.
>>
>> When I create machine with 1 CPU (vcpus=1) - all work fine, but when
>> I  create machine with 4 CPU (vcpus=4) I see kernel panic on console:
>>
>> APIC: Using the MPTable enumerator.
>> SMP: Added CPU 0 (BSP)
>> SMP: Added CPU 1 (AP)
>> SMP: Added CPU 2 (AP)
>> SMP: Added CPU 3 (AP)
>> gdtpfn=3df8cb pdptpfn=f63f4
>> panic: HYPERVISOR_vcpu_op(VCPUOP_initialise, cpu,
>> &ctxt): /usr/src/sys/i386/xen/mp_machdep.c:929
>> cpuid = 0
>> KDB: enter: panic
>> [thread pid 0 tid 0 ]
>> Stopped at      kdb_enter+0x3a: movl    $0,kdb_why
>> db>
>>
>> ---
> ___
> freebsd-xen@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-xen
> To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"
>
___
freebsd-xen@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-xen
To unsubscribe, send any mail to "freebsd-xen-unsubscr...@freebsd.org"