Bug 3921 - Notification service leaks at subscribing/unsubscribing
Summary: Notification service leaks at subscribing/unsubscribing
Status: NEW
Alias: None
Product: TAO
Classification: Unclassified
Component: Notification Service (show other bugs)
Version: 1.8.1
Hardware: All Linux
: P3 normal
Assignee: Reynald Bourtembourg
URL:
Depends on:
Blocks:
 
Reported: 2010-10-28 04:36 CDT by Bogdan Jeram
Modified: 2011-01-24 09:26 CST (History)
1 user (show)

See Also:


Attachments
Valgrind output (570.44 KB, text/plain)
2010-10-28 04:36 CDT, Bogdan Jeram
Details
Patch based on TAO x.8.1 (Sorry!!!) to solve some memory leaks on the TAO Notification Service (5.01 KB, patch)
2011-01-24 09:26 CST, Reynald Bourtembourg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bogdan Jeram 2010-10-28 04:36:20 CDT
Created attachment 1333 [details]
Valgrind output

Dear all,

we run the Notification service with following options (I do not know if it behaves the same w/o options):

dynamic TAO_MonitorAndControl Service_Object * TAO_CosNotification_MC:_make_TAO_MonitorAndControl () "-o /alma/ACS-9.0/acsdata/tmp/almadev4/ACS_INSTANCE.7/iors/NotifyMCIOR -ORBArg -ORBInitRef -ORBArg NameService=corbaloc::
134.171.18.23:3701/NameService"
dynamic TAO_MC_Notify_Service Service_Object * TAO_CosNotification_MC_Ext:_make_TAO_MC_Notify_Service () ""
dynamic Topology_Factory Service_Object * TAO_CosNotification_Persist:_make_TAO_Notify_XML_Topology_Factory () "-base_path /alma/ACS-9.0/acsdata/tmp/almadev4/ACS_INSTANCE.7/reconnect_cache_"
static Notify_Default_Event_Manager_Objects_Factory "-DispatchingThreads 1 -AllowReconnect"

and found the it leaks when we subscribe/unsubscribe for a channel.

We run the Notification channel with Valgrind, which output you can see in the attachment.

Best Regards
Bogdan
Comment 1 Bogdan Jeram 2010-10-28 04:39:05 CDT
... the valgrind.log was generated after more than 500 times of subscribe/unsubscribe
Comment 2 Johnny Willemsen 2010-10-28 05:21:29 CDT
When testing with valgrind please add ACE_HAS_VALGRIND in your config.h, or with x.8.3 use valgrind=1 in your platform_macros.GNU

Please provide patches based on x.8.3 to resolve the leaks
Comment 3 Bogdan Jeram 2011-01-20 03:20:52 CST
Reynald Bourtembourg has been working on the problem, and he has found some fixes.
Comment 4 Johnny Willemsen 2011-01-20 03:50:54 CST
Make sure you have also tests when you make fixes, copy existing tests and modify them to reproduce the issues you see
Comment 5 Reynald Bourtembourg 2011-01-24 09:26:38 CST
Created attachment 1349 [details]
Patch based on TAO x.8.1 (Sorry!!!) to solve some memory leaks on the TAO Notification Service

Hi,

Please find attached a patch fixing some memory leaks on the TAO Notification Service.
This patch is based on TAO x.8.1 because it's the version we are using here and it was urgent for us to fix this version.
We had no time to provide the patches based on TAO x.8.3 and to provide tests reproducing the problem and we will probably have no time to do this... :-( Sorry about that!
The leaks were found by running some programs using our software framework which is calling ACE/TAO functions.

I hope the fixes I provide do not break anything (especially the one related to add_to_registry()) and I hope it will help you to improve the Notification Service.

Best regards,

Reynald