qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip Harvey (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (QPID-5118) [JMS] Deadlock when closing a consumer and calling JMS operatons inside onMessage() on AMQP 0-8/0-9/0-9-1 connection
Date Fri, 06 Sep 2013 09:12:51 GMT

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

Philip Harvey updated QPID-5118:
--------------------------------

    Attachment: jcarder_result_3.dot

JCarder-generated file showing this potential deadlock.
                
> [JMS] Deadlock when closing a consumer and calling JMS operatons inside onMessage() on
AMQP 0-8/0-9/0-9-1 connection
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-5118
>                 URL: https://issues.apache.org/jira/browse/QPID-5118
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.22
>            Reporter: Philip Harvey
>         Attachments: jcarder_result_3.dot
>
>
> I have run the java systests with the [JCarder|http://jcarder.org/] agent attached. When
using AMQP 0-9, JCarder detected a potential deadlock when the following are done concurrently:
> * Close a consumer from an application thread. 
> * Call one of the JMS operations inside MessageListener.onMessage() that uses AMQConnectionDelegate_8_0.executeRetrySupport(..).

> Here is a sketch of the deadlock scenario:
> {noformat}
> 	Thread: Dispatcher-1-Conn-600
> 		AMQSession$Dispatcher.dispatchMessage()
> 			lock AMQSession.this._messageDeliveryLock
> 			...
> 				myMessageListener.onMessage()
> 					execute failover-aware operation eg createQueue, createProducer etc
> 						AMQConnectionDelegate_8_0.executeRetrySupport
> 							lock AMQConnection.getFailoverMutex()
> 	Thread: main
> 		BasicMessageConsumer.close()
> 			lock AMQSession.getFailoverMutex()
> 			lock AMQSession._messageDeliveryLock
> {noformat}
>  
> Interestingly, AMQConnectionDelegate_0_10.executeRetrySupport(..) does not acquire the
failover mutex (I have no idea if it _should_) so is not susceptible to this deadlock.
> I've attached the GraphViz .dot file that JCarder generated when it detected this problem.
> Note that this problem is similar to QPID-4574 so might be fixed by a single commit.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message