Re: [panic] swi4 page fault (ip_slowtimo())

2013-06-24 Thread Gleb Smirnoff
On Fri, Jun 21, 2013 at 08:17:12PM -0400, Glen Barber wrote:
G Hi,
G 
G I have the following kgdb session from a page fault seemingly triggered
G in pf(4).

pfslowtimo() isn't related to pf(4). pf stands here for protocol family.

G (kgdb) list *0x80772688
G 0x80772688 is in ip_slowtimo (/usr/src/sys/netinet/ip_input.c:1242).
G 1237 for(fp = TAILQ_FIRST(V_ipq[i]); fp;) {
G 1238 struct ipq *fpp;
G 1239 
G 1240 fpp = fp;
G 1241 fp = TAILQ_NEXT(fp, ipq_list);
G 1242 if(--fpp-ipq_ttl == 0) {
G 1243 IPSTAT_ADD(ips_fragtimeout,
G 1244 fpp-ipq_nfrags);
G 1245 ip_freef(V_ipq[i], fpp);
G 1246 }
G (kgdb) p *ipq
G $1 = {tqh_first = 0x0, tqh_last = 0x80e20e80}

Can you please print ipq, so that we can look at entire array.


-- 
Totus tuus, Glebius.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: [panic] swi4 page fault (ip_slowtimo())

2013-06-24 Thread Glen Barber
On Mon, Jun 24, 2013 at 02:21:56PM +0400, Gleb Smirnoff wrote:
 On Fri, Jun 21, 2013 at 08:17:12PM -0400, Glen Barber wrote:
 G Hi,
 G 
 G I have the following kgdb session from a page fault seemingly triggered
 G in pf(4).
 
 pfslowtimo() isn't related to pf(4). pf stands here for protocol family.
 

Ah, thanks.

 G (kgdb) list *0x80772688
 G 0x80772688 is in ip_slowtimo 
 (/usr/src/sys/netinet/ip_input.c:1242).
 G 1237   for(fp = TAILQ_FIRST(V_ipq[i]); fp;) {
 G 1238   struct ipq *fpp;
 G 1239   
 G 1240   fpp = fp;
 G 1241   fp = TAILQ_NEXT(fp, ipq_list);
 G 1242   if(--fpp-ipq_ttl == 0) {
 G 1243   
 IPSTAT_ADD(ips_fragtimeout,
 G 1244   fpp-ipq_nfrags);
 G 1245   ip_freef(V_ipq[i], 
 fpp);
 G 1246   }
 G (kgdb) p *ipq
 G $1 = {tqh_first = 0x0, tqh_last = 0x80e20e80}
 
 Can you please print ipq, so that we can look at entire array.
 

Sure, output follows.

Glen

Script started on Mon Jun 24 06:28:36 2013
root@orion:/usr/obj/usr/src/sys/ORION # kgdb ./kernel.debug /var/crash/vmcore.8
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:


Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address   = 0x11
fault code  = supervisor read data, page not present
instruction pointer = 0x20:0x80772688
stack pointer   = 0x28:0xff800026da20
frame pointer   = 0x28:0xff800026da40
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 = 12 (swi4: clock)
trap number = 12
panic: page fault
cpuid = 0
KDB: stack backtrace:
#0 0x80676a46 at kdb_backtrace+0x66
#1 0x8063ae6b at panic+0x13b
#2 0x80918ba0 at trap_fatal+0x290
#3 0x80918f11 at trap_pfault+0x221
#4 0x809194c4 at trap+0x344
#5 0x80902c53 at calltrap+0x8
#6 0x806a29ce at pfslowtimo+0x2e
#7 0x80651476 at softclock_call_cc+0x106
#8 0x80651b09 at softclock+0xa9
#9 0x8060c06d at intr_event_execute_handlers+0xfd
#10 0x8060d81b at ithread_loop+0x9b
#11 0x80608c1f at fork_exit+0x11f
#12 0x8090317e at fork_trampoline+0xe
Uptime: 42d1h53m40s
(ada0:ahcich0:0:0:0): FLUSHCACHE48. ACB: ea 00 00 00 00 40 00 00 00 00 00 00
(ada0:ahcich0:0:0:0): CAM status: CCB request is in progress
(ada0:ahcich0:0:0:0): Error 5, Retries exhausted
(ada0:ahcich0:0:0:0): Synchronize cache failed
(ada1:ahcich1:0:0:0): FLUSHCACHE48. ACB: ea 00 00 00 00 40 00 00 00 00 00 00
(ada1:ahcich1:0:0:0): CAM status: CCB request is in progress
(ada1:ahcich1:0:0:0): Error 5, Retries exhausted
(ada1:ahcich1:0:0:0): Synchronize cache failed
(ada2:ahcich4:0:0:0): FLUSHCACHE48. ACB: ea 00 00 00 00 40 00 00 00 00 00 00
(ada2:ahcich4:0:0:0): CAM status: CCB request is in progress
(ada2:ahcich4:0:0:0): Error 5, Retries exhausted
(ada2:ahcich4:0:0:0): Synchronize cache failed
(ada3:ahcich5:0:0:0): FLUSHCACHE48. ACB: ea 00 00 00 00 40 00 00 00 00 00 00
(ada3:ahcich5:0:0:0): CAM status: CCB request is in progress
(ada3:ahcich5:0:0:0): Error 5, Retries exhausted
(ada3:ahcich5:0:0:0): Synchronize cache failed
Dumping 2263 out of 6048 MB:..1%..11%..21%..31%..41%..51%..61%..71%..81%..91%

Reading symbols from /boot/kernel/zfs.ko.symbols...done.
Loaded symbols for /boot/kernel/zfs.ko.symbols
Reading symbols from /boot/kernel/opensolaris.ko.symbols...done.
Loaded symbols for /boot/kernel/opensolaris.ko.symbols
#0  doadump (textdump=value optimized out) at pcpu.h:231
231 __asm(movq %%gs:%1,%0 : =r (td)
(kgdb) p ipq
$1 = {{tqh_first = 0x0, tqh_last = 0x80e20e80}, {tqh_first = 0x0, 
tqh_last = 0x80e20e90}, {tqh_first = 0x0, tqh_last = 
0x80e20ea0}, {
tqh_first = 0x0, tqh_last = 0x80e20eb0}, {tqh_first = 0x0, 
tqh_last = 0x80e20ec0}, {tqh_first = 0x0, tqh_last = 
0x80e20ed0}, {
tqh_first = 0x0, tqh_last = 0x80e20ee0}, {tqh_first = 0x0, 
tqh_last = 0x80e20ef0}, {tqh_first = 0x0, tqh_last = 
0x80e20f00}, {
tqh_first = 0x0, tqh_last = 0x80e20f10}, {tqh_first = 0x0, 
tqh_last = 0x80e20f20}, {tqh_first = 0x0, tqh_last 

[panic] swi4 page fault (ip_slowtimo())

2013-06-21 Thread Glen Barber
Hi,

I have the following kgdb session from a page fault seemingly triggered
in pf(4).

I realize the -CURRENT is about a month old, but I cannot find any
commits that seem relevant to this area of the code.

I am happy to dig further and provide any information that is requested.

Glen

Script started on Fri Jun 21 19:57:21 2013
root@orion:/usr/obj/usr/src/sys/ORION # uname -a
FreeBSD orion 10.0-CURRENT FreeBSD 10.0-CURRENT #10 r250476: Fri May 10 
16:29:54 EDT 2013 root@orion:/usr/obj/usr/src/sys/ORION  amd64
root@orion:/usr/obj/usr/src/sys/ORION # kgdb ./kernel.debug /var/crash/vmcore.8
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:


Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address   = 0x11
fault code  = supervisor read data, page not present
instruction pointer = 0x20:0x80772688
stack pointer   = 0x28:0xff800026da20
frame pointer   = 0x28:0xff800026da40
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 = 12 (swi4: clock)
trap number = 12
panic: page fault
cpuid = 0
KDB: stack backtrace:
#0 0x80676a46 at kdb_backtrace+0x66
#1 0x8063ae6b at panic+0x13b
#2 0x80918ba0 at trap_fatal+0x290
#3 0x80918f11 at trap_pfault+0x221
#4 0x809194c4 at trap+0x344
#5 0x80902c53 at calltrap+0x8
#6 0x806a29ce at pfslowtimo+0x2e
#7 0x80651476 at softclock_call_cc+0x106
#8 0x80651b09 at softclock+0xa9
#9 0x8060c06d at intr_event_execute_handlers+0xfd
#10 0x8060d81b at ithread_loop+0x9b
#11 0x80608c1f at fork_exit+0x11f
#12 0x8090317e at fork_trampoline+0xe
Uptime: 42d1h53m40s
(ada0:ahcich0:0:0:0): FLUSHCACHE48. ACB: ea 00 00 00 00 40 00 00 00 00 00 00
(ada0:ahcich0:0:0:0): CAM status: CCB request is in progress
(ada0:ahcich0:0:0:0): Error 5, Retries exhausted
(ada0:ahcich0:0:0:0): Synchronize cache failed
(ada1:ahcich1:0:0:0): FLUSHCACHE48. ACB: ea 00 00 00 00 40 00 00 00 00 00 00
(ada1:ahcich1:0:0:0): CAM status: CCB request is in progress
(ada1:ahcich1:0:0:0): Error 5, Retries exhausted
(ada1:ahcich1:0:0:0): Synchronize cache failed
(ada2:ahcich4:0:0:0): FLUSHCACHE48. ACB: ea 00 00 00 00 40 00 00 00 00 00 00
(ada2:ahcich4:0:0:0): CAM status: CCB request is in progress
(ada2:ahcich4:0:0:0): Error 5, Retries exhausted
(ada2:ahcich4:0:0:0): Synchronize cache failed
(ada3:ahcich5:0:0:0): FLUSHCACHE48. ACB: ea 00 00 00 00 40 00 00 00 00 00 00
(ada3:ahcich5:0:0:0): CAM status: CCB request is in progress
(ada3:ahcich5:0:0:0): Error 5, Retries exhausted
(ada3:ahcich5:0:0:0): Synchronize cache failed
Dumping 2263 out of 6048 MB:..1%..11%..21%..31%..41%..51%..61%..71%..81%..91%

Reading symbols from /boot/kernel/zfs.ko.symbols...done.
Loaded symbols for /boot/kernel/zfs.ko.symbols
Reading symbols from /boot/kernel/opensolaris.ko.symbols...done.
Loaded symbols for /boot/kernel/opensolaris.ko.symbols
#0  doadump (textdump=value optimized out) at pcpu.h:231
231 __asm(movq %%gs:%1,%0 : =r (td)
(kgdb) bt
#0  doadump (textdump=value optimized out) at pcpu.h:231
#1  0x8063a9d6 in kern_reboot (howto=260) at 
/usr/src/sys/kern/kern_shutdown.c:447
#2  0x8063ae55 in panic (fmt=value optimized out) at 
/usr/src/sys/kern/kern_shutdown.c:754
#3  0x80918ba0 in trap_fatal (frame=0xc, eva=value optimized out) at 
/usr/src/sys/amd64/amd64/trap.c:872
#4  0x80918f11 in trap_pfault (frame=0xff800026d970, usermode=0) at 
/usr/src/sys/amd64/amd64/trap.c:789
#5  0x809194c4 in trap (frame=0xff800026d970) at 
/usr/src/sys/amd64/amd64/trap.c:463
#6  0x80902c53 in calltrap () at 
/usr/src/sys/amd64/amd64/exception.S:228
#7  0x80772688 in ip_slowtimo () at /usr/src/sys/netinet/ip_input.c:1237
#8  0x806a29ce in pfslowtimo (arg=0x0) at 
/usr/src/sys/kern/uipc_domain.c:508
#9  0x80651476 in softclock_call_cc (c=0x80e1ac60, 
cc=0x80dc6800, direct=0)
at /usr/src/sys/kern/kern_timeout.c:674
#10 0x80651b09 in softclock (arg=value optimized out) at 
/usr/src/sys/kern/kern_timeout.c:802
#11 0x8060c06d in intr_event_execute_handlers (p=value optimized out, 
ie=0xfe0010811900)
at /usr/src/sys/kern/kern_intr.c:1263
#12 0x8060d81b in ithread_loop (arg=0xfe0010819000) at 
/usr/src/sys/kern/kern_intr.c:1276
#13 0x80608c1f in fork_exit (callout=0x8060d780