Memory leak detected in AgentPath::ReorderCompositeNH

Bug #1615147 reported by Ananth Suryanarayana
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.0
Fix Committed
High
RAVI KIRAN
R3.0.2.x
Fix Committed
High
RAVI KIRAN
R3.1
Fix Committed
High
RAVI KIRAN
Trunk
Fix Committed
High
RAVI KIRAN

Bug Description

Possible fix:
diff --git a/src/vnsw/agent/oper/agent_path.cc b/src/vnsw/agent/oper/agent_path.cc
index 89d47a0..521800f 100644
--- a/src/vnsw/agent/oper/agent_path.cc
+++ b/src/vnsw/agent/oper/agent_path.cc
@@ -1305,6 +1305,7 @@ bool AgentPath::ReorderCompositeNH(Agent *agent,
              static_cast<const NextHopKey*>(mpls->nexthop()->
                                       GetDBRequestKey().release());
          if (nh_key_1->IsEqual(*nh_key_2) == false) {
+ delete nh_key_2;
              return false;
          }
          break;

==23823== 88 (72 direct, 16 indirect) bytes in 1 blocks are definitely lost in loss record 7,072 of 10,912
==23823== at 0x4C2B0E0: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==23823== by 0x17F1E45: CompositeNH::GetDBRequestKey() const (nexthop.cc:1623)
==23823== by 0x16F2C1F: AgentPath::ReorderCompositeNH(Agent*, CompositeNHKey*, bool&) (agent_path.cc:1306)
==23823== by 0x1CA324F: ControllerEcmpRoute::AddChangePath(Agent*, AgentPath*, AgentRoute const*) (controller_route_path.cc:40)
==23823== by 0x170EAB7: AgentRoute::ProcessPath(Agent*, DBTablePartition*, AgentPath*, AgentRouteData*) (agent_route.cc:793)
==23823== by 0x170D11C: AgentRouteTable::Input(DBTablePartition*, DBClient*, DBRequest*) (agent_route.cc:418)
==23823== by 0x170C9A2: AgentRouteTable::Input(DBTablePartition*, DBClient*, DBRequest*) (agent_route.cc:335)
==23823== by 0x2140DA3: DBTablePartition::Process(DBClient*, DBRequest*) (db_table_partition.cc:93)
==23823== by 0x2134DEA: DBPartition::QueueRunner::Run() (db_partition.cc:208)
==23823== by 0x22E6337: TaskImpl::execute() (task.cc:262)
==23823== by 0x6BDCB39: ??? (in /usr/lib/libtbb.so.2)
==23823== by 0x6BD8815: ??? (in /usr/lib/libtbb.so.2)
==23823== by 0x6BD7F4A: ??? (in /usr/lib/libtbb.so.2)
==23823== by 0x6BD40FE: ??? (in /usr/lib/libtbb.so.2)
==23823== by 0x6BD42F8: ??? (in /usr/lib/libtbb.so.2)
==23823== by 0x69A6183: start_thread (pthread_create.c:312)
==23823== by 0x770A37C: clone (clone.S:111)

Tags: vrouter
Changed in juniperopenstack:
assignee: nobody → RAVI KIRAN (ravibk)
importance: Undecided → High
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/23586
Submitter: RAVI KIRAN (<email address hidden>)

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

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

commit 05edc0739fe47d3fc7fbbd66236fa2912f50416d
Author: Ravi BK <email address hidden>
Date: Thu Aug 25 10:09:23 2016 +0530

Memory leak in AgentPath::ReorderCompositeNH func

Memory is allocated for NHkey to check if mpls points to same
NH as in key list. Memory will now be freed after its use.

Change-Id: I03d542a3b4b1086ac52974615901bc4db480bc09
Closes-bug: #1615147

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

Review in progress for https://review.opencontrail.org/23865
Submitter: RAVI KIRAN (<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/23866
Submitter: RAVI KIRAN (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/23867
Submitter: RAVI KIRAN (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/23866
Committed: http://github.org/Juniper/contrail-controller/commit/26b7783a20f5fd1f0110543c5d1285e8b143b6f8
Submitter: Zuul
Branch: R3.1

commit 26b7783a20f5fd1f0110543c5d1285e8b143b6f8
Author: Ravi BK <email address hidden>
Date: Thu Aug 25 10:09:23 2016 +0530

Memory leak in AgentPath::ReorderCompositeNH func

Memory is allocated for NHkey to check if mpls points to same
NH as in key list. Memory will now be freed after its use.

Change-Id: I03d542a3b4b1086ac52974615901bc4db480bc09
Closes-bug: #1615147

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/23867
Committed: http://github.org/Juniper/contrail-controller/commit/5e35a34826a39b4ac00d9e07c24cc9efa02dd7a1
Submitter: Zuul
Branch: R3.0

commit 5e35a34826a39b4ac00d9e07c24cc9efa02dd7a1
Author: Ravi BK <email address hidden>
Date: Thu Aug 25 10:09:23 2016 +0530

Memory leak in AgentPath::ReorderCompositeNH func

Memory is allocated for NHkey to check if mpls points to same
NH as in key list. Memory will now be freed after its use.

Change-Id: I03d542a3b4b1086ac52974615901bc4db480bc09
Closes-bug: #1615147

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/23865
Committed: http://github.org/Juniper/contrail-controller/commit/533c22aec67f4359f67970c422c47806606ab724
Submitter: Zuul
Branch: R3.0.2.x

commit 533c22aec67f4359f67970c422c47806606ab724
Author: Ravi BK <email address hidden>
Date: Thu Aug 25 10:09:23 2016 +0530

Memory leak in AgentPath::ReorderCompositeNH func

Memory is allocated for NHkey to check if mpls points to same
NH as in key list. Memory will now be freed after its use.

Change-Id: I03d542a3b4b1086ac52974615901bc4db480bc09
Closes-bug: #1615147

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.