Re: [vpp-dev] the problem of deleting the static arp

2018-04-08 Thread xyxue
Hi Neale,

The problem has been solved . Thank you very much for your help.

Thanks,
Xyxue
 
From: Neale Ranns (nranns)
Date: 2018-04-04 22:33
To: 薛欣颖; vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] the problem of deleting the static arp
 
I suspect a lock count overrun in the fib_table_t. it’s a u16.
 
/neale
 
From:  on behalf of xyxue 
Date: Wednesday, 4 April 2018 at 08:39
To: "vpp-dev@lists.fd.io" 
Subject: [vpp-dev] the problem of deleting the static arp
 
 
Hi guys,

I’m testing the static arp. 
When I configured one hundred thousand static arp ,and delete to 34467th, there 
is a SIGABRT. More info is shown below:

VPP# set ip arp host-eth1 1.1.69.234 00:01:00:00:45:ea del
/home/vpp/build-data/../src/vnet/fib/ip4_fib.c:230 (ip4_fib_table_destroy) 
assertion `0 == fib_table->ft_total_route_counts' fails

Program received signal SIGABRT, Aborted.
0x76168c37 in __GI_raise (sig=sig@entry=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:56
56  ../nptl/sysdeps/unix/sysv/linux/raise.c: 
(gdb) bt
#0  0x76168c37 in __GI_raise (sig=sig@entry=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x7616c028 in __GI_abort () at abort.c:89
#2  0x004061ef in os_panic () at 
/home/vpp/build-data/../src/vpp/vnet/main.c:302
#3  0x7693eb88 in debugger () at 
/home/vpp/build-data/../src/vppinfra/error.c:84
#4  0x7693ef8f in _clib_error (how_to_die=2, function_name=0x0, 
line_number=0, fmt=0x772f4758 "%s:%d (%s) assertion `%s' fails")
at /home/vpp/build-data/../src/vppinfra/error.c:143
#5  0x77176289 in ip4_fib_table_destroy (fib_index=0) at 
/home/vpp/build-data/../src/vnet/fib/ip4_fib.c:230
#6  0x7718346d in fib_table_destroy (fib_table=0x7fffb5a9cf00) at 
/home/vpp/build-data/../src/vnet/fib/fib_table.c:1209
#7  0x771835f2 in fib_table_unlock (fib_index=0, 
proto=FIB_PROTOCOL_IP4, source=FIB_SOURCE_ADJ) at 
/home/vpp/build-data/../src/vnet/fib/fib_table.c:1265
#8  0x76cc64a9 in arp_adj_fib_remove (e=0x7fffb77cb170, fib_index=0) at 
/home/vpp/build-data/../src/vnet/ethernet/arp.c:1777
#9  0x76cc75df in arp_entry_free (eai=0x7fffb5d268f4, e=0x7fffb77cb170) 
at /home/vpp/build-data/../src/vnet/ethernet/arp.c:1877
#10 0x76cc797f in vnet_arp_unset_ip4_over_ethernet_internal 
(vnm=0x77647dc0 , args=0x7fffb5d209d0) at 
/home/vpp/build-data/../src/vnet/ethernet/arp.c:1902
#11 0x76cc7d20 in set_ip4_over_ethernet_rpc_callback (a=0x7fffb5d209d0) 
at /home/vpp/build-data/../src/vnet/ethernet/arp.c:1981
#12 0x7794b297 in vl_api_rpc_call_main_thread_inline (fp=0x76cc7c8d 
, data=0x7fffb5d209d0 "\001", 
data_length=28, force_rpc=0 '\000')
at /home/vpp/build-data/../src/vlibmemory/memory_vlib.c:2061
#13 0x7794b3ea in vl_api_rpc_call_main_thread (fp=0x76cc7c8d 
, data=0x7fffb5d209d0 "\001", 
data_length=28)
at /home/vpp/build-data/../src/vlibmemory/memory_vlib.c:2107
#14 0x76cc5aaf in vnet_arp_unset_ip4_over_ethernet (vnm=0x77647dc0 
, sw_if_index=1, a_arg=0x7fffb5d20ac0)
at /home/vpp/build-data/../src/vnet/ethernet/arp.c:1594
#15 0x76cc8f48 in ip_arp_add_del_command_fn (vm=0x7792abe0 
, is_del=1, input=0x7fffb5d20ec0, cmd=0x7fffb5c9295c)
at /home/vpp/build-data/../src/vnet/ethernet/arp.c:2254
#16 0x7767d217 in cli_no_one_cmd (vm=0x7792abe0 , 
is_del=0, in=0x7fffb5d20ec0, no=0x7fffb5c96b5c) at 
/home/vpp/build-data/../src/vlib/cli/cli_help.c:494
#17 0x776746fe in vlib_cli_dispatch_sub_commands (vm=0x7792abe0 
, cm=0x64f098, input=0x7fffb5d20ec0, parent_command_index=0, 
poss_cmds=0x7fffb5d20da8, 
poss_helps=0x7fffb5d20db0) at /home/vpp/build-data/../src/vlib/cli.c:878
#18 0x77674be3 in vlib_cli_input (vm=0x7792abe0 , 
input=0x7fffb5d20ec0, function=0x776e164d , 
function_arg=0)
at /home/vpp/build-data/../src/vlib/cli.c:970
#19 0x776e77ee in unix_cli_process_input (cm=0x7792a920 
, cli_file_index=0) at 
/home/vpp/build-data/../src/vlib/unix/cli.c:2511
#20 0x776e8358 in unix_cli_process (vm=0x7792abe0 
, rt=0x7fffb5d1, f=0x0) at 
/home/vpp/build-data/../src/vlib/unix/cli.c:2623
#21 0x776aba61 in vlib_process_bootstrap (_a=140736237603344) at 
/home/vpp/build-data/../src/vlib/main.c:1253
#22 0x76953560 in clib_calljmp () at 
/home/vpp/build-data/../src/vppinfra/longjmp.S:128
#23 0x7fffb57309e0 in ?? ()
#24 0x776abb96 in vlib_process_startup (vm=0x2c, p=0x8, 
f=0x7fffb8e179c4) at /home/vpp/build-data/../src/vlib/main.c:1278
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) f 5
#5  0x77176289 in ip4_fib_table_destroy (fib_index=0) at 
/home/vpp/build-data/../src/vnet/fib/ip4_fib.c:230
230 ASSERT(0 == fib_table->ft_total_route_counts);
(gdb) p  fib_table->ft_total_route_counts
$1 = 9
(gdb) 

