Agent assert in UpdateComponentNHKey

Bug #1606120 reported by Hari Prasad Killi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.1
Fix Committed
High
Ashok Singh
Trunk
Fix Committed
High
Ashok Singh

Bug Description

#0 0x00007f6d726cfcc9 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f6d726d30d8 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007f6d726c8b86 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3 0x00007f6d726c8c32 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#4 0x0000000000acf7ad in boost::shared_ptr<ComponentNHKey const>::operator-> (this=<optimized out>) at /usr/include/boost/smart_ptr/shared_ptr.hpp:653
#5 0x0000000000ad5db9 in operator-> (this=<optimized out>) at controller/src/vnsw/agent/oper/nexthop.cc:1848
#6 CompositeNH::UpdateComponentNHKey (this=0x7f6d443fb100, label=26, nh_key=nh_key@entry=0x7f6d282d70e0, component_nh_key_list=std::vector of length 1, capacity 1 = {...})
    at controller/src/vnsw/agent/oper/nexthop.cc:1836
#7 0x0000000000a94268 in InetUnicastRouteEntry::UpdateComponentNH (this=this@entry=0x7f6d48050c70, agent=agent@entry=0x23e6750, ecmp_path=ecmp_path@entry=0x7f6d48059040,
    path=path@entry=0x7f6d48050e70) at controller/src/vnsw/agent/oper/inet_unicast_route.cc:838
#8 0x0000000000a994a6 in InetUnicastRouteEntry::EcmpAddPath (this=0x7f6d48050c70, path=0x7f6d48050e70) at controller/src/vnsw/agent/oper/inet_unicast_route.cc:764
#9 0x0000000000a4f0b9 in AgentRouteTable::Input (this=0x7f6d48036a80, part=0x7f6d48036ce0, client=<optimized out>, req=0x7f6d68d37480)
    at controller/src/vnsw/agent/oper/agent_route.cc:368
#10 0x0000000000a96662 in InetUnicastAgentRouteTable::AddLocalVmRoute (peer=<optimized out>,
    vm_vrf="default-domain:ctest-TestECMPwithSVMChangeIPv6-35002451:ctest-in_network_vn2-29725227:ctest-in_network_vn2-29725227", addr=..., plen=plen@entry=128 '\200',
Python Exception <class 'IndexError'> list index out of range:
    intf_uuid=..., vn_list=std::set with 1 elements, label=label@entry=26, sg_list=std::vector of length 1, capacity 1 = {...}, communities=std::vector of length 0, capacity 0,
    force_policy=force_policy@entry=false, path_preference=..., subnet_service_ip=..., ecmp_load_balance=..., is_local=is_local@entry=false)
    at controller/src/vnsw/agent/oper/inet_unicast_route.cc:1462
#11 0x0000000000b19fa3 in VmInterface::AddRoute (this=this@entry=0x7f6d44006eb0,
    vrf_name="default-domain:ctest-TestECMPwithSVMChangeIPv6-35002451:ctest-in_network_vn2-29725227:ctest-in_network_vn2-29725227", addr=..., plen=128,
    dest_vn="default-domain:ctest-TestECMPwithSVMChangeIPv6-35002451:ctest-in_network_vn2-29725227", policy=policy@entry=true, ecmp=true, is_local=false, service_ip=...,
    dependent_rt=..., communities=std::vector of length 0, capacity 0, label=label@entry=26) at controller/src/vnsw/agent/oper/vm_interface.cc:3816
#12 0x0000000000b1a7b5 in VmInterface::InstanceIp::L3Activate (this=this@entry=0x7f6d4804e270, interface=interface@entry=0x7f6d44006eb0, force_update=<optimized out>,
    force_update@entry=true) at controller/src/vnsw/agent/oper/vm_interface.cc:3963
#13 0x0000000000b1c007 in Activate (old_ethernet_tag=<optimized out>, l2=false, force_update=<optimized out>, interface=0x7f6d44006eb0, this=0x7f6d4804e270)
    at controller/src/vnsw/agent/oper/vm_interface.cc:4042
#14 VmInterface::UpdateIpv6InstanceIp (this=this@entry=0x7f6d44006eb0, force_update=<optimized out>, force_update@entry=true, policy_change=policy_change@entry=false,
    l2=l2@entry=false, old_ethernet_tag=old_ethernet_tag@entry=0) at controller/src/vnsw/agent/oper/vm_interface.cc:5452
