Re: [vpp-dev] Segmentation fault in ikev2 test

2017-10-31 Thread Neale Ranns (nranns)
Hi Xyxue,

If you don’t have at a FIB with index 2 (i.e. you haven’t created to additional 
IP tables/VRFs) then:
  The '(vnet_buffer (p0)->sw_if_index[VLIB_TX] ' is 2 when 'del-sa' execute 
fail.

is certainly the cause of your crash. I would attempt to determine when and 
where this value was set in IPSEC path.
If it doesn’t happen all the time, then that’s often indicative of a single 
versus dual loop code path.

regards
neale


From: <vpp-dev-boun...@lists.fd.io> on behalf of 薛欣颖 <xy...@fiberhome.com>
Date: Tuesday, 31 October 2017 at 09:43
To: "vpp-dev@lists.fd.io" <vpp-dev@lists.fd.io>
Subject: [vpp-dev] Segmentation fault in ikev2 test


Hi,


I'm testing ikev2 and there is something error in my test:

 VPP# ikev2 initiate del-sa ee25d9aa4e7a0f1a
0: ikev2_generate_message:1774: sa state changed to 
IKEV2_STATE_NOTIFY_AND_DELETE

 Program received signal SIGSEGV, Segmentation fault.
0x2b293d767f4b in ip4_fib_mtrie_lookup_step_one (m=0x0, 
dst_address=0x2b2991d243f4) at 
/root/tmp64/build-data/../src/vnet/ip/ip4_mtrie.h:225
225   next_leaf = m->root_ply.leaves[dst_address->as_u16[0]];
(gdb) bt
#0  0x2b293d767f4b in ip4_fib_mtrie_lookup_step_one (m=0x0, 
dst_address=0x2b2991d243f4) at 
/root/tmp64/build-data/../src/vnet/ip/ip4_mtrie.h:225
#1  0x2b293d769bb3 in ip4_lookup_inline (vm=0x2b293d59c120 
, node=0x2b293f843080, frame=0x2b293fbfe800,
lookup_for_responses_to_locally_received_packets=0) at 
/root/tmp64/build-data/../src/vnet/ip/ip4_forward.c:362
#2  0x2b293d76a02f in ip4_lookup (vm=0x2b293d59c120 , 
node=0x2b293f843080, frame=0x2b293fbfe800)
at /root/tmp64/build-data/../src/vnet/ip/ip4_forward.c:472
#3  0x2b293d31b910 in dispatch_node (vm=0x2b293d59c120 , 
node=0x2b293f843080, type=VLIB_NODE_TYPE_INTERNAL,
dispatch_state=VLIB_NODE_STATE_POLLING, frame=0x2b293fbfe800, 
last_time_stamp=375367370313442) at 
/root/tmp64/build-data/../src/vlib/main.c:1032
#4  0x2b293d31bef3 in dispatch_pending_node (vm=0x2b293d59c120 
, pending_frame_index=0, last_time_stamp=375367370313442)
at /root/tmp64/build-data/../src/vlib/main.c:1182
#5  0x2b293d31e009 in vlib_main_or_worker_loop (vm=0x2b293d59c120 
, is_main=1) at /root/tmp64/build-data/../src/vlib/main.c:1649
#6  0x2b293d31e0bb in vlib_main_loop (vm=0x2b293d59c120 ) 
at /root/tmp64/build-data/../src/vlib/main.c:1668
#7  0x2b293d31e76f in vlib_main (vm=0x2b293d59c120 , 
input=0x2b293f728fb0) at /root/tmp64/build-data/../src/vlib/main.c:1804
#8  0x2b293d361d48 in thread0 (arg=47456122945824) at 
/root/tmp64/build-data/../src/vlib/unix/main.c:515
#9  0x2b293e2e8dcc in clib_calljmp () at 
/root/tmp64/build-data/../src/vppinfra/longjmp.S:128
#10 0x7ffcf2dbf510 in ?? ()
#11 0x2b293d3621e1 in vlib_unix_main (argc=4, argv=0x7ffcf2dc0798) at 
/root/tmp64/build-data/../src/vlib/unix/main.c:578
#12 0x00407ff1 in main (argc=4, argv=0x7ffcf2dc0798) at 
/root/tmp64/build-data/../src/vpp/vnet/main.c:206
(gdb)

in ip4_lookup_inline
'
fib_index0 =
vec_elt (im->fib_index_by_sw_if_index,
 vnet_buffer (p0)->sw_if_index[VLIB_RX]);
fib_index0 =
(vnet_buffer (p0)->sw_if_index[VLIB_TX] ==
 (u32) ~ 0) ? fib_index0 : vnet_buffer (p0)->sw_if_index[VLIB_TX];
