[omniORB] omniORBpy deadlock.
Teemu Torma
teemu at torma.org
Thu Sep 22 18:45:25 BST 2005
Python servant activation can lead to a deadlock in multi-threaded and
embedded python / omniORB application.
The problem is that POA activate_object first takes omni::internalLock,
and whilst holding it, calls python servant _add_ref(), which in turn
takes omnipyThreadCache::lock (i.e., python interpreter lock).
The reverse sequence is also true in emebdded C++ code (we are using
Boost.Python) where the C++ code does some CORBA object manipulation.
Avoiding the python interpreter lock is slightly complicated and error
prone in this situation, especially if one is using _var's to hold
objects to make code exception safe.
The problem goes away by changing activate_object to call _add_ref()
after omni::internalLock has been released.
Any ideas?
Teemu
More information about the omniORB-list
mailing list