[jboss-jira] [JBoss JIRA] Created: (JBREM-822) Avoid deadlock when Connector shuts down while callback client invoker is in handleConnect()

Ron Sigal (JIRA) jira-events at lists.jboss.org
Wed Oct 17 21:13:03 EDT 2007


Avoid deadlock when Connector shuts down while callback client invoker is in handleConnect()
--------------------------------------------------------------------------------------------

                 Key: JBREM-822
                 URL: http://jira.jboss.com/jira/browse/JBREM-822
             Project: JBoss Remoting
          Issue Type: Bug
      Security Level: Public (Everyone can see)
    Affects Versions: 2.2.2.SP2, 2.2.2.GA_CP01, 2.4.0.Beta1 (Pinto)
            Reporter: Ron Sigal
         Assigned To: Ron Sigal
             Fix For: 2.4.0.Beta1 (Pinto)


Clebert Suconic has experienced a deadlock while shutting down the Application Server.  

The thread dump shows that the AS has called Connector.stop(), which leads to a call to the synchronized method org.jboss.remoting.MicroRemoteClientInvoker.disconnect() on the callback org.jboss.remoting.transport.bisocket.BisocketClientInvoker.  However, all this happens at the same time that a callback handler is being installed, which leads to a call to the synchronized method MicroRemoteClientInvoker.connect() on *the same* callback BisocketClientInvoker.  The BisocketClientInvoker is in BisocketClientInvoker.handleConnect(), where it is waiting (with, in the case of JBossMessaging, a timeout of 0) to get a control socket.  As a result, MicroRemoteClientInvoker.disconnect() is blocked and cannot execute.

This situation needs careful study.  Do MicroRemoteClientInvoker.connect() and MicroRemoteClientInvoker.disconnect() need to be fully synchronized?



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list