[omniORB] omniORBpy deadlock / termination problem.

Harri Pasanen harri.pasanen at trema.com
Mon Sep 15 18:40:41 BST 2003


I've been playing with the cxxAPI of omniORBpy and everything seems to 
work pretty much to my expectations.

I have one problem though:

I've wrapped a C++ omniorb application class using boost python, and 
that C++ class initializes omniorb. The class has a method to return 
a CORBA::Object_ptr (an interface pointer).   I used 
cxxObjRefToPyObjRef() to wrap it back to python, and I can then 
successfully call the interface  methods from Python.  So this is a 
python extension, not embedding.

However, at exit my script hangs, as some threads are left running.   
I've narrowed it down to the fact that cxxObjRefToPyObjRef() calls 
ORB_Init() again, when the orb has already been initialized by the 
C++.

There seems to be a the scavenger/scan threads left running.

omniORB: Disable ObjRef() key<0x4e616d6553657276696365>
omniORB: Disable ObjRef() key<0x4e616d6553657276696365>
omniORB: omniRemoteIdentity deleted.
omniORB: 3 object references present at ORB shutdown.
omniORB: ORB shutdown is complete.
omniORB: Scan for idle connections (1063639746,413155000)
omniORB: Scavenger reduce idle count for strand 0x81cec88 to 23
omniORB: Scavenger reduce idle count for strand 0x81ca4a0 to 23
omniORB: Scan for idle connections done (1063639746,413155000).
omniORB: Scan for idle connections (1063639751,419333000)
omniORB: Scavenger reduce idle count for strand 0x81cec88 to 22
...

As a test, If I modify cxxObjRefToPyObjRef()  not to call ORB_Init(), 
and make sure I don't call it from Python either, then my python 
program terminates ok.  

I don't have a very clear understanding of omniORB internals, so I 
wonder what would be the correct way to make sure that C++ OmniORB 
and omniORBpy don't disturb one another?

Regards,

Harri





More information about the omniORB-list mailing list