[ 
https://issues.apache.org/jira/browse/QPID-5117?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rob Godfrey resolved QPID-5117.
-------------------------------
       Resolution: Fixed
    Fix Version/s: 0.31

Should be resolved as part of QPID-6374

> Java client deadlocks if connection is closed while onMessage() is creating a 
> session
> -------------------------------------------------------------------------------------
>
>                 Key: QPID-5117
>                 URL: https://issues.apache.org/jira/browse/QPID-5117
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.22
>            Reporter: Philip Harvey
>             Fix For: 0.31
>
>         Attachments: jcarder_result_2.dot, test_QPID5117.java
>
>
> I have run the java systests with the [JCarder|http://jcarder.org/] agent 
> attached. JCarder detected a potential deadlock when the following are done 
> concurrently:
> * Application thread closes a connection
> * A MessageListener creates a new session on that connection inside 
> onMessage().
> Here is a sketch of the wrongly-ordered locking:
> {noformat}
> Thread "main"
>       AMQConnection.close()
>               AMQConnection.doClose()
>                       lock AMQConnection._sessionCreationLock
>                       lock AMQSession.getMessageDeliveryLock()
> Thread "Dispatcher-1-Conn-780"
>       AMQSession$Dispatcher.dispatchMessage()
>               lock AMQSession.this._messageDeliveryLock
>               myMessageListener.onMessage()
>                       AMQConnection.createSession()
>                               lock AMQConnection._sessionCreationLock
> {noformat}
> I've attached JCarder's GraphViz-format .dot file which represents this 
> slightly more comprehensively.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to