Re: double panic, and whats apic_cmd? (kqemu crash...)

2007-11-29 Thread perryh
> > Oh and I left memtest86 running on that box overnight and it
> > found nothing...
>
> well, it could be a kqemu bug I guess, but your panics look like
> seemingly random memory corruptino as you have stack traces where
> functions are calling other functions that the don't actually call
> in the source code.

Dunno if this is even *possible* on amd64, but if this were a
PowerPC (or MIPS) I would be looking for cache-coherency problems.

P.S. If responding, pls include -hackers@ or Cc: me, as I am not
on [EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: double panic, and whats apic_cmd? (kqemu crash...)

2007-11-29 Thread John Baldwin
On Wednesday 28 November 2007 06:50:42 pm Juergen Lock wrote:
> On Tue, Nov 27, 2007 at 08:24:55AM -0500, John Baldwin wrote:
> > On Sunday 18 November 2007 05:43:45 pm Juergen Lock wrote:
> > > On Sun, Nov 18, 2007 at 03:05:33AM +0100, Juergen Lock wrote:
> > > > Ok I finally have an amd64 smp box here that i can play with, and 
tried
> > > > to reproduce http://www.freebsd.org/cgi/query-pr.cgi?pr=113430 - and I 
got
> > > > the following crash:
> > > >[...]
> > > 
> > > Ok, the crashes seem to be pretty random, I got a few more:
> > > (btw I disabled -DSMP in the kqemu build since it doesn't seem to help,
> > > and it doesn't seem to be used anywhere else.  Also I forgot to say
> > > I also have KDB_TRACE and KDB_UNATTENDED in the kernel config.  Oh and
> > > I had a few hangs too, and never could get into ddb in those cases...)
> > > 
> > > [GDB will not be able to debug user-mode 
threads: /usr/lib/libthread_db.so: Undefined symbol "ps_pglobal_lookup"]
> > > GNU gdb 6.1.1 [FreeBSD]
> > > Copyright 2004 Free Software Foundation, Inc.
> > > GDB is free software, covered by the GNU General Public License, and you 
are
> > > welcome to change it and/or distribute copies of it under certain 
conditions.
> > > Type "show copying" to see the conditions.
> > > There is absolutely no warranty for GDB.  Type "show warranty" for 
details.
> > > This GDB was configured as "amd64-marcel-freebsd".
> > > 
> > > Unread portion of the kernel message buffer:
> > > kernel trap 12 with interrupts disabled
> > > 
> > > 
> > > Fatal trap 12: page fault while in kernel mode
> > > cpuid = 1; apic id = 01
> > > fault virtual address = 0x246
> > > fault code= supervisor read instruction, page not present
> > > instruction pointer   = 0x8:0x246
> > > stack pointer = 0x10:0x9fae4b50
> > > frame pointer = 0x10:0x9fae4b80
> > > code segment  = base 0x0, limit 0xf, type 0x1b
> > >   = DPL 0, pres 1, long 1, def32 0, gran 1
> > > processor eflags  = resume, IOPL = 0
> > > current process   = 11 (idle: cpu1)
> > > trap number   = 12
> > > <0>
> > > 
> > > 
> > > Fatal trap 12: page fault while in kernel mode
> > > cpuid = 1; apic id = 01
> > > fault virtual address = 0xc011dbfb
> > > fault code= supervisor read instruction, page not present
> > > instruction pointer   = 0x8:0xc011dbfb
> > > stack pointer = 0x10:0x9fae47d0
> > > frame pointer = 0x10:0x801de4000
> > > code segment  = base 0x0, limit 0xf, type 0x1b
> > >   = DPL 0, pres 1, long 1, def32 0, gran 1
> > > processor eflags  = trace trap, interrupt enabled, nested task, IOPL = 3
> > > current process   = 11 (idle: cpu1)
> > > trap number   = 12
> > > panic: page fault
> > > cpuid = 1
> > > KDB: stack backtrace:
> > > db_trace_self_wrapper() at db_trace_self_wrapper+0x2a
> > > panic() at panic+0x17a
> > > trap_fatal() at trap_fatal+0x29f
> > > trap_pfault() at trap_pfault+0x294
> > > trap() at trap+0x2ea
> > > sendsig() at sendsig+0x2aa
> > > sched_choose() at sched_choose+0x8c
> > > choosethread() at choosethread+0x2b
> > > sched_switch() at sched_switch+0x184
> > > mi_switch() at mi_switch+0x189
> > > ast() at ast+0x1e8
> > > doreti_ast() at doreti_ast+0x1f
> > > Uptime: 37m8s
> > > Physical memory: 986 MB
> > > Dumping 152 MB: 137 121 105 89 73 57 41 25 9
> > > 
> > > #0  doadump () at pcpu.h:194
> > > 194   __asm __volatile("movq %%gs:0,%0" : "=r" (td));
> > > (kgdb) bt
> > > #0  doadump () at pcpu.h:194
> > > #1  0x80484b18 in boot (howto=260) 
at ../../../kern/kern_shutdown.c:409
> > > #2  0x80484f77 in panic (fmt=Variable "fmt" is not available.
> > > ) at ../../../kern/kern_shutdown.c:563
> > > #3  0x8070de6f in trap_fatal (frame=0xc, eva=Variable "eva" is 
not available.
> > > )
> > > at ../../../amd64/amd64/trap.c:697
> > > #4  0x8070e254 in trap_pfault (frame=0x9fae4720, 
usermode=0)
> > > at ../../../amd64/amd64/trap.c:614
> > > #5  0x8070ec0a in trap (frame=0x9fae4720)
> > > at ../../../amd64/amd64/trap.c:383
> > > #6  0x806fcd4a in sendsig (catcher=0x405460, ksi=Variable "ksi" 
is not available.
> > > )
> > > at ../../../amd64/amd64/machdep.c:326
> > > #7  0x804a16ec in sched_choose () 
at ../../../kern/sched_4bsd.c:1256
> > > #8  0x804a174b in choosethread () at kern_switch.c:137
> > > #9  0x804a2984 in sched_switch (td=0xff000209b680, 
> > > newtd=0xff00021a18c0, flags=13) 
at ../../../kern/sched_4bsd.c:907
> > > #10 0x8048cc99 in mi_switch (flags=2, newtd=0x0)
> > > at ../../../kern/kern_synch.c:442
> > > #11 0x804b7068 in ast (framep=0x9fae4c70)
> > > at ../../../kern/subr_trap.c:239
> > > #12 0x806f4999 in doreti_ast () 
at ../../../amd64/amd64/exception.S:468
> > > #13 0x0

