[omniORB] omni::createObjRef thread safety

Duncan Grisby duncan at grisby.org
Thu Dec 24 09:59:42 GMT 2009


On Tue, 2009-10-27 at 18:27 +1100, Luke Deller wrote:

> We've been getting an occasional but recurring crash under load in the
>  omni::createObjRef function in omniInternal.cc.  It looks to me like a
>  thread safety issue.  I have some some confidence that the error is
>  indeed in omniORB rather than our own code because the attached patch
>  to omniORB seems to have stopped the crash from occurring.

[...]
> I can see from inspecting variables in the crash dump that it is trying
>  to unmarshal the final CosTransactions::Control object reference.  I
>  can't tell you yet whether this object is in-process or not - either
>  case could arise.

Hi Luke,

Sorry for the long delay in looking at this. The solution of holding the
lock around the whole createObjRef call will cause problems in other
scenarios. Can you try this patch instead?

I believe the problem is that you are unmarshalling a reference to a
local object. In that situation, there is a window of opportunity for
the object to be deactivated and the identity object to be released
before it is used. The attached patch simply holds an additional
reference to the identity, which should prevent that situation. Does it
fix the problem for you?  If so, I'll check it in.

Cheers,

Duncan.

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: omniInternal.patch
Type: text/x-patch
Size: 1828 bytes
Desc: not available
Url : http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20091224/6622c919/omniInternal.bin


More information about the omniORB-list mailing list