[jbossts-issues] [JBoss JIRA] (JBTM-2423) ORBRunner uses the orb after run() returns

Michael Musgrove (JIRA) issues at jboss.org
Fri May 29 07:22:03 EDT 2015

    [ https://issues.jboss.org/browse/JBTM-2423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072214#comment-13072214 ] 

Michael Musgrove commented on JBTM-2423:

I added a line in orbportability/ORB.java to ensure that destroy is/has already been called on our root poa wrapper. This means that if whoever called shutdown on our ORB wrapper  forgets to explicitly destroy it then we will do so guaranteeing that our pre/post poa destroy hooks get invoked.

> ORBRunner uses the orb after run() returns
> ------------------------------------------
>                 Key: JBTM-2423
>                 URL: https://issues.jboss.org/browse/JBTM-2423
>             Project: JBoss Transaction Manager
>          Issue Type: Bug
>            Reporter: Michael Musgrove
>            Assignee: Michael Musgrove
> ORBRunner.java starts an orb using orb().run() but then performs operations on the orb after the run() method returns. According to the CORBA spec this is invalid:
> {quote}
> Once an ORB has shutdown, only object reference management operations(duplicate,
> release and is_nil) may be invoked on the ORB or any object reference obtained
> from it.
> {quote}
> Note that when the orb.run() method returns the orb has shutdown because, for the run method, the spec states:
> {quote}
> This operation will block until the ORB has completed the shutdown process,
> {quote}
> This issue has arisen because of a change made to our fork of the jdk orb: in the jdk orb shutdown method we join with all the orb runners. This results in deadlock:
> # com.arjuna.orbportability.ORB.shutdown is a synchronized method and it calls shutdown on the jdk orb;
> # shutdown on the jdk orb notifies the ORBRunner thread which now tries to call back into a synchronized method of com.arjuna.orbportability.ORB but is blocked because the monitor is held
> # at this point the jdk orb shutdown would normally then return allowing the 
> the ORBRunner thread to make progress but a recent change now means that the jdk orb shutdown method performs a join() on the various ORBRunner threads

This message was sent by Atlassian JIRA

More information about the jbossts-issues mailing list