Re: double panic, and whats apic_cmd? (kqemu crash...)

2007-11-28 Thread Juergen Lock
On Tue, Nov 27, 2007 at 08:24:55AM -0500, John Baldwin wrote:
> On Sunday 18 November 2007 05:43:45 pm Juergen Lock wrote:
> > On Sun, Nov 18, 2007 at 03:05:33AM +0100, Juergen Lock wrote:
> > > Ok I finally have an amd64 smp box here that i can play with, and tried
> > > to reproduce http://www.freebsd.org/cgi/query-pr.cgi?pr=113430 - and I got
> > > the following crash:
> > >[...]
> > 
> > Ok, the crashes seem to be pretty random, I got a few more:
> > (btw I disabled -DSMP in the kqemu build since it doesn't seem to help,
> > and it doesn't seem to be used anywhere else.  Also I forgot to say
> > I also have KDB_TRACE and KDB_UNATTENDED in the kernel config.  Oh and
> > I had a few hangs too, and never could get into ddb in those cases...)
> > 
> > [GDB will not be able to debug user-mode threads: /usr/lib/libthread_db.so: 
> > Undefined symbol "ps_pglobal_lookup"]
> > GNU gdb 6.1.1 [FreeBSD]
> > Copyright 2004 Free Software Foundation, Inc.
> > GDB is free software, covered by the GNU General Public License, and you are
> > welcome to change it and/or distribute copies of it under certain 
> > conditions.
> > Type "show copying" to see the conditions.
> > There is absolutely no warranty for GDB.  Type "show warranty" for details.
> > This GDB was configured as "amd64-marcel-freebsd".
> > 
> > Unread portion of the kernel message buffer:
> > kernel trap 12 with interrupts disabled
> > 
> > 
> > Fatal trap 12: page fault while in kernel mode
> > cpuid = 1; apic id = 01
> > fault virtual address   = 0x246
> > fault code  = supervisor read instruction, page not present
> > instruction pointer = 0x8:0x246
> > stack pointer   = 0x10:0x9fae4b50
> > frame pointer   = 0x10:0x9fae4b80
> > code segment= base 0x0, limit 0xf, type 0x1b
> > = DPL 0, pres 1, long 1, def32 0, gran 1
> > processor eflags= resume, IOPL = 0
> > current process = 11 (idle: cpu1)
> > trap number = 12
> > <0>
> > 
> > 
> > Fatal trap 12: page fault while in kernel mode
> > cpuid = 1; apic id = 01
> > fault virtual address   = 0xc011dbfb
> > fault code  = supervisor read instruction, page not present
> > instruction pointer = 0x8:0xc011dbfb
> > stack pointer   = 0x10:0x9fae47d0
> > frame pointer   = 0x10:0x801de4000
> > code segment= base 0x0, limit 0xf, type 0x1b
> > = DPL 0, pres 1, long 1, def32 0, gran 1
> > processor eflags= trace trap, interrupt enabled, nested task, IOPL = 3
> > current process = 11 (idle: cpu1)
> > trap number = 12
> > panic: page fault
> > cpuid = 1
> > KDB: stack backtrace:
> > db_trace_self_wrapper() at db_trace_self_wrapper+0x2a
> > panic() at panic+0x17a
> > trap_fatal() at trap_fatal+0x29f
> > trap_pfault() at trap_pfault+0x294
> > trap() at trap+0x2ea
> > sendsig() at sendsig+0x2aa
> > sched_choose() at sched_choose+0x8c
> > choosethread() at choosethread+0x2b
> > sched_switch() at sched_switch+0x184
> > mi_switch() at mi_switch+0x189
> > ast() at ast+0x1e8
> > doreti_ast() at doreti_ast+0x1f
> > Uptime: 37m8s
> > Physical memory: 986 MB
> > Dumping 152 MB: 137 121 105 89 73 57 41 25 9
> > 
> > #0  doadump () at pcpu.h:194
> > 194 __asm __volatile("movq %%gs:0,%0" : "=r" (td));
> > (kgdb) bt
> > #0  doadump () at pcpu.h:194
> > #1  0x80484b18 in boot (howto=260) at 
> > ../../../kern/kern_shutdown.c:409
> > #2  0x80484f77 in panic (fmt=Variable "fmt" is not available.
> > ) at ../../../kern/kern_shutdown.c:563
> > #3  0x8070de6f in trap_fatal (frame=0xc, eva=Variable "eva" is not 
> > available.
> > )
> > at ../../../amd64/amd64/trap.c:697
> > #4  0x8070e254 in trap_pfault (frame=0x9fae4720, usermode=0)
> > at ../../../amd64/amd64/trap.c:614
> > #5  0x8070ec0a in trap (frame=0x9fae4720)
> > at ../../../amd64/amd64/trap.c:383
> > #6  0x806fcd4a in sendsig (catcher=0x405460, ksi=Variable "ksi" is 
> > not available.
> > )
> > at ../../../amd64/amd64/machdep.c:326
> > #7  0x804a16ec in sched_choose () at ../../../kern/sched_4bsd.c:1256
> > #8  0x804a174b in choosethread () at kern_switch.c:137
> > #9  0x804a2984 in sched_switch (td=0xff000209b680, 
> > newtd=0xff00021a18c0, flags=13) at ../../../kern/sched_4bsd.c:907
> > #10 0x8048cc99 in mi_switch (flags=2, newtd=0x0)
> > at ../../../kern/kern_synch.c:442
> > #11 0x804b7068 in ast (framep=0x9fae4c70)
> > at ../../../kern/subr_trap.c:239
> > #12 0x806f4999 in doreti_ast () at 
> > ../../../amd64/amd64/exception.S:468
> > #13 0x000811d87d74 in ?? ()
> > #14 0x0005 in ?? ()
> > #15 0x10e0 in ?? ()
> > ---Type  to continue, or q  to quit---
> > #16 0x000811d87d8c in ?? ()
> > #17 0x000801de4000 in ?? ()
> > #18 0x000741e0 in ?? ()
> > #19 0x0

