[omniORB] Memory Leaks.
Venkateswara Rao Kanaparthi
kvrao@winphoria.com
Thu Sep 5 12:49:00 2002
--------------030201030602060002020901
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Hello,
We require some help in debugging the memory leaks we are getting with
omniORB3 (Solaris 5.7).
We are statically linking with the omni libs.
On purifying our process, we observe the following PLK's and MLK's:
[My impl object is derived from the idl "interface
IpMultiPartyCallControlManager".]
PLK: 68 bytes potentially leaked at 0x5ee1c0
* This memory was allocated from:
malloc [rtlib.o]
__bUiLtIn_nEw [new1.cc:84]
__builtin_new [rtlib.o]
org::parlay::services::callcontrol::_pof_IpMultiPartyCallControlManager::newObjRef(const
char*,_CORBA_Unbounded_Sequence<IOP::TaggedProfile>*,omniIdentity*,omniLocalIdentity*)
[ParlayCallControl_MPCCS_IFSK.cc:152]
omni::createObjRef(const char*,const
char*,omniLocalIdentity*,_CORBA_Unbounded_Sequence<IOP::TaggedProfile>*,bool,unsigned
char*) [libomniORB3.a]
servant__this__10omniOrbPOAPQ214PortableServer11ServantBasePCc
[libomniORB3.a]
MLK: 26 bytes leaked in 9 blocks
* This memory was allocated from:
malloc [rtlib.o]
__bUiLtIn_nEw [new1.cc:84]
__builtin_new [rtlib.o]
__bUiLtIn_vEc_nEw [new2.cc:39]
__builtin_vec_new [rtlib.o]
omni::allocString(int) [omniInternal.h:234]
* Block of 5 bytes (2 times); last block at 0x5fd500
* Block of 4 bytes (3 times); last block at 0x1696650
* Block of 1 byte (4 times); last block at 0x16d3660
We are getting similar kind of PLK's for other interfaces we are using.
Following is the log when the constructor of a impl object is called:
CTOR of calIImpl
omniORB: Activating: root<7>
omniORB: Creating ref to local: root<7>
target id : IDL:org/parlay/IpService:1.0
most derived id:
IDL:org/parlay/services/callcontrol/IpMultiPartyCallControlManager:1.0
All through out the program I make sure that my impl object has only ONE reference. That is I am calling _remove_ref() for every _this().
When I want to destroy my impl object, I do a deactivate using the following peice of code:
PortableServer::ObjectId_var objectId = accessPoa->servant_to_id(callImpl);
accessPoa->deactivate_object(objectId);
And the log is as follows:
before deactivate .......
omniORB: Deactivating: root<7> (has local refs).
omniORB: Object is idle -- etherealise now.
omniORB: RefCountServantBase has zero ref count -- deleted.
DTOR - wms_MultiPartyCallControlManager_i - ENTER
DTOR - wms_MultiPartyCallControlManager_i - EXIT
We believe that some of the local refs are not getting freed even after the servant gets destroyed. The above log shows "has local refs" while deactivating. Is there a way to free these local refs too? Is our analysis correct or did we miss something?
Thanks in advance,
KV Rao.
--------------030201030602060002020901
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
</head>
<body>
Hello,<br>
<br>
We require some help in debugging the memory leaks we are getting with omniORB3
(Solaris 5.7).<br>
We are statically linking with the omni libs.<br>
<br>
On purify<i>ing</i> our process, we observe the following PLK's and MLK's:<br>
[My impl object is derived from the idl "interface IpMultiPartyCallControlManager".]<br>
<br>
<br>
<b>PLK: 68 bytes potentially leaked at 0x5ee1c0<br>
* This memory was allocated from:<br>
malloc [rtlib.o]<br>
__bUiLtIn_nEw [new1.cc:84]<br>
__builtin_new [rtlib.o]<br>
org::parlay::services::callcontrol::_pof_IpMultiPartyCallControlManager::newObjRef(const
char*,_CORBA_Unbounded_Sequence<IOP::TaggedProfile>*,omniIdentity*,omniLocalIdentity*)
[ParlayCallControl_MPCCS_IFSK.cc:152]<br>
omni::createObjRef(const char*,const char*,omniLocalIdentity*,_CORBA_Unbounded_Sequence<IOP::TaggedProfile>*,bool,unsigned
char*) [libomniORB3.a]<br>
servant__this__10omniOrbPOAPQ214PortableServer11ServantBasePCc [libomniORB3.a]
<br>
<br>
MLK: 26 bytes leaked in 9 blocks<br>
* This memory was allocated from:<br>
malloc [rtlib.o]<br>
__bUiLtIn_nEw [new1.cc:84]<br>
__builtin_new [rtlib.o]<br>
__bUiLtIn_vEc_nEw [new2.cc:39]<br>
__builtin_vec_new [rtlib.o]<br>
omni::allocString(int) [omniInternal.h:234]<br>
* Block of 5 bytes (2 times); last block at 0x5fd500<br>
* Block of 4 bytes (3 times); last block at 0x1696650<br>
* Block of 1 byte (4 times); last block at 0x16d3660</b><br>
<br>
<br>
We are getting similar kind of PLK's for other interfaces we are using.<br>
<br>
Following is the log when the constructor of a impl object is called:<br>
<br>
<i>CTOR of calIImpl<br>
omniORB: Activating: root<7><br>
omniORB: Creating ref to local: root<7><br>
target id : IDL:org/parlay/IpService:1.0<br>
most derived id: IDL:org/parlay/services/callcontrol/IpMultiPartyCallControlManager:1.0<br>
</i><br>
<pre class="moz-signature" cols="$mailwrapcol">All through out the program I make sure that my impl object has only ONE reference. That is I am calling _remove_ref() for every _this().
When I want to destroy my impl object, I do a deactivate using the following peice of code:
<b> PortableServer::ObjectId_var objectId = accessPoa->servant_to_id(callImpl);
accessPoa->deactivate_object(objectId);
</b>
And the log is as follows:
<i>before deactivate .......
omniORB: Deactivating: root<7> (has local refs).
omniORB: Object is idle -- etherealise now.
omniORB: RefCountServantBase has zero ref count -- deleted.
DTOR - wms_MultiPartyCallControlManager_i - ENTER
DTOR - wms_MultiPartyCallControlManager_i - EXIT </i>
We believe that some of the local refs are not getting freed even after the servant gets destroyed. The above log shows <b>"has local refs" </b>while deactivating. Is there a way to free these local refs too? Is our analysis correct or did we miss something?
Thanks in advance,
KV Rao.
</pre>
</body>
</html>
--------------030201030602060002020901--