[omniORB] select()-timeout in tcpSocketRendezvouser
Dr.-Ing. Martin Goettlicher
Martin.Goettlicher@medical.bruker.de
Tue, 19 Jun 2001 13:23:37 +0200
Hello,
about 2 months ago I described a problem that I have with a small=20
utility program which is called from shell-scripts very often. This=20
program simply makes one CORBA-method call and terminates. The=20
termination is delayed for one second which is not acceptable for this=20
application. I found out that the time (one second) is consumed during=20
orb->destroy() which waits for the running threads to join. In the=20
run_undetached()-method of the class tcpSocketRendezvouser=20
(omni/src/lib/omniORB2/orbcore/tcpSocketMTfactory.cc line 1546-1548)=20
there is a call to select() with a timeout of one second. In my last=20
mail I asked if this timeout could be made configurable. In the reply to =
my mail Duncan Grisby wrote:
> Hmm. Reducing the timeout in the select() call would make the
> selecting thread burn more processor time. A simpler solution is to
> not call orb->destroy(). That way, the process exits without trying to=
> synchronise all the threads. The OS cleans up all the resources
> anyway.
In the meantime I tried Duncan's suggestion not to call orb->destroy().=20
Unfortunately this does not work. My program aborts in the cleanup=20
process as the following log messages show (omniORB::traceLevel =3D 25):
omniORB: omniRemoteIdentity deleted.
omniORB: strand Rope::decrRefCount: old value =3D 1
omniORB: ObjRef() -- deleted.
omniORB: ORB shutdown thread started.
omniORB: Deinitialising omniDynamic library.
omniORB: Destroying POA(RootPOA).
omniORB: Deactivating all POA(RootPOA)'s objects.
omniORB: Waiting for requests to complete on POA(RootPOA).
omniORB: Etherealising POA(RootPOA)'s objects.
omniORB: Stopping incoming rope factories.
omniORB: tcpSocketStrand::real_shutdown() fd no. 8 Done
omniORB: throw omniConnectionBroken (minor 0) from=20
tcpSocketMTfactory.cc:1076
Abort
Because of this unsatisfactory situation I would like to repeat my=20
request to make the select timeout in the class tcpSocketRendezvouser=20
configurable.
Best Regards
Martin G=F6ttlicher