Re: double panic, and whats apic_cmd? (kqemu crash...)

2007-11-27 Thread John Baldwin
On Sunday 18 November 2007 05:43:45 pm Juergen Lock wrote:
> On Sun, Nov 18, 2007 at 03:05:33AM +0100, Juergen Lock wrote:
> > Ok I finally have an amd64 smp box here that i can play with, and tried
> > to reproduce http://www.freebsd.org/cgi/query-pr.cgi?pr=113430 - and I got
> > the following crash:
> >[...]
> 
> Ok, the crashes seem to be pretty random, I got a few more:
> (btw I disabled -DSMP in the kqemu build since it doesn't seem to help,
> and it doesn't seem to be used anywhere else.  Also I forgot to say
> I also have KDB_TRACE and KDB_UNATTENDED in the kernel config.  Oh and
> I had a few hangs too, and never could get into ddb in those cases...)
> 
> [GDB will not be able to debug user-mode threads: /usr/lib/libthread_db.so: 
> Undefined symbol "ps_pglobal_lookup"]
> GNU gdb 6.1.1 [FreeBSD]
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "amd64-marcel-freebsd".
> 
> Unread portion of the kernel message buffer:
> kernel trap 12 with interrupts disabled
> 
> 
> Fatal trap 12: page fault while in kernel mode
> cpuid = 1; apic id = 01
> fault virtual address = 0x246
> fault code= supervisor read instruction, page not present
> instruction pointer   = 0x8:0x246
> stack pointer = 0x10:0x9fae4b50
> frame pointer = 0x10:0x9fae4b80
> code segment  = base 0x0, limit 0xf, type 0x1b
>   = DPL 0, pres 1, long 1, def32 0, gran 1
> processor eflags  = resume, IOPL = 0
> current process   = 11 (idle: cpu1)
> trap number   = 12
> <0>
> 
> 
> Fatal trap 12: page fault while in kernel mode
> cpuid = 1; apic id = 01
> fault virtual address = 0xc011dbfb
> fault code= supervisor read instruction, page not present
> instruction pointer   = 0x8:0xc011dbfb
> stack pointer = 0x10:0x9fae47d0
> frame pointer = 0x10:0x801de4000
> code segment  = base 0x0, limit 0xf, type 0x1b
>   = DPL 0, pres 1, long 1, def32 0, gran 1
> processor eflags  = trace trap, interrupt enabled, nested task, IOPL = 3
> current process   = 11 (idle: cpu1)
> trap number   = 12
> panic: page fault
> cpuid = 1
> KDB: stack backtrace:
> db_trace_self_wrapper() at db_trace_self_wrapper+0x2a
> panic() at panic+0x17a
> trap_fatal() at trap_fatal+0x29f
> trap_pfault() at trap_pfault+0x294
> trap() at trap+0x2ea
> sendsig() at sendsig+0x2aa
> sched_choose() at sched_choose+0x8c
> choosethread() at choosethread+0x2b
> sched_switch() at sched_switch+0x184
> mi_switch() at mi_switch+0x189
> ast() at ast+0x1e8
> doreti_ast() at doreti_ast+0x1f
> Uptime: 37m8s
> Physical memory: 986 MB
> Dumping 152 MB: 137 121 105 89 73 57 41 25 9
> 
> #0  doadump () at pcpu.h:194
> 194   __asm __volatile("movq %%gs:0,%0" : "=r" (td));
> (kgdb) bt
> #0  doadump () at pcpu.h:194
> #1  0x80484b18 in boot (howto=260) at 
> ../../../kern/kern_shutdown.c:409
> #2  0x80484f77 in panic (fmt=Variable "fmt" is not available.
> ) at ../../../kern/kern_shutdown.c:563
> #3  0x8070de6f in trap_fatal (frame=0xc, eva=Variable "eva" is not 
> available.
> )
> at ../../../amd64/amd64/trap.c:697
> #4  0x8070e254 in trap_pfault (frame=0x9fae4720, usermode=0)
> at ../../../amd64/amd64/trap.c:614
> #5  0x8070ec0a in trap (frame=0x9fae4720)
> at ../../../amd64/amd64/trap.c:383
> #6  0x806fcd4a in sendsig (catcher=0x405460, ksi=Variable "ksi" is 
> not available.
> )
> at ../../../amd64/amd64/machdep.c:326
> #7  0x804a16ec in sched_choose () at ../../../kern/sched_4bsd.c:1256
> #8  0x804a174b in choosethread () at kern_switch.c:137
> #9  0x804a2984 in sched_switch (td=0xff000209b680, 
> newtd=0xff00021a18c0, flags=13) at ../../../kern/sched_4bsd.c:907
> #10 0x8048cc99 in mi_switch (flags=2, newtd=0x0)
> at ../../../kern/kern_synch.c:442
> #11 0x804b7068 in ast (framep=0x9fae4c70)
> at ../../../kern/subr_trap.c:239
> #12 0x806f4999 in doreti_ast () at 
> ../../../amd64/amd64/exception.S:468
> #13 0x000811d87d74 in ?? ()
> #14 0x0005 in ?? ()
> #15 0x10e0 in ?? ()
> ---Type  to continue, or q  to quit---
> #16 0x000811d87d8c in ?? ()
> #17 0x000801de4000 in ?? ()
> #18 0x000741e0 in ?? ()
> #19 0x0215dd30 in ?? ()
> #20 0x00d49160 in ?? ()
> #21 0xc016fdf0 in ?? ()
> #22 0x in ?? ()
> #23 0x000801de84d0 in ?? ()
> #24 0xbfff in ?? ()
> #25 0x00063fff in ?? ()
> #26 0x000801de4000 in ?? ()
> #27 0x00063fff in ?? ()
> #28 0x00

