Re: kernel panic with ipnat/dummynet

2016-09-29 Thread s...@sysinfo.pl s...@sysinfo.pl

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


kernel panic with ipnat/dummynet

2016-09-29 Thread s...@sysinfo.pl s...@sysinfo.pl
Hi,

I have problems with panics since 2 years. Diffrent machines, diffrent versions
of FreeBSD (9+). Nothing has changed even in 12-CURRENT.
FreeBSD is used as router/nat(ipnat)/ipfw/dummynet for over 400 desktops.

I have 2 panics in 3h. Previous with only screen photo:
https://postimg.org/image/g6eq69jkf/
And last:

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:
<110>ipfw: 3700 Deny TCP 200.100.229.149:12750 155.133.23.8:23 out via em1
<110>ipfw: 3700 Deny TCP 216.243.31.2:40159 155.133.22.217:443 out via em1
<110>ipfw: 3700 Deny TCP 192.168.0.101:48000 31.13.81.13:443 in via em1
Kernel page fault with the following non-sleepable locks held:
shared rw ipf IP NAT rwlock (ipf IP NAT rwlock) r = 0 (0x818d6170)
locked @ /usr/src/sys/contrib/ipfilter/netinet/ip_nat.c:4925
shared rw ipf filter rwlock (ipf filter rwlock) r = 0 (0x818d6058)
locked @ /usr/src/sys/contrib/ipfilter/netinet/fil.c:3024
shared rm PFil shared rmlock (PFil shared rmlock) r = 0 (0x81eab3f0)
locked @ /usr/src/sys/net/pfil.c:78
stack backtrace:
#0 0x80af7b90 at witness_debugger+0x70
#1 0x80af8e77 at witness_warn+0x3d7
#2 0x80f34507 at trap_pfault+0x57
#3 0x80f33bbb at trap+0x28b
#4 0x80f14461 at calltrap+0x8
#5 0x803a7e87 at ipf_proxy_check+0x127
#6 0x8039b36b at ipf_nat_out+0x6db
#7 0x8039a72f at ipf_nat_checkout+0x1ff
#8 0x80381496 at ipf_check+0x726
#9 0x80ba08cb at pfil_run_hooks+0x8b
#10 0x80c0326b at ip_tryforward+0x26b
#11 0x80c058b7 at ip_input+0x377
#12 0x80b9f7b0 at netisr_dispatch_src+0x80
#13 0x80cecc07 at dummynet_send+0x167
#14 0x80cec530 at dummynet_task+0x310
#15 0x80aeb5bc at taskqueue_run_locked+0x13c
#16 0x80aec138 at taskqueue_thread_loop+0x88
#17 0x80a5bd74 at fork_exit+0x84


Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address   = 0xe
fault code  = supervisor read data, page not present
instruction pointer = 0x20:0x803a09cd
stack pointer   = 0x28:0xfe023ab3e4e0
frame pointer   = 0x28:0xfe023ab3e5c0
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 = 0 (dummynet)
trap number = 12
panic: page fault
cpuid = 0
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfe023ab3e060
vpanic() at vpanic+0x182/frame 0xfe023ab3e0e0
panic() at panic+0x43/frame 0xfe023ab3e140
trap_fatal() at trap_fatal+0x331/frame 0xfe023ab3e1a0
trap_pfault() at trap_pfault+0x1fd/frame 0xfe023ab3e200
trap() at trap+0x28b/frame 0xfe023ab3e410
calltrap() at calltrap+0x8/frame 0xfe023ab3e410
--- trap 0xc, rip = 0x803a09cd, rsp = 0xfe023ab3e4e0, rbp =
0xfe023ab3e5c0 ---
ipf_p_ftp_process() at ipf_p_ftp_process+0x16d/frame 0xfe023ab3e5c0
ipf_proxy_check() at ipf_proxy_check+0x127/frame 0xfe023ab3e630
ipf_nat_out() at ipf_nat_out+0x6db/frame 0xfe023ab3e690
ipf_nat_checkout() at ipf_nat_checkout+0x1ff/frame 0xfe023ab3e740
ipf_check() at ipf_check+0x726/frame 0xfe023ab3e8b0
pfil_run_hooks() at pfil_run_hooks+0x8b/frame 0xfe023ab3e940
ip_tryforward() at ip_tryforward+0x26b/frame 0xfe023ab3e9c0
ip_input() at ip_input+0x377/frame 0xfe023ab3ea20
netisr_dispatch_src() at netisr_dispatch_src+0x80/frame 0xfe023ab3ea80
dummynet_send() at dummynet_send+0x167/frame 0xfe023ab3eac0
dummynet_task() at dummynet_task+0x310/frame 0xfe023ab3eb20
taskqueue_run_locked() at taskqueue_run_locked+0x13c/frame 0xfe023ab3eb80
taskqueue_thread_loop() at taskqueue_thread_loop+0x88/frame 0xfe023ab3ebb0
fork_exit() at fork_exit+0x84/frame 0xfe023ab3ebf0
fork_trampoline() at fork_trampoline+0xe/frame 0xfe023ab3ebf0
--- trap 0, rip = 0, rsp = 0, rbp = 0 ---
Uptime: 3h12m45s
Dumping 641 out of 8158 MB:..3%..13%..23%..33%..43%..53%..63%..73%..83%..93%

Reading symbols from /boot/kernel/fdescfs.ko...Reading symbols from
/usr/lib/debug//boot/kernel/fdescfs.ko.debug...done.
done.
Loaded symbols for /boot/kernel/fdescfs.ko
Reading symbols from /boot/kernel/iscsi.ko...Reading symbols from
/usr/lib/debug//boot/kernel/iscsi.ko.debug...done.
done.
Loaded symbols for /boot/kernel/iscsi.ko
#0  doadump (textdump=1) at pcpu.h:221
221 __asm("movq %%gs:%1,%0" : "=r" (td)
(kgdb) list *0x803a09cd
0x803a09cd is in ipf_p_ftp_process