#15 0x0000000000b2501b in VmInterface::UpdateL3 (this=this@entry=0x7f6d44006eb0, old_ipv4_active=old_ipv4_active@entry=true, old_vrf=old_vrf@entry=0x7f6d48034ef0, old_addr=...,
    old_ethernet_tag=old_ethernet_tag@entry=0, force_update=force_update@entry=true, policy_change=policy_change@entry=false, old_ipv6_active=old_ipv6_active@entry=true,
    old_v6_addr=..., old_subnet=..., old_subnet_plen=old_subnet_plen@entry=0 '\000', old_dhcp_addr=...) at controller/src/vnsw/agent/oper/vm_interface.cc:1523
#16 0x0000000000b2567d in VmInterface::ApplyConfig (this=this@entry=0x7f6d44006eb0, old_ipv4_active=old_ipv4_active@entry=true, old_l2_active=old_l2_active@entry=true,
    old_policy=old_policy@entry=true, old_vrf=0x7f6d48034ef0, old_addr=..., old_ethernet_tag=old_ethernet_tag@entry=0, old_need_linklocal_ip=old_need_linklocal_ip@entry=true,
    old_ipv6_active=old_ipv6_active@entry=true, old_v6_addr=..., old_subnet=..., old_subnet_plen=old_subnet_plen@entry=0 '\000', old_dhcp_enable=old_dhcp_enable@entry=true,
    old_layer3_forwarding=old_layer3_forwarding@entry=true, force_update=true, old_dhcp_addr=..., old_metadata_ip_active=old_metadata_ip_active@entry=true,
    old_bridging=old_bridging@entry=true) at controller/src/vnsw/agent/oper/vm_interface.cc:1769
#17 0x0000000000b25963 in VmInterface::Resync (this=this@entry=0x7f6d44006eb0, table=table@entry=0x7f6d64a19690, data=data@entry=0x7f6d282d5dd0)
    at controller/src/vnsw/agent/oper/vm_interface.cc:1437
#18 0x0000000000a9c4a2 in InterfaceTable::OperDBResync (this=0x7f6d64a19690, entry=0x7f6d44006f18, req=<optimized out>) at controller/src/vnsw/agent/oper/interface.cc:223
#19 0x0000000000a6b8ea in AgentOperDBTable::Resync (this=0x7f6d64a19690, entry=0x7f6d44006f18, req=0x7f6d2817c490) at controller/src/vnsw/agent/oper/oper_db.h:204
#20 0x0000000000b5e75c in AgentDBTable::Input (this=0x7f6d64a19690, partition=0x7f6d64a237a0, client=<optimized out>, req=0x7f6d2817c490)
    at controller/src/vnsw/agent/cmn/agent_db.cc:136

Tags: sanity vrouter
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.1

Review in progress for https://review.opencontrail.org/22381
Submitter: Ashok Singh (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/22382
Submitter: Ashok Singh (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.1

Review in progress for https://review.opencontrail.org/22381
Submitter: Ashok Singh (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/22382
Submitter: Ashok Singh (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/22381
Committed: http://github.org/Juniper/contrail-controller/commit/9592e1649d3c9f28d6a1587a629cc3cc4d6bb8b4
Submitter: Zuul
Branch: R3.1

commit 9592e1649d3c9f28d6a1587a629cc3cc4d6bb8b4
Author: ashoksingh <email address hidden>
Date: Mon Jul 25 17:07:13 2016 +0530

Fix agent crash in CompositeNH::UpdateComponentNHKey

Component NH key list can have null elements because of deletion of
Component NH. Handled this case. Also added UT.

Also fixed issue of label updation of individual component NH when the number of
Component NHs are more than 2. Added UT for this case too.

Change-Id: I2f103591c1986220ffd0423c7fa2a770d8911f61
Closes-Bug: #1606120

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/22382
Submitter: Ashok Singh (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/22382
Committed: http://github.org/Juniper/contrail-controller/commit/fbb2a4f967971cd4abe37ad968a5abcf5c276fe8
Submitter: Zuul
Branch: master

commit fbb2a4f967971cd4abe37ad968a5abcf5c276fe8
Author: ashoksingh <email address hidden>
Date: Mon Jul 25 17:07:13 2016 +0530

Fix agent crash in CompositeNH::UpdateComponentNHKey

Component NH key list can have null elements because of deletion of
Component NH. Handled this case. Also added UT.

Also fixed issue of label updation of individual component NH when the number of
Component NHs are more than 2. Added UT for this case too.

Closes-Bug: #1606120
(cherry picked from commit 323f8cb05ab0790962974d9510fb5908fe70424b)

Change-Id: I9b8703e64ecd36edcb3e02f4c2ffb05712d1e2c8

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.