Re: double panic, and whats apic_cmd? (kqemu crash...)

2007-11-18 Thread Juergen Lock
On Sun, Nov 18, 2007 at 03:05:33AM +0100, Juergen Lock wrote:
> Ok I finally have an amd64 smp box here that i can play with, and tried
> to reproduce http://www.freebsd.org/cgi/query-pr.cgi?pr=113430 - and I got
> the following crash:
>[...]

Ok, the crashes seem to be pretty random, I got a few more:
(btw I disabled -DSMP in the kqemu build since it doesn't seem to help,
and it doesn't seem to be used anywhere else.  Also I forgot to say
I also have KDB_TRACE and KDB_UNATTENDED in the kernel config.  Oh and
I had a few hangs too, and never could get into ddb in those cases...)

[GDB will not be able to debug user-mode threads: /usr/lib/libthread_db.so: 
Undefined symbol "ps_pglobal_lookup"]
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd".

Unread portion of the kernel message buffer:
kernel trap 12 with interrupts disabled


Fatal trap 12: page fault while in kernel mode
cpuid = 1; apic id = 01
fault virtual address   = 0x246
fault code  = supervisor read instruction, page not present
instruction pointer = 0x8:0x246
stack pointer   = 0x10:0x9fae4b50
frame pointer   = 0x10:0x9fae4b80
code segment= base 0x0, limit 0xf, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags= resume, IOPL = 0
current process = 11 (idle: cpu1)
trap number = 12
<0>