I doubt whether there is something remains in fib_table_entr

Re: [vpp-dev] the problem of deleting the static arp

2018-04-04 Thread Neale Ranns

I suspect a lock count overrun in the fib_table_t. it’s a u16.

/neale

From:  on behalf of xyxue 
Date: Wednesday, 4 April 2018 at 08:39
To: "vpp-dev@lists.fd.io" 
Subject: [vpp-dev] the problem of deleting the static arp


Hi guys,

I’m testing the static arp.
When I configured one hundred thousand static arp ,and delete to 34467th, there 
is a SIGABRT. More info is shown below:

VPP# set ip arp host-eth1 1.1.69.234 00:01:00:00:45:ea del
/home/vpp/build-data/../src/vnet/fib/ip4_fib.c:230 (ip4_fib_table_destroy) 
assertion `0 == fib_table->ft_total_route_counts' fails

Program received signal SIGABRT, Aborted.
0x76168c37 in __GI_raise (sig=sig@entry=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:56
56  ../nptl/sysdeps/unix/sysv/linux/raise.c:
(gdb) bt
#0  0x76168c37 in __GI_raise (sig=sig@entry=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x7616c028 in __GI_abort () at abort.c:89
#2  0x004061ef in os_panic () at 
/home/vpp/build-data/../src/vpp/vnet/main.c:302
#3  0x7693eb88 in debugger () at 
/home/vpp/build-data/../src/vppinfra/error.c:84
#4  0x7693ef8f in _clib_error (how_to_die=2, function_name=0x0, 
line_number=0, fmt=0x772f4758 "%s:%d (%s) assertion `%s' fails")
at /home/vpp/build-data/../src/vppinfra/error.c:143
#5  0x77176289 in ip4_fib_table_destroy (fib_index=0) at 
/home/vpp/build-data/../src/vnet/fib/ip4_fib.c:230
#6  0x7718346d in fib_table_destroy (fib_table=0x7fffb5a9cf00) at 
/home/vpp/build-data/../src/vnet/fib/fib_table.c:1209
#7  0x771835f2 in fib_table_unlock (fib_index=0, 
proto=FIB_PROTOCOL_IP4, source=FIB_SOURCE_ADJ) at 
/home/vpp/build-data/../src/vnet/fib/fib_table.c:1265
#8  0x76cc64a9 in arp_adj_fib_remove (e=0x7fffb77cb170, fib_index=0) at 
/home/vpp/build-data/../src/vnet/ethernet/arp.c:1777
#9  0x76cc75df in arp_entry_free (eai=0x7fffb5d268f4, e=0x7fffb77cb170) 
at /home/vpp/build-data/../src/vnet/ethernet/arp.c:1877
#10 0x76cc797f in vnet_arp_unset_ip4_over_ethernet_internal 
(vnm=0x77647dc0 , args=0x7fffb5d209d0) at 
/home/vpp/build-data/../src/vnet/ethernet/arp.c:1902
#11 0x76cc7d20 in set_ip4_over_ethernet_rpc_callback (a=0x7fffb5d209d0) 
at /home/vpp/build-data/../src/vnet/ethernet/arp.c:1981
#12 0x7794b297 in vl_api_rpc_call_main_thread_inline (fp=0x76cc7c8d 
, data=0x7fffb5d209d0 "\001", 
data_length=28, force_rpc=0 '\000')
at /home/vpp/build-data/../src/vlibmemory/memory_vlib.c:2061
#13 0x7794b3ea in vl_api_rpc_call_main_thread (fp=0x76cc7c8d 
, data=0x7fffb5d209d0 "\001", 
data_length=28)
at /home/vpp/build-data/../src/vlibmemory/memory_vlib.c:2107
#14 0x76cc5aaf in vnet_arp_unset_ip4_over_ethernet (vnm=0x77647dc0 
, sw_if_index=1, a_arg=0x7fffb5d20ac0)
at /home/vpp/build-data/../src/vnet/ethernet/arp.c:1594
#15 0x76cc8f48 in ip_arp_add_del_command_fn (vm=0x7792abe0 
, is_del=1, input=0x7fffb5d20ec0, cmd=0x7fffb5c9295c)
at /home/vpp/build-data/../src/vnet/ethernet/arp.c:2254
#16 0x7767d217 in cli_no_one_cmd (vm=0x7792abe0 , 
is_del=0, in=0x7fffb5d20ec0, no=0x7fffb5c96b5c) at 
/home/vpp/build-data/../src/vlib/cli/cli_help.c:494
#17 0x776746fe in vlib_cli_dispatch_sub_commands (vm=0x7792abe0 
, cm=0x64f098, input=0x7fffb5d20ec0, parent_command_index=0, 
poss_cmds=0x7fffb5d20da8,
poss_helps=0x7fffb5d20db0) at /home/vpp/build-data/../src/vlib/cli.c:878
#18 0x77674be3 in vlib_cli_input (vm=0x7792abe0 , 
input=0x7fffb5d20ec0, function=0x776e164d , 
function_arg=0)
at /home/vpp/build-data/../src/vlib/cli.c:970
#19 0x776e77ee in unix_cli_process_input (cm=0x7792a920 
, cli_file_index=0) at 
/home/vpp/build-data/../src/vlib/unix/cli.c:2511
#20 0x776e8358 in unix_cli_process (vm=0x7792abe0 
, rt=0x7fffb5d1, f=0x0) at 
/home/vpp/build-data/../src/vlib/unix/cli.c:2623
#21 0x776aba61 in vlib_process_bootstrap (_a=140736237603344) at 
/home/vpp/build-data/../src/vlib/main.c:1253
#22 0x76953560 in clib_calljmp () at 
/home/vpp/build-data/../src/vppinfra/longjmp.S:128
#23 0x7fffb57309e0 in ?? ()
#24 0x776abb96 in vlib_process_startup (vm=0x2c, p=0x8, 
f=0x7fffb8e179c4) at /home/vpp/build-data/../src/vlib/main.c:1278
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) f 5
#5  0x77176289 in ip4_fib_table_destroy (fib_index=0) at 
/home/vpp/build-data/../src/vnet/fib/ip4_fib.c:230
230 ASSERT(0 == fib_table->ft_total_route_counts);
(gdb) p  fib_table->ft_total_route_counts
$1 = 9
(gdb)

I doubt whether there is something remains in fib_table_entry, when we delete 
the static arp.

for (ii = ARRAY_LEN(ip4_specials) - 1; ii >= 0; ii--)
{
fib_prefix_t prefix = ip4_specials[ii].ift_prefix;

prefix.fp_addr.ip4.data_u32 =
clib_host_to_net_u32(prefix.fp_addr.ip4.data_u32);

fib_table_entry_special_remove(fib_table->ft_index,
&prefix,
ip4_specials[ii].ift_source