[omniORB] omniORB4: LONG Pause during orb->shutdown(0), orb->destroy()
Ken Feuerman
kfeuerma@adobe.com
Thu, 29 Nov 2001 16:56:46 -0800
--=====================_29472859==_
Content-Type: text/plain; charset="us-ascii"; format=flowed
I'm having a problem where there's a very long pause (several minutes) on
ORB shutdown whenever a program creates a callback object. Here's a
synopsis of what I'm trying to do:
Process A runs a servant, implementing a "KioskViewer". Process A is
long-lived.
Process B creates a servant implementing a "DataStream", and passes its
reference to the "KioskViewer". The "KioskViewer" eventually calls the
Destroy() method on that "DataStream". That in turn should trigger Process
B's shutdown and exit.
Within Process B, the implementation of Destroy() is to set an event. The
main thread waits on this event, deactivates the "DataStream" servant, then
calls orb->shutdown(0) and orb->destroy(). The problem is that there's a
very long pause in the thread launched by orb->shutdown(0) while it waits
to stop serving the incoming endpoints.
I've appended the output from a run of Process B with the trace level set
at 15, and (through some debugger hackery) traced locks and unlocks
<orb_lock>. I'm running on Win2000, MSVC 6.0, omniORB snapshot as
indicated in the log below. Any ideas why the hang?
Thanks!
--Ken Feuerman.
Adobe Systems
--=====================_29472859==_
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: attachment; filename="shutdownrace.log"
Application: Calling CORBA::ORB_init()...
omniORB: orb_lock: thread 0 calls lock()
omniORB: Distribution date: Wed Nov 14 19:10:23 GMT 2001 dpg1
omniORB: Native char code sets: UTF-8 ISO-8859-1.
omniORB: Transmission char code sets: UTF-8(1.2) ISO-8859-1(1.2) ISO-8859-1(1.1)
ISO-8859-1(1.0).
omniORB: Native wide char code sets: UTF-16.
omniORB: Transmission wide char code sets: UTF-16(1.2).
omniORB: Initialising omniDynamic library.
omniORB: orb_lock: thread 0 calls unlock()
omniORB: Initialising incoming endpoints.
omniORB: Starting serving incoming endpoints.
Application: CORBA::ORB_init() returns.
omniORB: Creating ref to remote: key<0x4e616d6553657276696365>
target id : IDL:omg.org/CORBA/Object:1.0
most derived id:
omniORB: Creating ref to remote: key<0x4e616d6553657276696365>
target id : IDL:omg.org/CosNaming/NamingContext:1.0
most derived id:
omniORB: ObjRef() -- deleted.
omniAsyncInvoker: thread id=1 has started. Total threads = 2
omniORB: Creating ref to remote: root<0>
target id : IDL:omg.org/CORBA/Object:1.0
most derived id: IDL:adobe.com/Kiosk/KioskViewer:1.0
omniORB: LocateRequest to remote: root<0>
omniAsyncInvoker: thread id=2 has started. Total threads = 2
omniORB: omniRemoteIdentity deleted.
omniORB: ObjRef() -- deleted.
omniORB: Adding root<0> (activating) to object table.
omniORB: State root<0> (activating) -> active
omniORB: Creating ref to local: root<0>
target id : IDL:adobe.com/KioskClient/DataStream:1.0
most derived id: IDL:adobe.com/KioskClient/DataStream:1.0
omniAsyncInvoker: thread id=3 has started. Total threads = 3
omniORB: Accepted connection from giop:tcp:153.32.159.200:3416 because of this r
ule: "* unix,ssl,tcp"
omniORB: Handling a GIOP LOCATE_REQUEST.
Application: Waiting for DataStream::Destroy() call.
Application: Destroy() has been called.
omniORB: State root<0> (active) -> deactivating
omniORB: POA(RootPOA) etherealising object.
id: IDL:adobe.com/KioskClient/DataStream:1.0
omniORB: State root<0> (deactivating) -> etherealising
omniORB: Removing root<0> (etherealising) from object table
omniORB: Object table entry root<0> (dead) deleted.
omniORB: ObjRef(IDL:adobe.com/KioskClient/DataStream:1.0) -- deleted.
omniORB: omniRemoteIdentity deleted.
omniORB: ObjRef(IDL:adobe.com/Kiosk/KioskViewer:1.0) -- deleted.
Application: Calling orb->shutdown(0)
omniORB: orb_lock: thread 0 calls lock()
omniORB: Preparing to shutdown ORB.
omniORB: Starting an ORB shutdown thread.
omniORB: ORB shutdown thread started.
omniORB: orb_lock: thread 4 calls lock()
omniORB: orb_lock: thread 0 calls unlock()
omniORB: Destroying POA(RootPOA).
omniORB: Deactivating all POA(RootPOA)'s objects.
omniORB: Waiting for requests to complete on POA(RootPOA).
omniORB: Requests on POA(RootPOA) completed.
omniORB: Etherealising POA(RootPOA)'s objects.
omniORB: Stopping serving incoming endpoints.
Application: Calling orb->destroy()
omniORB: orb_lock: thread 0 calls lock()
============= Pause here for several seconds ===============
omniAsyncInvoker: thread id=1 has exited. Total threads = 2
============= Pause here for 2-3 minutes ===================
omniORB: throw giopStream::CommFailure from giopStream.cc:798(0,NO,COMM_FAILURE_
UnMarshalArguments)
omniORB: Destruction of POA(RootPOA) complete.
omniORB: Shutting-down all incoming endpoints.
omniORB: 0 object references present at ORB shutdown.
omniORB: orb_lock: thread 4 calls unlock()
omniORB: orb_lock: thread 4 calls lock()
omniORB: ORB shutdown is complete.
omniORB: orb_lock: thread 4 calls unlock()
omniORB: Deinitialising omniDynamic library.
omniORB: 2 remaining ropes deleted.
omniAsyncInvoker: thread id=3 has exited. Total threads = 1
omniAsyncInvoker: thread id=2 has exited. Total threads = 0
omniAsyncInvoker: deleted.
omniORB: orb_lock: thread 0 calls unlock()
orb->destroy()'ed
omniORB: No more references to the ORB -- deleted.
--=====================_29472859==_--