1991kv / netmap-ipfw

Automatically exported from code.google.com/p/netmap-ipfw
0 stars 0 forks source link

kipw drops with core dump #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Our scripts fills 5-6 tables by calling ./ipfw table xx add 192.168.xxx.xxx 
(up to 5K IP addresses in tables)

2. In additional term we check content of tables: ./ipfw table xx list, ./ipfw 
table xx list | wc -l

3. After a couple of checks (p.2) it drops with dump.

What is the expected output? What do you see instead?
[ 678.718910] session.c:do_server  [532] +++ listening tcp 127.0.0.1:5556
Bus error (core dumped)

What version of the product are you using? On what operating system?
We use FB10 Stable with last commits in netmap and netmap-ipfw. Is there a way 
to place many entries into tables by the one command ? (not by telnet as now 
cos it's too slow and unstable )

Here is the output after starting kipfw
root@test:/usr/local/netmap-ipfw # ./kipfw ix0 ix1
[ 678.718785] missing.c:callout_startup [361] start
init_children mod_idx value 9
+++ start module 0 ipfw ipfw at 0x61d3c0 order 0x1
+++ start module 1 sy_ipfw SYSINIT at 0x0 order 0x2
ipfw2 initialized, divert loadable, nat loadable, default to accept, logging 
disabled
+++ start module 2 sy_Vnet_ipfw SYSINIT at 0x0 order 0x3
[ 678.718813] missing.c:callout_init [308] c 0x61d9a0 mpsafe 8
[ 678.718842] missing.c:pfil_head_get [89] called
[ 678.718845] missing.c:pfil_add_hook [96] called
+++ start module 3 dummynet dummynet at 0x61d418 order 0x4
DUMMYNET 0x0 with IPv6 initialized (100409)
[ 678.718853] missing.c:taskqueue_create_fast [427] start dummynet fn 0x414b20 
ctx 0x61da18
[ 678.718855] missing.c:taskqueue_start_threads [435] tqp 0x61da18 count 1 
(dummy)
[ 678.718857] missing.c:callout_init [308] c 0x61d9e0 mpsafe 8
+++ start module 4 dn_fifo dn_fifo at 0x61d448 order 0x5
[ 678.718860] ip_dummynet.c:load_dn_sched [2245] dn_sched FIFO loaded
+++ start module 5 dn_wf2qp dn_wf2qp at 0x61d4f8 order 0x6
[ 678.718863] ip_dummynet.c:load_dn_sched [2245] dn_sched WF2Q+ loaded
+++ start module 6 dn_rr dn_rr at 0x61d5a8 order 0x7
[ 678.718866] ip_dummynet.c:load_dn_sched [2245] dn_sched RR loaded
+++ start module 7 dn_qfq dn_qfq at 0x61d658 order 0x8
[ 678.718869] ip_dummynet.c:load_dn_sched [2245] dn_sched QFQ loaded
+++ start module 8 dn_prio dn_prio at 0x61d708 order 0x9
[ 678.718871] ip_dummynet.c:load_dn_sched [2245] dn_sched PRIO loaded
*** Global Sysctl Table entries = 41, total size = 2144 ***
[ 678.718891] session.c:do_server  [532] +++ listening tcp 127.0.0.1:5555

With regards
Azamat, AkNet ISP

Original issue reported on code.google.com by azamat.u...@gmail.com on 19 Feb 2014 at 8:50

GoogleCodeExporter commented 9 years ago
It is because the stub kern_malloc() does not respect M_ZERO.

Modifying it to use calloc(sz, 1) instead of malloc() fixes the memory 
corruption here.

Original comment by neno...@tortois.es on 27 Aug 2014 at 5:28