Fatal trap 12: page fault while in kernel mode
cpuid = 1; apic id = 01
fault virtual address   = 0xc011dbfb
fault code  = supervisor read instruction, page not present
instruction pointer = 0x8:0xc011dbfb
stack pointer   = 0x10:0x9fae47d0
frame pointer   = 0x10:0x801de4000
code segment= base 0x0, limit 0xf, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags= trace trap, interrupt enabled, nested task, IOPL = 3
current process = 11 (idle: cpu1)
trap number = 12
panic: page fault
cpuid = 1
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2a
panic() at panic+0x17a
trap_fatal() at trap_fatal+0x29f
trap_pfault() at trap_pfault+0x294
trap() at trap+0x2ea
sendsig() at sendsig+0x2aa
sched_choose() at sched_choose+0x8c
choosethread() at choosethread+0x2b
sched_switch() at sched_switch+0x184
mi_switch() at mi_switch+0x189
ast() at ast+0x1e8
doreti_ast() at doreti_ast+0x1f
Uptime: 37m8s
Physical memory: 986 MB
Dumping 152 MB: 137 121 105 89 73 57 41 25 9

#0  doadump () at pcpu.h:194
194 __asm __volatile("movq %%gs:0,%0" : "=r" (td));
(kgdb) bt
#0  doadump () at pcpu.h:194
#1  0x80484b18 in boot (howto=260) at ../../../kern/kern_shutdown.c:409
#2  0x80484f77 in panic (fmt=Variable "fmt" is not available.
) at ../../../kern/kern_shutdown.c:563
#3  0x8070de6f in trap_fatal (frame=0xc, eva=Variable "eva" is not 
available.
)
at ../../../amd64/amd64/trap.c:697
#4  0x8070e254 in trap_pfault (frame=0x9fae4720, usermode=0)
at ../../../amd64/amd64/trap.c:614
#5  0x8070ec0a in trap (frame=0x9fae4720)
at ../../../amd64/amd64/trap.c:383
#6  0x806fcd4a in sendsig (catcher=0x405460, ksi=Variable "ksi" is not 
available.
)
at ../../../amd64/amd64/machdep.c:326
#7  0x804a16ec in sched_choose () at ../../../kern/sched_4bsd.c:1256
#8  0x804a174b in choosethread () at kern_switch.c:137
#9  0x804a2984 in sched_switch (td=0xff000209b680, 
newtd=0xff00021a18c0, flags=13) at ../../../kern/sched_4bsd.c:907
#10 0x8048cc99 in mi_switch (flags=2, newtd=0x0)
at ../../../kern/kern_synch.c:442
#11 0x804b7068 in ast (framep=0x9fae4c70)
at ../../../kern/subr_trap.c:239
#12 0x806f4999 in doreti_ast () at ../../../amd64/amd64/exception.S:468
#13 0x000811d87d74 in ?? ()
#14 0x0005 in ?? ()
#15 0x10e0 in ?? ()
---Type  to continue, or q  to quit---
#16 0x000811d87d8c in ?? ()
#17 0x000801de4000 in ?? ()
#18 0x000741e0 in ?? ()
#19 0x0215dd30 in ?? ()
#20 0x00d49160 in ?? ()
#21 0xc016fdf0 in ?? ()
#22 0x in ?? ()
#23 0x000801de84d0 in ?? ()
#24 0xbfff in ?? ()
#25 0x00063fff in ?? ()
#26 0x000801de4000 in ?? ()
#27 0x00063fff in ?? ()
#28 0x0016 in ?? ()
#29 0x in ?? ()
#30 0x in ?? ()
#31 0x in ?? ()
#32 0x0215dd0c in ?? ()
#33 0x002b in ?? ()
#34 0x0286 in ?? ()
#35 0x7fffb608 in ?? ()
#36 0x0023 in ?? 

