[omniORB] server/orb shutdown question in omni_thread

Lee, Robert C. rc.lee at ngc.com
Mon Jul 28 19:19:01 BST 2003


Duncan,

Thanks for the feedback. I tried the below and it goes further, but I get
this error message:

omniORB: Preparing to shutdown ORB.
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: Removing root<0> (etherealising) from object table
omniORB: Stopping serving incoming endpoints.
omniORB: Destruction of POA(RootPOA) complete.
omniORB: Shutting-down all incoming endpoints.
omniORB: ORB shutdown is complete.
omniORB: Deinitialising omniDynamic library.
omniORB: Assertion failed.  This indicates a bug in the application using
omniORB, or maybe in omniORB itself. e.g. using the ORB after it has
been shut down.
 file: ../../../../../src/lib/omniORB/orbcore/corbaOrb.cc
 line: 1053
 info: invoker_threads == 0
omniORB: AsyncInvoker: thread id = 3 has exited. Total threads = 2
omniORB: AsyncInvoker: thread id = 2 has exited. Total threads = 2
omniORB: AsyncInvoker: deleted.
omniORB: Deinitialising omniDynamic library.
omniORB: throw INITIALIZE from interceptors.cc:188
(NO,INITIALIZE_FailedLoadLibrary)
Caught unknown exception.
Exiting..
CORBA CORBA::SystemException: 0x1005a008

In the thread function, I make one corba call, then do a orb->destory(),
followed by exit. Any ideas what might be wrong?

I noticed in the manual, there are preprocessor defines for sun, linux,
digital unix, and nt, but not my platform, IRIX?

Robert Lee

-----Original Message-----
From: Duncan Grisby [mailto:duncan at grisby.org]
Sent: Friday, July 25, 2003 8:12 AM
To: Lee, Robert C.
Cc: 'omniorb-list at omniorb-support.com'
Subject: Re: [omniORB] server/orb shutdown question 


On Friday 18 July, "Lee, Robert C." wrote:

[...]
> So what I did was to trap a SIGTERM signal which causes the server (which
> creates/incarnates the Corba object on startup) to unregister the object
> reference with "A". Then I want to exit. What the signal handler does is
to
> unregister, call orb->destory, and then exit. However, the exit call is
> never reached. The call to orb->destory() never returns. 

The problem is that most things you might want to do are not safe to
do inside signal handlers. The only thing that is guaranteed safe to
do in a signal handler is to signal on a system V semaphore. You
should use that to wake up a thread. Use the thread to do the
shutdown, and all should be fine.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list