[omniORB] [Q] deleting static _the_nil_ptr

V S P toreason at fastmail.fm
Thu Apr 9 01:50:11 BST 2009


Hi Duncan
I think you were correct and I was wrong

The debugging tool finishes tracing before the main exit,
however i looks like when I run outside of the debugger, the omniOrb
does
more unloading (even after the call to orb->destroy)
and in that trace I see
-----

omniORB: (0) 2009-04-09 00:44:02.974000: Final clean-up
omniORB: (0) 2009-04-09 00:44:02.974000: Deleted 3 nil object references
and 0 o
ther tracked objects.
omniORB: (0) 2009-04-09 00:44:02.974000: Final clean-up completed.

-----

so this is probably deleting those statics and the memleak checker is
done by that time...

I did not see this trace before as my console window was closing right
before the exit.

Vlad





On Thu, 09 Apr 2009 00:11 -0400, "V S P" <toreason at fastmail.fm> wrote:
> Hello
> 
> Thank you for the reply
> 
> I am using
> http://dmoulding.googlepages.com/vld
> Visual leak detector (probably the best free leak detector for VS 2008)
> 
> ------------- the test case extract --------------
> -- to see leaks must be executed from within VS studio --
> 
> #ifdef _DEBUG 
> #ifdef WIN32
> #include <vld.h>
> #endif
> #endif
> 
> void startup (int argc, char** argv)
> {
>      orb= CORBA::ORB_init(argc, argv);
> try{
>      CORBA::Object_var obj =
>      orb->resolve_initial_references("OmniNameService");
>      assert (!CORBA::is_nil(obj.in()));
> }                                                                        
>   catch(CORBA::Exception& /*ex*/ ) {
>    //let it fall through
>   }
>   orb->destroy();
>   /* note that in
>    void
>   omniOrbORB::destroy()
>   {
>     if( _NP_is_nil() )  _CORBA_invoked_nil_pseudo_ref();
> 
>    _NP_is_nil() evaluates to 'false'
>   */
> 
> 
>   return;
> }
> 
> int main (int argc, char** argv)
> {
> 
>   startup (argc,argv);
> 
>   return 0;
> }   
> 
> ------------------------------
> 
> 
> I also enabled tracing to see if Omni is unloading
> It appears to be be unloading
> 
> ---------------------------------------
> omniORB: (0) 2009-04-09 00:06:31.521000: Version: 4.1.3
> omniORB: (0) 2009-04-09 00:06:31.521000: Distribution date: Tue Sep 23
> 10:43:28
> BST 2008 dgrisby
> omniORB: (0) 2009-04-09 00:06:31.631000: Warning: unable to create an
> IPv6 socke
> t. Unable to obtain the list of IPv6 interface addresses (10047).
> omniORB: (0) 2009-04-09 00:06:31.631000: My addresses are:
> omniORB: 192.168.0.100
> omniORB: 127.0.0.1
> omniORB: (0) 2009-04-09 00:06:31.631000: Maximum supported GIOP version
> is 1.2
> omniORB: (0) 2009-04-09 00:06:31.631000: Native char code sets: UTF-8
> ISO-8859-1
> .
> omniORB: (0) 2009-04-09 00:06:31.631000: Transmission char code sets:
> UTF-8(1.2)
>  UTF-8(1.1) ISO-8859-1(1.2) ISO-8859-1(1.1) ISO-8859-1(1.0).
> omniORB: (0) 2009-04-09 00:06:31.631000: Native wide char code sets:
> UTF-16.
> omniORB: (0) 2009-04-09 00:06:31.631000: Transmission wide char code
> sets: UTF-1
> 6(1.2).
> omniORB: (0) 2009-04-09 00:06:31.631000: Information: the omniDynamic
> library is
>  not linked.
> omniORB: (0) 2009-04-09 00:06:31.631000: Current configuration is as
> follows:
> omniORB:   DefaultInitRef (file) =
> omniORB:   DefaultInitRef (args) =
> omniORB:   InitRef = NameService=corbaname::localhost
> omniORB:   abortOnInternalError = 0
> omniORB:   abortOnNativeException = 0
> omniORB:   acceptBiDirectionalGIOP = 0
> omniORB:   acceptMisalignedTcIndirections = 0
> omniORB:   bootstrapAgentHostname =
> omniORB:   bootstrapAgentPort = 900
> omniORB:   clientCallTimeOutPeriod = 0
> omniORB:   clientConnectTimeOutPeriod = 0
> omniORB:   clientTransportRule = * unix,ssl,tcp
> omniORB:   configFile = C:\usr\home\bin\omniorb.cfg
> omniORB:   connectionWatchImmediate = 0
> omniORB:   connectionWatchPeriod = 50000
> omniORB:   copyValuesInLocalCalls = 1
> omniORB:   diiThrowsSysExceptions = 0
> omniORB:   dumpConfiguration = 1
> omniORB:   endPoint = giop:tcp::
> omniORB:   endPointPublish = addr
> omniORB:   giopMaxMsgSize = 2097152
> omniORB:   giopTargetAddressMode = KeyAddr
> omniORB:   id = omniORB4
> omniORB:   idleThreadTimeout = 10
> omniORB:   immediateAddressSwitch = 0
> omniORB:   inConScanPeriod = 180
> omniORB:   lcdMode = 0
> omniORB:   maxGIOPConnectionPerServer = 5
> omniORB:   maxGIOPVersion = 1.2
> omniORB:   maxInterleavedCallsPerConnection = 5
> omniORB:   maxServerThreadPerConnection = 100
> omniORB:   maxServerThreadPoolSize = 100
> omniORB:   maxSocketRecv = 131072
> omniORB:   maxSocketSend = 131072
> omniORB:   nativeCharCodeSet = ISO-8859-1
> omniORB:   nativeWCharCodeSet = UTF-16
> omniORB:   objectTableSize = 0
> omniORB:   offerBiDirectionalGIOP = 0
> omniORB:   oneCallPerConnection = 1
> omniORB:   outConScanPeriod = 120
> omniORB:   poaHoldRequestTimeout = 0
> omniORB:   poaUniquePersistentSystemIds = 1
> omniORB:   principal = [Null]
> omniORB:   resetTimeOutOnRetries = 0
> omniORB:   scanGranularity = 5
> omniORB:   serverCallTimeOutPeriod = 0
> omniORB:   serverTransportRule = * unix,ssl,tcp
> omniORB:   socketSendBuffer = 16384
> omniORB:   strictIIOP = 1
> omniORB:   supportBootstrapAgent = 0
> omniORB:   supportCurrent = 1
> omniORB:   supportPerThreadTimeOut = 0
> omniORB:   tcAliasExpand = 0
> omniORB:   threadPerConnectionLowerLimit = 9000
> omniORB:   threadPerConnectionPolicy = 1
> omniORB:   threadPerConnectionUpperLimit = 10000
> omniORB:   threadPoolWatchConnection = 1
> omniORB:   traceExceptions = 1
> omniORB:   traceFile = [stderr]
> omniORB:   traceInvocationReturns = 1
> omniORB:   traceInvocations = 1
> omniORB:   traceLevel = 40
> omniORB:   traceThreadId = 1
> omniORB:   traceTime = 1
> omniORB:   unixTransportDirectory = /tmp/omni-%u
> omniORB:   unixTransportPermission =  777
> omniORB:   useTypeCodeIndirections = 1
> omniORB:   validateUTF8 = 0
> omniORB:   verifyObjectExistsAndType = 1
> omniORB: (0) 2009-04-09 00:06:31.631000: Creating ref to remote:
> key<NameService
> >
>  target id      : IDL:omg.org/CORBA/Object:1.0
>  most derived id:
> omniORB: (0) 2009-04-09 00:06:31.631000: Initial reference `NameService'
> resolve
> d from configuration file.
> 3640 [0x00000e24] INFO disp_otrq null - Starting thread scheduler(this
> is from my stuff not from Omni)
> omniORB: (0) 2009-04-09 00:06:31.631000: Preparing to shutdown ORB.
> omniORB: (0) 2009-04-09 00:06:31.631000: Disable ObjRef()
> key<NameService>
> 3640 [omniORB: (0) 2009-04-09 00:06:31.631000: omniRemoteIdentity
> deleted.
> omniORB: (0) 2009-04-09 00:06:31.631000: 1 object reference present at
> ORB shutd
> own.
> omniORB: (0) 2009-04-09 00:06:31.631000: ORB shutdown is complete.
> 0x0omniORB: (0) 2009-04-09 00:06:31.631000: ObjRef() -- deleted.
> omniORB: (0) 2009-04-09 00:06:31.631000: Terminate strand scavenger.
> omniORB: (0) 2009-04-09 00:06:31.631000: Close remaining strands.
> 000omniORB: (0) 2009-04-09 00:06:31.631000: 0 remaining bidir ropes
> deleted.
> omniORB: (0) 2009-04-09 00:06:31.631000: 0 remaining ropes deleted.
> omniORB: (0) 2009-04-09 00:06:31.631000: Clear endPoint options.
> 0d2omniORB: (0) 2009-04-09 00:06:31.631000: AsyncInvoker: deleted.
> 
> 
> ------------------------------------------ end of trace
> 
> 
> 
> 
> Vlad
> 
> 
> 
> 
> 
> On Wed, 08 Apr 2009 11:15 +0100, "Duncan Grisby" <duncan at grisby.org>
> wrote:
> > On Tuesday 7 April, "V S P" wrote:
> > 
> > > in the generate stub
> > > there is a static pointer called
> > > 
> > > static _objref_<MYINTERFACENAME>* _the_nil_ptr = 0;
> > > 
> > > there is a new done on it,
> > > but I cannot find delete
> > 
> > The delete is done during the final clean-up that happens when the
> > omniORB library is unloaded. It only happens if you call
> > orb->destroy().
> > 
> > > I am getting a mem leak report on that.
> > 
> > What is reporting the leak?  If something goes looking for leaks before
> > the omniORB library is unloaded, it will look as though it's leaked.
> > 
> > Cheers,
> > 
> > Duncan.
> > 
> > -- 
> >  -- Duncan Grisby         --
> >   -- duncan at grisby.org     --
> >    -- http://www.grisby.org --
> -- 
>   V S P
>   toreason at fastmail.fm
> 
> -- 
> http://www.fastmail.fm - Faster than the air-speed velocity of an
>                           unladen european swallow
> 
> 
> _______________________________________________
> omniORB-list mailing list
> omniORB-list at omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list
-- 
  V S P
  toreason at fastmail.fm

-- 
http://www.fastmail.fm - The professional email service




More information about the omniORB-list mailing list