double panic, and whats apic_cmd? (kqemu crash...)

2007-11-17 Thread Juergen Lock
Ok I finally have an amd64 smp box here that i can play with, and tried
to reproduce http://www.freebsd.org/cgi/query-pr.cgi?pr=113430 - and I got
the following crash:

iapetus# kgdb kernel.debug /var/crash/vmcore.0
[GDB will not be able to debug user-mode threads: /usr/lib/libthread_db.so: 
Undefined symbol "ps_pglobal_lookup"]
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd".

Unread portion of the kernel message buffer:
<0>


Fatal trap 12: page fault while in kernel mode
cpuid = 1; apic id = 01
fault virtual address   = 0x1
fault code  = supervisor read data, page not present
instruction pointer = 0x8:0x804e4fa2
stack pointer   = 0x10:0x9fd27530
frame pointer   = 0x10:0x9fd276a0
code segment= base 0x0, limit 0xf, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags= interrupt enabled, resume, IOPL = 0
current process = 43 (acpi_thermal)
trap number = 12
panic: page fault
cpuid = 1
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2a
panic() at panic+0x17a
trap_fatal() at trap_fatal+0x29f
trap_pfault() at trap_pfault+0x22d
trap() at trap+0x300
calltrap() at calltrap+0x8
--- trap 0xc, rip = 0x804e4fa2, rsp = 0x9fd27530, rbp = 
0x9fd276a0 ---
strlen() at strlen+0x2
dmapbase() at 0xff00020e6ca8
Uptime: 9m41s
Physical memory: 986 MB
Dumping 114 MB: 99 83 67 51 35 19 3

