40K+ bytes memory leak found in agent in DnsHandler::HandleDefaultDnsRequest()

Bug #1615730 reported by Ananth Suryanarayana
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R2.20
Fix Committed
High
Hari Prasad Killi
R2.21.x
Fix Committed
High
Hari Prasad Killi
R2.22.x
Fix Committed
High
Hari Prasad Killi
R3.0
Fix Committed
High
Hari Prasad Killi
R3.0.2.x
Fix Committed
High
Hari Prasad Killi
R3.1
Fix Committed
High
Hari Prasad Killi
Trunk
Fix Committed
High
Hari Prasad Killi

Bug Description

Noticed this leak during GR testing with master branch code (3.2)

Possible fix...

diff --git a/src/vnsw/agent/services/dns_handler.cc b/src/vnsw/agent/services/dns_handle
index eba44f8..7f38ee4 100644
--- a/src/vnsw/agent/services/dns_handler.cc
+++ b/src/vnsw/agent/services/dns_handler.cc
@@ -250,6 +250,7 @@ bool DnsHandler::HandleDefaultDnsRequest(const VmInterface *vmitf) {
                                " interface = " << vmitf->vm_name() <<
                                " Ignoring unsupported type : " <<
                                it->type);
+ delete resolv;
                 continue;
         }
         resolv_list_.push_back(resolv);

==6284== 46,440 (19,944 direct, 26,496 indirect) bytes in 831 blocks are definitely lost in loss record 10,781 of 11,018
==6284== at 0x4C2B0E0: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6284== by 0x19FD5D5: DnsHandler::HandleDefaultDnsRequest(VmInterface const*) (dns_handler.cc:218)
==6284== by 0x19FCB94: DnsHandler::HandleRequest() (dns_handler.cc:164)
==6284== by 0x19FC221: DnsHandler::Run() (dns_handler.cc:105)
==6284== by 0x1B2AA7E: Proto::RunProtoHandler(ProtoHandler*) (proto.cc:51)
==6284== by 0x1B2AB6B: Proto::ProcessProto(boost::shared_ptr<PktInfo>) (proto.cc:66)
==6284== by 0x1B2DA13: boost::_mfi::mf1<bool, Proto, boost::shared_ptr<PktInfo> >::operator()(Proto*, boost::shared_ptr<PktInfo>) const (mem_fn_template.hpp:165)
==6284== by 0x1B2D3BF: bool boost::_bi::list2<boost::_bi::value<Proto*>, boost::arg<1> >::operator()<bool, boost::_mfi::mf1<bool, Proto, boost::shared_ptr<PktInfo> >, boost::_bi::list1<boost::shared_ptr<PktInfo>&> >(boost::_bi::type<bool>, boost::_mfi::mf1<bool, Proto, boost::shared_ptr<PktInfo> >&, boost::_bi::list1<boost::shared_ptr<PktInfo>&>&, long) (bind.hpp:303)
==6284== by 0x1B2CD33: bool boost::_bi::bind_t<bool, boost::_mfi::mf1<bool, Proto, boost::shared_ptr<PktInfo> >, boost::_bi::list2<boost::_bi::value<Proto*>, boost::arg<1> > >::operator()<boost::shared_ptr<PktInfo> >(boost::shared_ptr<PktInfo>&) (bind_template.hpp:32)
==6284== by 0x1B2C964: boost::detail::function::function_obj_invoker1<boost::_bi::bind_t<bool, boost::_mfi::mf1<bool, Proto, boost::shared_ptr<PktInfo> >, boost::_bi::list2<boost::_bi::value<Proto*>, boost::arg<1> > >, bool, boost::shared_ptr<PktInfo> >::invoke(boost::detail::function::function_buffer&, boost::shared_ptr<PktInfo>) (function_template.hpp:132)
==6284== by 0x1B2E221: boost::function1<bool, boost::shared_ptr<PktInfo> >::operator()(boost::shared_ptr<PktInfo>) const (function_template.hpp:767)
==6284== by 0x1B2DDAF: QueueTaskRunner<boost::shared_ptr<PktInfo>, WorkQueue<boost::shared_ptr<PktInfo> > >::RunQueue() (queue_task.h:92)
==6284== by 0x1B2DB91: QueueTaskRunner<boost::shared_ptr<PktInfo>, WorkQueue<boost::shared_ptr<PktInfo> > >::Run() (queue_task.h:67)
==6284== by 0x22E6337: TaskImpl::execute() (task.cc:262)
==6284== by 0x6BDCB39: ??? (in /usr/lib/libtbb.so.2)
==6284== by 0x6BD8815: ??? (in /usr/lib/libtbb.so.2)
==6284== by 0x6BD7F4A: ??? (in /usr/lib/libtbb.so.2)
==6284== by 0x6BD40FE: ??? (in /usr/lib/libtbb.so.2)
==6284== by 0x6BD42F8: ??? (in /usr/lib/libtbb.so.2)
==6284== by 0x69A6183: start_thread (pthread_create.c:312)
==6284== by 0x770A37C: clone (clone.S:111)

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

