Hi Neale,
Thanks, that’s very helpful. ip6_sw_interface_add_del() is never called on my system. I’m looking at the vnet/interface.h macros to figure out why. I’m cross compiling but I see __vnet_interface_function_init_##tag##_##f is being called on my system (looking at vnet/interface.h). I haven’t quite figure out how ip6_sw_interface_add_del() gets called out of all that yet. Jon *From:* Neale Ranns (nranns) [mailto:[email protected]] *Sent:* Sunday, March 24, 2019 10:27 AM *To:* [email protected]; [email protected] *Subject:* Re: [vpp-dev] tap interface up crashes Hi Jonathan, Everytime an interface is added, ip6_main.mfib_index_by_sw_if_index is extened, see ip6_sw_interface_add_del(), so it should not be possible for it to be NULL. Here’s what I get after having added a tap interface: (gdb) p ip6_main.mfib_index_by_sw_if_index $2 = (u32 *) 0x7fd115c4af4c (gdb) p *(((vec_header_t*)ip6_main.mfib_index_by_sw_if_index)-1) $3 = {len = 2, dlmalloc_header_offset = 0, vector_data = 0x7fd115c4af4c ""} Note the vector length of 2, one for the Tap one for local0. I suggest, before adding the tap, we check the pointer value, then set a breakpoint in ip6_sw_interface_add_del and a watchpoint on ip6_main.mfib_index_by_sw_if_index and let’s see if we can see what goes awry on your system. /neale *De : *<[email protected]> au nom de "jonathan.richardson via Lists.Fd.Io" <[email protected]> *Répondre à : *"[email protected]" < [email protected]> *Date : *samedi 23 mars 2019 à 01:53 *À : *"[email protected]" <[email protected]> *Cc : *"[email protected]" <[email protected]> *Objet : *[vpp-dev] tap interface up crashes Hi, I'm trying vpp v19.01.1 on aarch64, kernel 4.14.95. After 'vppctl tap connect tap0' to create a tap interface I bring it up by doing 'set interface state tapcli-0 up'. On 18.10 this worked fine and I could bring up both ends of the tap interface. A couple seconds later vpp gets a segfault. This seems pretty basic. Can anyone let me know why the ip6 mfib seems uninitialized and what it's trying to do with ipv6? Even if I assign an ipv4 ip address first before bringing it up it still does the same. Here is a crash dump log. #0 0x0000ffffbd0b37cc in mfib_forward_lookup (vm=0x1, node=0x13, frame=0x1, is_v4=is_v4@entry=0) at /usr/src/debug/vpp/18.10-r0/src/vnet/mfib/mfib_forward.c:165 165 fib_index0 = vec_elt (ip6_main.mfib_index_by_sw_if_index, (gdb) frame 0 #0 0x0000ffffbd0b37cc in mfib_forward_lookup (vm=0x1, node=0x13, frame=0x1, is_v4=is_v4@entry=0) at /usr/src/debug/vpp/18.10-r0/src/vnet/mfib/mfib_forward.c:165 165 fib_index0 = vec_elt (ip6_main.mfib_index_by_sw_if_index, (gdb) list 160 } 161 else 162 { 163 ip6_header_t * ip0; 164 165 fib_index0 = vec_elt (ip6_main.mfib_index_by_sw_if_index, 166 vnet_buffer(p0)->sw_if_index[VLIB_RX]); 167 ip0 = vlib_buffer_get_current (p0); 168 printf("fib_index0: %d\n", fib_index0); 169 mfei0 = ip6_mfib_table_fwd_lookup(ip6_mfib_get(fib_index0), (gdb) print ip6_main.mfib_index_by_sw_if_index $1 = (u32 *) 0x0 (gdb) print ip6_main $2 = {ip6_table = {{ip6_hash = {buckets = 0x0, alloc_lock = 0x0, working_copies = 0x0, working_copy_lengths = 0x0, saved_bucket = {{{offset = 0, lock = 0, linear_search = 0, log2_pages = 0, refcnt = 0}, as_u64 = 0}}, nbuckets = 0, log2_nbuckets = 0, name = 0x0, freelists = 0x0, sh = {alloc_arena_next = 0, alloc_arena_size = 0, alloc_lock_as_u64 = 0, buckets_as_u64 = 0, freelists_as_u64 = 0, nbuckets = 0, ready = 0, pad = {0, 0}}, alloc_arena = 0, fmt_fn = 0x0}, non_empty_dst_address_length_bitmap = 0x0, prefix_lengths_in_search_order = 0x0, dst_address_length_refcounts = {0 <repeats 129 times>}}, {ip6_hash = {buckets = 0x0, alloc_lock = 0x0, working_copies = 0x0, working_copy_lengths = 0x0, saved_bucket = {{{offset = 0, lock = 0, linear_search = 0, log2_pages = 0, refcnt = 0}, as_u64 = 0}}, nbuckets = 0, log2_nbuckets = 0, name = 0x0, freelists = 0x0, sh = { alloc_arena_next = 0, alloc_arena_size = 0, alloc_lock_as_u64 = 0, buckets_as_u64 = 0, freelists_as_u64 = 0, nbuckets = 0, ready = 0, pad = {0, 0}}, alloc_arena = 0, fmt_fn = 0x0}, non_empty_dst_address_length_bitmap = 0x0, prefix_lengths_in_search_order = 0x0, dst_address_length_refcounts = {0 <repeats 129 times>}}}, ip6_mtable = {ip6_mhash = {buckets = 0x0, alloc_lock = 0x0, working_copies = 0x0, working_copy_lengths = 0x0, saved_bucket = {{{offset = 0, lock = 0, linear_search = 0, log2_pages = 0, refcnt = 0}, as_u64 = 0}}, nbuckets = 0, log2_nbuckets = 0, name = 0x0, freelists = 0x0, sh = {alloc_arena_next = 0, alloc_arena_size = 0, alloc_lock_as_u64 = 0, buckets_as_u64 = 0, freelists_as_u64 = 0, nbuckets = 0, ready = 0, pad = {0, 0}}, alloc_arena = 0, fmt_fn = 0x0}, non_empty_dst_address_length_bitmap = 0x0, prefix_lengths_in_search_order = 0x0, dst_address_length_refcounts = {0 <repeats 257 times>}}, lookup_main = {if_address_pool = 0x0, address_to_if_address_index = {key_vector_or_heap = 0x0, key_vector_free_indices = 0x0, key_tmps = 0x0, n_key_bytes = 0, hash_seed = 0, hash = 0x0, format_key = 0x0}, if_address_pool_index_by_sw_if_index = 0x0, classify_table_index_by_sw_if_index = 0x0, mcast_feature_arc_index = 0 '\000', ucast_feature_arc_index = 0 '\000', output_feature_arc_index = 0 '\000', fib_result_n_bytes = 0, fib_result_n_words = 0, is_ip6 = 0, format_address_and_length = 0x0, local_next_by_ip_protocol = '\000' <repeats 255 times>, builtin_protocol_by_ip_protocol = '\000' <repeats 255 times>}, fibs = 0x0, v6_fibs = 0x0, mfibs = 0x0, fib_masks = {{as_u8 = '\000' <repeats 15 times>, as_u16 = {0, 0, 0, 0, 0, 0, 0, 0}, as_u32 = {0, 0, 0, 0}, as_u64 = {0, 0}, as_uword = {0, 0}} <repeats 129 times>}, fib_index_by_sw_if_index = 0x0, mfib_index_by_sw_if_index = 0x0, ip_enabled_by_sw_if_index = 0x0, fib_index_by_table_id = 0x0, mfib_index_by_table_id = 0x0, interface_route_adj_index_by_sw_if_index = 0x0, add_del_interface_address_callbacks = 0x0, table_bind_callbacks = 0x0, discover_neighbor_packet_template = {packet_data = 0x0, min_n_buffers_each_alloc = 0, free_list_index = 0 '\000', free_buffers = 0x0, name = 0x0}, lookup_table_nbuckets = 0, lookup_table_size = 0, flow_hash_seed = 0, host_config = {ttl = 0 '\000', pad = "\000\000"}, hbh_enabled = 0 '\000', nd_throttle = {time = 0, bitmaps = 0x0, seeds = 0x0, last_seed_change_time = 0x0}} My config is: unix { nodaemon log /var/log/vpp.log full-coredump cli-listen /run/vpp/cli.sock } api-trace { on } Thanks.
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#12634): https://lists.fd.io/g/vpp-dev/message/12634 Mute This Topic: https://lists.fd.io/mt/30722622/21656 Group Owner: [email protected] Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