#0  doadump () at pcpu.h:194
194 __asm __volatile("movq %%gs:0,%0" : "=r" (td));
(kgdb) bt
#0  doadump () at pcpu.h:194
#1  0x8046572f in boot (howto=260) at ../../../kern/kern_shutdown.c:409
#2  0x80465b47 in panic (fmt=Variable "fmt" is not available.
) at ../../../kern/kern_shutdown.c:563
#3  0x806bc0bf in trap_fatal (frame=0xc, eva=Variable "eva" is not 
available.
)
at ../../../amd64/amd64/trap.c:697
#4  0x806bc43d in trap_pfault (frame=0x9fd27480, usermode=0)
at ../../../amd64/amd64/trap.c:614
#5  0x806bcd30 in trap (frame=0x9fd27480)
at ../../../amd64/amd64/trap.c:383
#6  0x806a371e in calltrap () at ../../../amd64/amd64/exception.S:169
#7  0x804e4fa2 in strlen (str=0x1 )
at ../../../libkern/strlen.c:41
#8  0x8048c5f5 in kvprintf (
fmt=0x807aee73 " while in %s mode\n", 
func=0x8048d000 , arg=0x9fd276b0, radix=10, 
ap=Variable "ap" is not available.
)
at ../../../kern/subr_prf.c:750
#9  0xff00020e6ca8 in ?? ()
#10 0x0008 in ?? ()
#11 0x0153 in ?? ()
#12 0x807add18 in apic_cmd ()
#13 0x in ?? ()
#14 0x9fd27700 in ?? ()
#15 0x8045c28f in _mtx_lock_flags (m=0x8049668b, 
---Type  to continue, or q  to quit---
opts=36477624, file=0x9fd276d0 "", line=-2137032800)
at ../../../kern/kern_mutex.c:189
Previous frame inner to this frame (corrupt stack?)
(kgdb) q
iapetus# exit

 " while in %s mode\n" seems to come from /sys/amd64/amd64/trap.c so it's
a double panic, but what is apic_cmd?  And what does one do with a double
panic? :)

 For anyone who wants to reproduce it (you need an amd64 smp box, mine
runs 7.0beta2), I installed the qemu-devel port with kqemu selected in
config and then ran it in X like
qemu -cdrom sidux.iso -m 256
, booted its grub, quickly switched to a texconsole, just in time for the
panic (sidux is a linux livecd but I guess almost any guest will do, probably
also a freebsd install iso...  and maybe if you don't have X you can
get away with a qemu built with sdl/x deselected and then running that with
-nographic.  Of course you won't see guest output then so it will have to
boot by itslef, unless it talks to a serial console...)

 Btw, to get meaningful backtraces on amd64 I think you need to
rebuild the debug kernel with ddb compiled in, otherwise stuff is left
built with -fomit-frame-pointer which makes gdb unhappy. (shouldn't
-fomit-frame-pointer be disabled for any kind of debug kernel because
of that?)

 Thanx,
Juergen
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"