Review in progress for https://review.opencontrail.org/23538
Submitter: Hari Prasad Killi (<email address hidden>)

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

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

commit 37111efe5ae2353e45d491fc37d3d1343b1430af
Author: Hari <email address hidden>
Date: Tue Aug 23 14:22:50 2016 +0530

Resolve leak in default DNS handler for unsupported types.

Change-Id: I33497fa5d5fde1d844f780c91ec128c03b3eb5d9
closes-bug: #1615730

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

Review in progress for https://review.opencontrail.org/23568
Submitter: Hari Prasad Killi (<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/23569
Submitter: Hari Prasad Killi (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/23569
Committed: http://github.org/Juniper/contrail-controller/commit/4d08d602d0f319e13b9c829ed97f50a1b33076d7
Submitter: Zuul
Branch: R3.0

commit 4d08d602d0f319e13b9c829ed97f50a1b33076d7
Author: Hari <email address hidden>
Date: Tue Aug 23 14:22:50 2016 +0530

Resolve leak in default DNS handler for unsupported types.

Change-Id: I33497fa5d5fde1d844f780c91ec128c03b3eb5d9
closes-bug: #1615730
(cherry picked from commit 37111efe5ae2353e45d491fc37d3d1343b1430af)

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

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

commit c408634aad0dea9b064e54d2ad56468820841de2
Author: Hari <email address hidden>
Date: Tue Aug 23 14:22:50 2016 +0530

Resolve leak in default DNS handler for unsupported types.

Change-Id: I33497fa5d5fde1d844f780c91ec128c03b3eb5d9
closes-bug: #1615730
(cherry picked from commit 37111efe5ae2353e45d491fc37d3d1343b1430af)

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

Review in progress for https://review.opencontrail.org/23617
Submitter: Hari Prasad Killi (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/23618
Submitter: Hari Prasad Killi (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/23619
Submitter: Hari Prasad Killi (<email address hidden>)

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/23620
Submitter: Hari Prasad Killi (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/23618
Committed: http://github.org/Juniper/contrail-controller/commit/be411422b78cde9a8710e48308996020fc4cf5c1
Submitter: Zuul
Branch: R2.20

commit be411422b78cde9a8710e48308996020fc4cf5c1
Author: Hari <email address hidden>
Date: Tue Aug 23 14:22:50 2016 +0530

Resolve leak in default DNS handler for unsupported types.

Change-Id: I33497fa5d5fde1d844f780c91ec128c03b3eb5d9
closes-bug: #1615730
(cherry picked from commit 37111efe5ae2353e45d491fc37d3d1343b1430af)

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

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

commit cda3d702b8057ba07063c4df6ef3e464b01e9fb6
Author: Hari <email address hidden>
Date: Tue Aug 23 14:22:50 2016 +0530

Resolve leak in default DNS handler for unsupported types.

Change-Id: I33497fa5d5fde1d844f780c91ec128c03b3eb5d9
closes-bug: #1615730
(cherry picked from commit 37111efe5ae2353e45d491fc37d3d1343b1430af)

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

Reviewed: https://review.opencontrail.org/23619
Committed: http://github.org/Juniper/contrail-controller/commit/de28f670eee5a66da3226c5d041d2632f5943dbc
Submitter: Zuul
Branch: R2.21.x

commit de28f670eee5a66da3226c5d041d2632f5943dbc
Author: Hari <email address hidden>
Date: Tue Aug 23 14:22:50 2016 +0530

Resolve leak in default DNS handler for unsupported types.

Change-Id: I33497fa5d5fde1d844f780c91ec128c03b3eb5d9
closes-bug: #1615730
(cherry picked from commit 37111efe5ae2353e45d491fc37d3d1343b1430af)

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

Reviewed: https://review.opencontrail.org/23617
Committed: http://github.org/Juniper/contrail-controller/commit/b4d3ec888ae5f1299ca2af464f7d31aff4f20a43
Submitter: Zuul
Branch: R2.22.x

commit b4d3ec888ae5f1299ca2af464f7d31aff4f20a43
Author: Hari <email address hidden>
Date: Tue Aug 23 14:22:50 2016 +0530

Resolve leak in default DNS handler for unsupported types.

Change-Id: I33497fa5d5fde1d844f780c91ec128c03b3eb5d9
closes-bug: #1615730
(cherry picked from commit 37111efe5ae2353e45d491fc37d3d1343b1430af)

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.