[omniORB] Deadlock on recursive invocation with SINGLE_THREAD_MODEL

Duncan Grisby duncan at grisby.org
Sun Sep 13 22:10:26 BST 2009


On Friday 11 September, "Felix Nawothnig" wrote:

[...]
> Well, it would be enough to just do it for objects served by POAs with
> SINGLE_THREAD_MODEL, but I realize that it might not be okay if a
> completely unrelated request (on a completely unrelated object served by
> the same POA maybe) changes the servant world in-between an outgoing
> invokation...

The POA spec says this about SINGLE_THREAD_MODEL (section 11.3.7.1 of
the CORBA 2.6 spec):

   SINGLE_THREAD_MODEL - Requests for a single-threaded POA are
   processed sequentially. In a multi-threaded environment, all upcalls
   made by this POA to implementation code (servants and servant
   managers) are made in a manner that is safe for code that is
   multi-thread-unaware. The POA will still allow reentrant calls from
   an object implementation to itself, or to another object
   implementation managed by the same POA.

The only way to make it "safe for code that is multi-thread-unaware" is
to use a lock. Allowing re-entrant calls when the thread happened to be
making an outgoing CORBA call would, as you say, not protect the
multi-thread-unaware code sufficiently.

Cheers,

Duncan.

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



More information about the omniORB-list mailing list