Uploaded image for project: 'vpp'
  1. vpp
  2. VPP-1864

VPP crashes from within ip_punt_redirect API

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • 20.01
    • None
    • None
    • None

      When VPP is configured with interfaces that have IPv6 addresses assigned, calling ip_punt_redirect to add redirection causes VPP to crash.
      I have discovered this issue when using relatively new VPP - commit: 86e8bce44f43c1f3c50a3397f9ab850f484f4cad
      Later I was able to narrow down the source of the crash to this commit:

      commit cbe25aab3be72154f2c706c39eeba6a77f34450f
      Author: Neale Ranns <nranns@cisco.com>
      Date:   Mon Sep 30 10:53:31 2019 +0000
      
          ip: Protocol Independent IP Neighbors
      

      If there is a suspicion that this has been fixed in some of the more recent commits, I can upgrade to any VPP version and re-test.

      Here is the stacktrace:

      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #1  0x00007fc9c481a801 in __GI_abort () at abort.c:79
      #2  0x000055dd6029fd8e in os_exit (code=code@entry=1) at vpp/src/vpp/vnet/main.c:379
      #3  0x00007fc9c514151b in unix_signal_handler (signum=11, si=<optimized out>, uc=<optimized out>) at vpp/src/vlib/unix/main.c:187
      #4  <signal handler called>
      #5  ip6_neighbor_probe (dst=0x7fc984e4cc50, src=0x7fc984e43600, adj=0x7fc984e4cc40, vnm=0x7fc9c62cfc40 <vnet_main>, vm=<optimized out>)
          at vpp/src/vnet/ip-neighbor/ip6_neighbor.h:94
      #6  ip6_neighbor_probe_dst (adj=0x7fc984e4cc40, dst=0x7fc984e4cc50) at vpp/src/vnet/ip-neighbor/ip6_neighbor.c:32
      #7  0x00007fc9c5c8861a in ip_neighbor_update (vnm=0x7fc9c62cfc40 <vnet_main>, ai=<optimized out>) at vpp/src/vnet/ip-neighbor/ip_neighbor.c:625
      #8  0x00007fc9c5f2570b in adj_nbr_add_or_lock (nh_proto=nh_proto@entry=FIB_PROTOCOL_IP6, link_type=link_type@entry=VNET_LINK_IP6, nh_addr=nh_addr@entry=0x7fc984e45388, sw_if_index=3)
          at vpp/src/vnet/adj/adj_nbr.c:252
      #9  0x00007fc9c5f1b50c in fib_path_attached_next_hop_get_adj (path=0x7fc984e45370, link=<optimized out>, dpo=0x7fc984e453a8) at vpp/src/vnet/fib/fib_path.c:672
      #10 0x00007fc9c5f1da00 in fib_path_attached_next_hop_set (path=0x7fc984e45370) at vpp/src/vnet/fib/fib_path.c:688
      #11 fib_path_resolve (path_index=27) at vpp/src/vnet/fib/fib_path.c:1931
      #12 0x00007fc9c5f186b0 in fib_path_list_resolve (path_list=path_list@entry=0x7fc984e46590) at vpp/src/vnet/fib/fib_path_list.c:584
      #13 0x00007fc9c5f19080 in fib_path_list_create (flags=<optimized out>, flags@entry=FIB_PATH_LIST_FLAG_NO_URPF, rpaths=rpaths@entry=0x7fc984e4c030)
          at vpp/src/vnet/fib/fib_path_list.c:751
      #14 0x00007fc9c5c6e5bd in ip_punt_redirect_add (fproto=fproto@entry=FIB_PROTOCOL_IP6, rx_sw_if_index=<optimized out>, rx_sw_if_index@entry=1, ct=ct@entry=FIB_FORW_CHAIN_TYPE_UNICAST_IP6, rpaths=rpaths@entry=0x7fc984e4c030)
          at vpp/src/vnet/ip/ip_punt_drop.c:97
      #15 0x00007fc9c5c18648 in ip6_punt_redirect_add_paths (rx_sw_if_index=rx_sw_if_index@entry=1, rpaths=rpaths@entry=0x7fc984e4c030) at vpp/src/vnet/ip/ip6_punt_drop.c:307
      #16 0x00007fc9c5c18721 in ip6_punt_redirect_add (rx_sw_if_index=1, tx_sw_if_index=3, nh=nh@entry=0x7fc9841e8e30) at vpp/src/vnet/ip/ip6_punt_drop.c:299
      #17 0x00007fc9c5c5dbc2 in vl_api_ip_punt_redirect_t_handler (mp=0x7fc984e4ae50, vm=<optimized out>) at vpp/src/vnet/ip/ip_api.c:430
      #18 0x00007fc9c631bf48 in msg_handler_internal (free_it=0, do_it=1, trace_it=<optimized out>, the_msg=0x7fc984e4ae50, am=0x7fc9c652eea0 <api_global_main>)
          at vpp/src/vlibapi/api_shared.c:488
      #19 vl_msg_api_handler_no_free (the_msg=0x7fc984e4ae50) at vpp/src/vlibapi/api_shared.c:669
      #20 0x00007fc9c6304535 in vl_socket_process_api_msg (rp=<optimized out>, input_v=<optimized out>) at vpp/src/vlibmemory/socket_api.c:199
      #21 0x00007fc9c630d1a2 in vl_api_clnt_process (vm=<optimized out>, node=0x7fc9841a8000, f=<optimized out>) at vpp/src/vlibmemory/vlib_api.c:394
      #22 0x00007fc9c50f68c6 in vlib_process_bootstrap (_a=<optimized out>) at vpp/src/vlib/main.c:1475
      #23 0x00007fc9c4bf5cf4 in clib_calljmp () from /usr/lib/x86_64-linux-gnu/libvppinfra.so.20.05
      #24 0x00007fc98415ddc0 in ?? ()
      #25 0x00007fc9c50fbce1 in vlib_process_startup (f=0x0, p=0x7fc9841a8000, vm=0x7fc9c535b380 <vlib_global_main>) at vpp/src/vlib/main.c:1497
      #26 dispatch_process (vm=0x7fc9c535b380 <vlib_global_main>, p=0x7fc9841a8000, last_time_stamp=1780447104162, f=0x0) at vpp/src/vlib/main.c:1542}}
      

      Here is the binary API trace (up until vl_api_ip_punt_redirect_t that causes the crash):

      SCRIPT: sockclnt_create name govppsock 
      SCRIPT: want_interface_events pid 21 enable 1 
      SCRIPT: nat64_add_del_pool_addr_range 80.80.80.2 - 80.80.80.2 vrf_id 0 
      SCRIPT: nat64_add_del_prefix 64:ff9b::/96 vrf_id 0 
      SCRIPT: nat64_add_del_static_bib protocol 6 i_addr 1000::10 o_addr 80.80.80.1 vrf 0
      SCRIPT: af_packet_create host_if_name net2 hw_addr random 
      SCRIPT: sw_interface_tag_add_del sw_if_index 1 tag b4net 
      SCRIPT: sw_interface_set_flags sw_if_index 1 admin-up 
      SCRIPT: nat64_add_del_interface sw_if_index 1 out 
      SCRIPT: sw_interface_set_table sw_if_index 1 
      SCRIPT: sw_interface_add_del_address sw_if_index 1 100.100.21.2/24 
      SCRIPT: af_packet_create host_if_name net4 hw_addr random 
      SCRIPT: sw_interface_tag_add_del sw_if_index 2 tag b6net 
      SCRIPT: sw_interface_set_flags sw_if_index 2 admin-up 
      SCRIPT: nat64_add_del_interface sw_if_index 2 in 
      SCRIPT: sw_interface_set_table sw_if_index 2 ipv6 
      SCRIPT: sw_interface_add_del_address sw_if_index 2 1000:21::2/96 
      SCRIPT: af_packet_create host_if_name net1 hw_addr random 
      SCRIPT: sw_interface_tag_add_del sw_if_index 3 tag p4net 
      SCRIPT: sw_interface_set_flags sw_if_index 3 admin-up 
      SCRIPT: nat64_add_del_interface sw_if_index 3 out 
      SCRIPT: sw_interface_set_table sw_if_index 3 
      SCRIPT: sw_interface_add_del_address sw_if_index 3 100.100.11.2/24 
      SCRIPT: af_packet_create host_if_name net3 hw_addr random 
      SCRIPT: sw_interface_tag_add_del sw_if_index 4 tag p6net 
      SCRIPT: sw_interface_set_flags sw_if_index 4 admin-up 
      SCRIPT: nat64_add_del_interface sw_if_index 4 in 
      SCRIPT: sw_interface_set_table sw_if_index 4 ipv6 
      SCRIPT: sw_interface_add_del_address sw_if_index 4 1000:11::2/96 
      SCRIPT: tap_create_v2 id 4294967295 host-if-name tap-b4net 
      SCRIPT: sw_interface_tag_add_del sw_if_index 5 tag tap-b4net 
      vl_api_sw_interface_set_mac_address_t:
      _vl_msg_id: 100
      client_index: 16777344
      context: 771753984
      sw_if_index: 83886080
      SCRIPT: sw_interface_set_flags sw_if_index 5 admin-up 
      SCRIPT: sw_interface_set_unnumbered sw_if_index 1 unnum_if_index 5 
      vl_api_ip_punt_redirect_t:
      _vl_msg_id: 235
      client_index: 16777344
      context: 100671488
      is_add: 1
      

      There is some NAT64 config but it does not seem to be relevant.

            Unassigned Unassigned
            milanlenco Milan Lenco
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: