<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2657.82">
<TITLE>ORB::destroy hanging(?) in omniORB 4.0.5</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>Please excuse this long-winded message, but I'm stumped on this one.</FONT>
</P>
<BR>

<P><FONT SIZE=2>I have converted an existing server application from using BOA (and omniORB 4.0.4 at this time) to using POA.&nbsp; The original code to shutdown (using a signal handler) the server application seems to work just fine under BOA.&nbsp; Under POA however, the application does not shut down.&nbsp; I have put in logging messages to determine that the call to ORB::shutdown(false) returns (as expected), but the call to ORB::destroy() does not.&nbsp; It just seems to hang.</FONT></P>
<BR>

<P><FONT SIZE=2>I read the exchange between Craig Burton and Duncan back in December regarding ORB::shutdown() hanging and that there was a patch in 4.0.5.&nbsp; I installed 4.0.5 today (on RedHat ES 3.0) and ran our server application hoping this would be resolved.&nbsp; It wasn't in my case.</FONT></P>
<BR>

<P><FONT SIZE=2>One possible issue that may be affecting this is the server application attempts to determine if another instance is running and if so, invokes a shutdown procedure.&nbsp; If there is no old process to send this to, there is an exception.&nbsp; </FONT></P>

<P><FONT SIZE=2>That explains some lines in the first part of the trace file (using traceLevel=25 and traceThreadId=1), there is a CommFailure near the &quot;Old services shutdown exception&quot;.&nbsp; I should fix this and determine if there is an old process, but this code has been working using BOA, just not POA.</FONT></P>

<P><FONT SIZE=2>Any clues would be appreciated. </FONT>
</P>
<BR>

<P><FONT SIZE=2>Thanks,</FONT>
</P>
<BR>

<P><FONT SIZE=2>- Steve Rowe</FONT>
</P>
<BR>

<P><FONT SIZE=2>Trace file - 03/10/2005</FONT>
<BR><FONT SIZE=2>************************************************************************</FONT>
</P>
<BR>

<P><FONT SIZE=2>omniORB: (0) Initialising incoming endpoints.</FONT>
<BR><FONT SIZE=2>omniORB: (0) Bind to address 0.0.0.0.</FONT>
<BR><FONT SIZE=2>omniORB: (0) Starting serving incoming endpoints.</FONT>
<BR><FONT SIZE=2>Requested 256 pool size</FONT>
<BR><FONT SIZE=2>omniORB: (1) AsyncInvoker: thread id = 1 has started. Total threads = 1</FONT>
<BR><FONT SIZE=2>omniORB: (1) giopRendezvouser task execute for giop:tcp:192.168.2.50:37066</FONT>
<BR><FONT SIZE=2>Initialize Old services shutdown</FONT>
<BR><FONT SIZE=2>omniORB: (0) Trying to resolve initial reference `NameService'</FONT>
<BR><FONT SIZE=2>&nbsp;with boot agent: IOR:01000000240000006f6d672e6f72672f434f5242412f496e697469616c5265666572656e6365733a312e300001000000000000001c000000010100000a000000706173657276657278001a0404000000494e4954</FONT></P>

<P><FONT SIZE=2>omniORB: (0) Client attempt to connect to giop:tcp:paserverx:1050</FONT>
<BR><FONT SIZE=2>omniORB: (2) AsyncInvoker: thread id = 2 has started. Total threads = 2</FONT>
<BR><FONT SIZE=2>omniORB: (2) Scavenger task execute.</FONT>
<BR><FONT SIZE=2>omniORB: (0) Client opened connection to giop:tcp:192.168.2.11:1050</FONT>
<BR><FONT SIZE=2>omniORB: (0) sendChunk: to giop:tcp:192.168.2.11:1050 60 bytes</FONT>
<BR><FONT SIZE=2>omniORB: (0) inputMessage: from giop:tcp:192.168.2.11:1050 120 bytes</FONT>
<BR><FONT SIZE=2>omniORB: (0) Creating ref to remote: boa&lt;0x41e2c6bb5a7f14a300000002&gt;</FONT>
<BR><FONT SIZE=2>&nbsp;target id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : IDL:omg.org/CORBA/Object:1.0</FONT>
<BR><FONT SIZE=2>&nbsp;most derived id: IDL:omg.org/CosNaming/NamingContext:1.0</FONT>
<BR><FONT SIZE=2>omniORB: (0) Initial reference `NameService' resolved with boot agent.</FONT>
<BR><FONT SIZE=2>omniORB: (0) LocateRequest to remote: boa&lt;0x41e2c6bb5a7f14a300000002&gt;</FONT>
<BR><FONT SIZE=2>omniORB: (0) Client attempt to connect to giop:tcp:192.168.2.11:1050</FONT>
<BR><FONT SIZE=2>omniORB: (0) Client opened connection to giop:tcp:192.168.2.11:1050</FONT>
<BR><FONT SIZE=2>omniORB: (0) sendChunk: to giop:tcp:192.168.2.11:1050 32 bytes</FONT>
<BR><FONT SIZE=2>omniORB: (0) inputMessage: from giop:tcp:192.168.2.11:1050 20 bytes</FONT>
<BR><FONT SIZE=2>omniORB: (0) sendChunk: to giop:tcp:192.168.2.11:1050 105 bytes</FONT>
<BR><FONT SIZE=2>omniORB: (0) inputMessage: from giop:tcp:192.168.2.11:1050 164 bytes</FONT>
<BR><FONT SIZE=2>omniORB: (0) Creating ref to remote: root&lt;0&gt;</FONT>
<BR><FONT SIZE=2>&nbsp;target id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : IDL:omg.org/CORBA/Object:1.0</FONT>
<BR><FONT SIZE=2>&nbsp;most derived id: IDL:phaBO/Session:1.0</FONT>
<BR><FONT SIZE=2>omniORB: (0) LocateRequest to remote: root&lt;0&gt;</FONT>
<BR><FONT SIZE=2>omniORB: (0) Client attempt to connect to giop:tcp:192.168.2.50:37060</FONT>
<BR><FONT SIZE=2>omniORB: (0) throw giopStream::CommFailure from giopStream.cc:1073(0,NO,TRANSIENT_ConnectFailed)</FONT>
<BR><FONT SIZE=2>Old services shutdown exception</FONT>
<BR><FONT SIZE=2>omniORB: (0) Adding root&lt;0&gt; (activating) to object table.</FONT>
<BR><FONT SIZE=2>omniORB: (0) State root&lt;0&gt; (activating) -&gt; active</FONT>
<BR><FONT SIZE=2>omniORB: (0) Creating ref to local: root&lt;0&gt;</FONT>
<BR><FONT SIZE=2>&nbsp;target id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : IDL:phaBO/Session:1.0</FONT>
<BR><FONT SIZE=2>&nbsp;most derived id: IDL:phaBO/Session:1.0</FONT>
<BR><FONT SIZE=2>'IOR:010000001600000049444c3a706861424f2f53657373696f6e3a312e30000000010000000000000064000000010102000d0000003139322e3136382e322e35300000ca900e000000fe94af304200003339000000000000000200000000000000080000000100000000545441010000001c00000001000000010001000100000001000105090101000100000009010100'</FONT></P>

<P><FONT SIZE=2>omniORB: (0) Initial reference `NameService' resolved from -ORBInitRef argument / ORB registration.</FONT>
<BR><FONT SIZE=2>omniORB: (0) sendChunk: to giop:tcp:192.168.2.11:1050 92 bytes</FONT>
<BR><FONT SIZE=2>omniORB: (0) inputMessage: from giop:tcp:192.168.2.11:1050 81 bytes</FONT>
<BR><FONT SIZE=2>omniORB: (0) sendChunk: to giop:tcp:192.168.2.11:1050 80 bytes</FONT>
<BR><FONT SIZE=2>omniORB: (0) inputMessage: from giop:tcp:192.168.2.11:1050 120 bytes</FONT>
<BR><FONT SIZE=2>omniORB: (0) Creating ref to remote: boa&lt;0x41e2c6bb5a7f14a300000004&gt;</FONT>
<BR><FONT SIZE=2>&nbsp;target id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : IDL:omg.org/CORBA/Object:1.0</FONT>
<BR><FONT SIZE=2>&nbsp;most derived id: IDL:omg.org/CosNaming/NamingContext:1.0</FONT>
<BR><FONT SIZE=2>omniORB: (0) LocateRequest to remote: boa&lt;0x41e2c6bb5a7f14a300000004&gt;</FONT>
<BR><FONT SIZE=2>omniORB: (0) sendChunk: to giop:tcp:192.168.2.11:1050 32 bytes</FONT>
<BR><FONT SIZE=2>omniORB: (0) inputMessage: from giop:tcp:192.168.2.11:1050 20 bytes</FONT>
<BR><FONT SIZE=2>omniORB: (0) sendChunk: to giop:tcp:192.168.2.11:1050 228 bytes</FONT>
<BR><FONT SIZE=2>omniORB: (0) inputMessage: from giop:tcp:192.168.2.11:1050 24 bytes</FONT>
<BR><FONT SIZE=2>omniORB: (0) omniRemoteIdentity deleted.</FONT>
<BR><FONT SIZE=2>omniORB: (0) ObjRef(IDL:omg.org/CosNaming/NamingContext:1.0) -- deleted.</FONT>
<BR><FONT SIZE=2>omniORB: (0) Adding root&lt;1&gt; (activating) to object table.</FONT>
<BR><FONT SIZE=2>omniORB: (0) State root&lt;1&gt; (activating) -&gt; active</FONT>
<BR><FONT SIZE=2>omniORB: (0) Creating ref to local: root&lt;1&gt;</FONT>
<BR><FONT SIZE=2>&nbsp;target id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : IDL:omg.org/CORBA/Object:1.0</FONT>
<BR><FONT SIZE=2>&nbsp;most derived id: IDL:phaBO/ObjectFactory:1.0</FONT>
<BR><FONT SIZE=2>omniORB: (0) Adding root&lt;2&gt; (activating) to object table.</FONT>
<BR><FONT SIZE=2>omniORB: (0) State root&lt;2&gt; (activating) -&gt; active</FONT>
<BR><FONT SIZE=2>omniORB: (0) Creating ref to local: root&lt;2&gt;</FONT>
<BR><FONT SIZE=2>&nbsp;target id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : IDL:omg.org/PortableServer/ServantLocator:1.0</FONT>
<BR><FONT SIZE=2>&nbsp;most derived id: IDL:omg.org/PortableServer/ServantLocator:1.0</FONT>
<BR><FONT SIZE=2>omniORB: (0) Adding root&lt;3&gt; (activating) to object table.</FONT>
<BR><FONT SIZE=2>omniORB: (0) State root&lt;3&gt; (activating) -&gt; active</FONT>
<BR><FONT SIZE=2>omniORB: (0) Creating ref to local: root&lt;3&gt;</FONT>
<BR><FONT SIZE=2>&nbsp;target id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : IDL:omg.org/PortableServer/ServantLocator:1.0</FONT>
<BR><FONT SIZE=2>&nbsp;most derived id: IDL:omg.org/PortableServer/ServantLocator:1.0</FONT>
<BR><FONT SIZE=2>omniORB: (0) State root&lt;3&gt; (active) -&gt; deactivating (OA destruction)</FONT>
<BR><FONT SIZE=2>omniORB: (0) State root&lt;2&gt; (active) -&gt; deactivating (OA destruction)</FONT>
<BR><FONT SIZE=2>omniORB: (0) State root&lt;1&gt; (active) -&gt; deactivating (OA destruction)</FONT>
<BR><FONT SIZE=2>omniORB: (0) State root&lt;0&gt; (active) -&gt; deactivating (OA destruction)</FONT>
<BR><FONT SIZE=2>omniORB: (0) State root&lt;3&gt; (deactivating OA) -&gt; etherealising</FONT>
<BR><FONT SIZE=2>omniORB: (0) State root&lt;2&gt; (deactivating OA) -&gt; etherealising</FONT>
<BR><FONT SIZE=2>omniORB: (0) State root&lt;1&gt; (deactivating OA) -&gt; etherealising</FONT>
<BR><FONT SIZE=2>omniORB: (0) State root&lt;0&gt; (deactivating OA) -&gt; etherealising</FONT>
<BR><FONT SIZE=2>omniORB: (0) Removing root&lt;3&gt; (etherealising) from object table</FONT>
<BR><FONT SIZE=2>omniORB: (0) RefCountServantBase has zero ref count -- deleted.</FONT>
<BR><FONT SIZE=2>omniORB: (0) Removing root&lt;2&gt; (etherealising) from object table</FONT>
<BR><FONT SIZE=2>omniORB: (0) RefCountServantBase has zero ref count -- deleted.</FONT>
<BR><FONT SIZE=2>omniORB: (0) Removing root&lt;1&gt; (etherealising) from object table</FONT>
<BR><FONT SIZE=2>omniORB: (0) Removing root&lt;0&gt; (etherealising) from object table</FONT>
<BR><FONT SIZE=2>omniORB: (0) Destroying POA(RootPOA).</FONT>
<BR><FONT SIZE=2>omniORB: (0) Destroying POA(EntityPOA).</FONT>
<BR><FONT SIZE=2>omniORB: (0) Deactivating all POA(EntityPOA)'s objects.</FONT>
<BR><FONT SIZE=2>omniORB: (0) Waiting for requests to complete on POA(EntityPOA).</FONT>
<BR><FONT SIZE=2>omniORB: (0) Requests on POA(EntityPOA) completed.</FONT>
<BR><FONT SIZE=2>omniORB: (0) Etherealising POA(EntityPOA)'s objects.</FONT>
<BR><FONT SIZE=2>omniORB: (0) Destruction of POA(EntityPOA) complete.</FONT>
<BR><FONT SIZE=2>omniORB: (0) Destroying POA(RolePOA).</FONT>
<BR><FONT SIZE=2>omniORB: (0) Deactivating all POA(RolePOA)'s objects.</FONT>
<BR><FONT SIZE=2>omniORB: (0) Waiting for requests to complete on POA(RolePOA).</FONT>
<BR><FONT SIZE=2>omniORB: (0) Requests on POA(RolePOA) completed.</FONT>
<BR><FONT SIZE=2>omniORB: (0) Etherealising POA(RolePOA)'s objects.</FONT>
<BR><FONT SIZE=2>omniORB: (0) Destruction of POA(RolePOA) complete.</FONT>
<BR><FONT SIZE=2>omniORB: (0) Deactivating all POA(RootPOA)'s objects.</FONT>
<BR><FONT SIZE=2>omniORB: (0) Waiting for requests to complete on POA(RootPOA).</FONT>
<BR><FONT SIZE=2>omniORB: (0) Requests on POA(RootPOA) completed.</FONT>
<BR><FONT SIZE=2>omniORB: (0) Etherealising POA(RootPOA)'s objects.</FONT>
<BR><FONT SIZE=2>omniORB: (0) Stopping serving incoming endpoints.</FONT>
<BR><FONT SIZE=2>omniORB: (0) giopServer waits for completion of rendezvousers and workers</FONT>
<BR><FONT SIZE=2>omniORB: (0) giopServer back from waiting.</FONT>
<BR><FONT SIZE=2>omniORB: (0) Destruction of POA(RootPOA) complete.</FONT>
<BR><FONT SIZE=2>omniORB: (0) Preparing to shutdown ORB.</FONT>
<BR><FONT SIZE=2>omniORB: (0) Starting an ORB shutdown thread.</FONT>
<BR><FONT SIZE=2>omniORB: (4) ORB shutdown thread started.</FONT>
<BR><FONT SIZE=2>omniORB: (0) ORB shutdown already in progress -- waiting.</FONT>
<BR><FONT SIZE=2>omniORB: (4) Shutting-down all incoming endpoints.</FONT>
<BR><FONT SIZE=2>omniORB: (4) TCP endpoint shut down.</FONT>
<BR><FONT SIZE=2>omniORB: (4) Disable ObjRef(IDL:omg.org/PortableServer/ServantLocator:1.0) root&lt;3&gt;</FONT>
<BR><FONT SIZE=2>omniORB: (4) Object table entry root&lt;3&gt; (dead) deleted.</FONT>
<BR><FONT SIZE=2>omniORB: (4) Disable ObjRef(IDL:omg.org/PortableServer/ServantLocator:1.0) root&lt;2&gt;</FONT>
<BR><FONT SIZE=2>omniORB: (4) Object table entry root&lt;2&gt; (dead) deleted.</FONT>
<BR><FONT SIZE=2>omniORB: (4) Disable ObjRef(IDL:phaBO/ObjectFactory:1.0) root&lt;1&gt;</FONT>
<BR><FONT SIZE=2>omniORB: (4) Object table entry root&lt;1&gt; (dead) deleted.</FONT>
<BR><FONT SIZE=2>omniORB: (4) Disable ObjRef(IDL:phaBO/Session:1.0) root&lt;0&gt;</FONT>
<BR><FONT SIZE=2>omniORB: (4) Object table entry root&lt;0&gt; (dead) deleted.</FONT>
<BR><FONT SIZE=2>omniORB: (4) Disable ObjRef(IDL:phaBO/Session:1.0) root&lt;0&gt;</FONT>
<BR><FONT SIZE=2>omniORB: (4) omniRemoteIdentity deleted.</FONT>
<BR><FONT SIZE=2>omniORB: (4) Disable ObjRef(IDL:omg.org/CosNaming/NamingContext:1.0) boa&lt;0x41e2c6bb5a7f14a300000002&gt;</FONT>
<BR><FONT SIZE=2>omniORB: (4) omniRemoteIdentity deleted.</FONT>
<BR><FONT SIZE=2>omniORB: (4) Disable ObjRef(omg.org/CORBA/InitialReferences:1.0) key&lt;INIT&gt;</FONT>
<BR><FONT SIZE=2>omniORB: (4) omniRemoteIdentity deleted.</FONT>
<BR><FONT SIZE=2>omniORB: (4) 7 object references present at ORB shutdown.</FONT>
<BR><FONT SIZE=2>omniORB: (4) ORB shutdown is complete.</FONT>
<BR><FONT SIZE=2>omniORB: (0) ORB shutdown complete -- finished waiting.</FONT>
<BR><FONT SIZE=2>omniORB: (0) ObjRef(IDL:omg.org/CosNaming/NamingContext:1.0) -- deleted.</FONT>
<BR><FONT SIZE=2>omniORB: (0) ObjRef(omg.org/CORBA/InitialReferences:1.0) -- deleted.</FONT>
<BR><FONT SIZE=2>omniORB: (0) Deinitialising omniDynamic library.</FONT>
<BR><FONT SIZE=2>omniORB: (0) Client connection refcount (forced) = 0</FONT>
<BR><FONT SIZE=2>omniORB: (0) Client close connection to giop:tcp:192.168.2.11:1050</FONT>
<BR><FONT SIZE=2>omniORB: (0) Client connection refcount (forced) = 0</FONT>
<BR><FONT SIZE=2>omniORB: (0) Client close connection to giop:tcp:192.168.2.11:1050</FONT>
<BR><FONT SIZE=2>omniORB: (0) 0 remaining bidir ropes deleted.</FONT>
<BR><FONT SIZE=2>omniORB: (0) 2 remaining ropes deleted.</FONT>
<BR><FONT SIZE=2>omniORB: (0) Clear endPoint options.</FONT>
<BR><FONT SIZE=2>omniORB: (0) Wait for ORB invoker threads to finish.</FONT>
<BR><FONT SIZE=2>omniORB: (1) AsyncInvoker: thread id = 1 has exited. Total threads = 2</FONT>
<BR><FONT SIZE=2>omniORB: (2) AsyncInvoker: thread id = 2 has exited. Total threads = 1</FONT>
</P>
<BR>

<P><FONT SIZE=2>*****************************</FONT>
<BR><FONT SIZE=2>end of trace file....</FONT>
</P>

</BODY>
</HTML>