'

The '(vnet_buffer (p0)->sw_if_index[VLIB_TX] ' is (u32) ~ 0 when 'del-sa' 
execute success.
The '(vnet_buffer (p0)->sw_if_index[VLIB_TX] ' is 2 when 'del-sa' execute fail.

By the way, the fault doesn't happen every time.

What should I do to solve the problem?

Thanks,
xyxue

___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] Segmentation fault in ikev2 test

2017-10-31 Thread 薛欣颖

Hi,

I'm testing ikev2 and there is something error in my test:
 
 VPP# ikev2 initiate del-sa ee25d9aa4e7a0f1a
0: ikev2_generate_message:1774: sa state changed to 
IKEV2_STATE_NOTIFY_AND_DELETE

 Program received signal SIGSEGV, Segmentation fault.
0x2b293d767f4b in ip4_fib_mtrie_lookup_step_one (m=0x0, 
dst_address=0x2b2991d243f4) at 
/root/tmp64/build-data/../src/vnet/ip/ip4_mtrie.h:225
225   next_leaf = m->root_ply.leaves[dst_address->as_u16[0]];
(gdb) bt
#0  0x2b293d767f4b in ip4_fib_mtrie_lookup_step_one (m=0x0, 
dst_address=0x2b2991d243f4) at 
/root/tmp64/build-data/../src/vnet/ip/ip4_mtrie.h:225
#1  0x2b293d769bb3 in ip4_lookup_inline (vm=0x2b293d59c120 
, node=0x2b293f843080, frame=0x2b293fbfe800, 
lookup_for_responses_to_locally_received_packets=0) at 
/root/tmp64/build-data/../src/vnet/ip/ip4_forward.c:362
#2  0x2b293d76a02f in ip4_lookup (vm=0x2b293d59c120 , 
node=0x2b293f843080, frame=0x2b293fbfe800)
at /root/tmp64/build-data/../src/vnet/ip/ip4_forward.c:472
#3  0x2b293d31b910 in dispatch_node (vm=0x2b293d59c120 , 
node=0x2b293f843080, type=VLIB_NODE_TYPE_INTERNAL, 
dispatch_state=VLIB_NODE_STATE_POLLING, frame=0x2b293fbfe800, 
last_time_stamp=375367370313442) at 
/root/tmp64/build-data/../src/vlib/main.c:1032
#4  0x2b293d31bef3 in dispatch_pending_node (vm=0x2b293d59c120 
, pending_frame_index=0, last_time_stamp=375367370313442)
at /root/tmp64/build-data/../src/vlib/main.c:1182
#5  0x2b293d31e009 in vlib_main_or_worker_loop (vm=0x2b293d59c120 
, is_main=1) at /root/tmp64/build-data/../src/vlib/main.c:1649
#6  0x2b293d31e0bb in vlib_main_loop (vm=0x2b293d59c120 ) 
at /root/tmp64/build-data/../src/vlib/main.c:1668
#7  0x2b293d31e76f in vlib_main (vm=0x2b293d59c120 , 
input=0x2b293f728fb0) at /root/tmp64/build-data/../src/vlib/main.c:1804
#8  0x2b293d361d48 in thread0 (arg=47456122945824) at 
/root/tmp64/build-data/../src/vlib/unix/main.c:515
#9  0x2b293e2e8dcc in clib_calljmp () at 
/root/tmp64/build-data/../src/vppinfra/longjmp.S:128
#10 0x7ffcf2dbf510 in ?? ()
#11 0x2b293d3621e1 in vlib_unix_main (argc=4, argv=0x7ffcf2dc0798) at 
/root/tmp64/build-data/../src/vlib/unix/main.c:578
#12 0x00407ff1 in main (argc=4, argv=0x7ffcf2dc0798) at 
/root/tmp64/build-data/../src/vpp/vnet/main.c:206
(gdb) 

in ip4_lookup_inline 
'
fib_index0 =
vec_elt (im->fib_index_by_sw_if_index,
 vnet_buffer (p0)->sw_if_index[VLIB_RX]);
fib_index0 =
(vnet_buffer (p0)->sw_if_index[VLIB_TX] ==
 (u32) ~ 0) ? fib_index0 : vnet_buffer (p0)->sw_if_index[VLIB_TX];
'
 
The '(vnet_buffer (p0)->sw_if_index[VLIB_TX] ' is (u32) ~ 0 when 'del-sa' 
execute success.
The '(vnet_buffer (p0)->sw_if_index[VLIB_TX] ' is 2 when 'del-sa' execute fail.

By the way, the fault doesn't happen every time.

What should I do to solve the problem?

Thanks,
xyxue


___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev