Memory leak in sandesh generated code

Bug #1560341 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
Megh Bhatt
R2.21.x
Fix Committed
High
Megh Bhatt
R2.22.x
Fix Committed
High
Megh Bhatt
R3.0
Fix Committed
High
Megh Bhatt
Trunk
Fix Committed
High
Megh Bhatt

Bug Description

Noticed this in bgp_stress_test

==28401== 247 (144 direct, 103 indirect) bytes in 1 blocks are definitely lost in loss record 209 of 220
==28401== at 0x4C2B0E0: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==28401== by 0x1A31A9C: SandeshCtrlServerToClient::Request(std::vector<UVETypeInfo, std::allocator<UVETypeInfo> > const&, bool, std::string const&, SandeshConnection*) (sandesh_ctrl_types.h:312)
==28401== by 0x1A31557: SandeshServer::ReceiveSandeshCtrlMsg(SandeshStateMachine*, SandeshSession*, Sandesh const*) (sandesh_server.cc:225)
==28401== by 0x1A2E0B7: SandeshServerConnection::ProcessSandeshCtrlMessage(std::string const&, SandeshHeader const&, std::string, unsigned int) (sandesh_connection.cc:170)
==28401== by 0x1A1A40D: ssm::ServerInit::react(ssm::EvSandeshCtrlMessageRecv const&) (sandesh_state_machine.cc:303)
==28401== by 0x1A16D5B: SandeshStateMachine::DequeueEvent(SandeshStateMachine::EventContainer&) (sandesh_state_machine.cc:800)
==28401== by 0x1A2983D: QueueTaskRunner<SandeshStateMachine::EventContainer, WorkQueue<SandeshStateMachine::EventContainer> >::RunQueue() (queue_task.h:87)
==28401== by 0x1A2887F: QueueTaskRunner<SandeshStateMachine::EventContainer, WorkQueue<SandeshStateMachine::EventContainer> >::Run() (queue_task.h:66)
==28401== by 0x1C3180A: TaskImpl::execute() (task.cc:253)
==28401== by 0x5D7AB39: ??? (in /usr/lib/libtbb.so.2)
==28401== by 0x5D76815: ??? (in /usr/lib/libtbb.so.2)
==28401== by 0x5D75F4A: ??? (in /usr/lib/libtbb.so.2)
==28401== by 0x5D720FE: ??? (in /usr/lib/libtbb.so.2)
==28401== by 0x5D722F8: ??? (in /usr/lib/libtbb.so.2)
==28401== by 0x5B44181: start_thread (pthread_create.c:312)
==28401== by 0x702600C: clone (clone.S:111)
==28401==

Tags: analytics
Changed in juniperopenstack:
importance: Undecided → High
tags: added: analytics
removed: contrail-sandesh
Raj Reddy (rajreddy)
Changed in juniperopenstack:
assignee: nobody → Megh Bhatt (meghb)
Megh Bhatt (meghb)
Changed in juniperopenstack:
milestone: none → r3.1.0.0-fcs
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.0

Review in progress for https://review.opencontrail.org/19767
Submitter: Megh Bhatt (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/19767
Committed: http://github.org/Juniper/contrail-sandesh/commit/e66f5e0b49d1fddbbe8bc31be0b6b1a03405f98b
Submitter: Zuul
Branch: R3.0

commit e66f5e0b49d1fddbbe8bc31be0b6b1a03405f98b
Author: Megh Bhatt <email address hidden>
Date: Fri Apr 29 16:26:48 2016 -0700

Fix memory leak in sandesh c++ lib for collector

1. Release sandesh in error case when session does not exist or
state machine is not in correct state
2. Add correct template specialization for WorkQueueDelete for
sandesh session send queue

Change-Id: I9272b748e495c8c563b08b6dd587893d68041241
Closes-Bug: #1560341

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

Review in progress for https://review.opencontrail.org/19873
Submitter: Megh Bhatt (<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/19874
Submitter: Megh Bhatt (<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/19886
Submitter: Megh Bhatt (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/19887
Submitter: Megh Bhatt (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/19874
Committed: http://github.org/Juniper/contrail-sandesh/commit/75cf05e2ce57c895dfefb261b0cca60e29488ee9
Submitter: Zuul
Branch: R2.20

commit 75cf05e2ce57c895dfefb261b0cca60e29488ee9
Author: Megh Bhatt <email address hidden>
Date: Fri Apr 29 16:26:48 2016 -0700

Fix memory leak in sandesh c++ lib for collector

1. Release sandesh in error case when session does not exist or
state machine is not in correct state
2. Add correct template specialization for WorkQueueDelete for
sandesh session send queue

Change-Id: I9272b748e495c8c563b08b6dd587893d68041241
Closes-Bug: #1560341
(cherry picked from commit e66f5e0b49d1fddbbe8bc31be0b6b1a03405f98b)

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

Reviewed: https://review.opencontrail.org/19887
Committed: http://github.org/Juniper/contrail-sandesh/commit/ebdf46abdcb57d48123c0034dc7706d620024180
Submitter: Zuul
Branch: R2.22.x

commit ebdf46abdcb57d48123c0034dc7706d620024180
Author: Megh Bhatt <email address hidden>
Date: Fri Apr 29 16:26:48 2016 -0700

Fix memory leak in sandesh c++ lib for collector

1. Release sandesh in error case when session does not exist or
state machine is not in correct state
2. Add correct template specialization for WorkQueueDelete for
sandesh session send queue

Change-Id: I9272b748e495c8c563b08b6dd587893d68041241
Closes-Bug: #1560341
(cherry picked from commit e66f5e0b49d1fddbbe8bc31be0b6b1a03405f98b)

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

Reviewed: https://review.opencontrail.org/19886
Committed: http://github.org/Juniper/contrail-sandesh/commit/a4e86069900742d08379ff1b892c6dcfa773c0f2
Submitter: Zuul
Branch: R2.21.x

commit a4e86069900742d08379ff1b892c6dcfa773c0f2
Author: Megh Bhatt <email address hidden>
Date: Fri Apr 29 16:26:48 2016 -0700

Fix memory leak in sandesh c++ lib for collector

1. Release sandesh in error case when session does not exist or
state machine is not in correct state
2. Add correct template specialization for WorkQueueDelete for
sandesh session send queue

Change-Id: I9272b748e495c8c563b08b6dd587893d68041241
Closes-Bug: #1560341
(cherry picked from commit e66f5e0b49d1fddbbe8bc31be0b6b1a03405f98b)

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

Reviewed: https://review.opencontrail.org/19873
Committed: http://github.org/Juniper/contrail-sandesh/commit/de01e102187dd463d47719a42de74453d47a8eef
Submitter: Zuul
Branch: master

commit de01e102187dd463d47719a42de74453d47a8eef
Author: Megh Bhatt <email address hidden>
Date: Fri Apr 29 16:26:48 2016 -0700

Fix memory leak in sandesh c++ lib for collector

1. Release sandesh in error case when session does not exist or
state machine is not in correct state
2. Add correct template specialization for WorkQueueDelete for
sandesh session send queue

Change-Id: I9272b748e495c8c563b08b6dd587893d68041241
Closes-Bug: #1560341
(cherry picked from commit e66f5e0b49d1fddbbe8bc31be0b6b1a03405f98b)

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.