[
https://issues.apache.org/jira/browse/QPID-4086?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13400354#comment-13400354
]
Keith Wall commented on QPID-4086:
----------------------------------
Hi Alex
I'm not sure about this. Doesn't the original code try and achieve the
following from the JMS Spec?
{quote}
4.3.5 Closing a Connection
If one or more of the connection’s session’s message listeners is processing a
message at the point when connection close is invoked, all the facilities of the
connection and its sessions must remain available to those listeners until they
return control to the JMS provider.
{quote}
I think this means, you can't begin to close sessions until all the sessions
have finished processing their current message.
> Java Client 0-9.x deadlocks on concurrent connection close and session close
> from failover thread
> -------------------------------------------------------------------------------------------------
>
> Key: QPID-4086
> URL: https://issues.apache.org/jira/browse/QPID-4086
> Project: Qpid
> Issue Type: Bug
> Components: Java Client
> Affects Versions: 0.16, 0.17
> Reporter: Alex Rudyy
> Assignee: Keith Wall
> Attachments:
> 0001-QPID-4086-Remove-redundant-synchronization-on-messag.patch, deadlock.txt
>
>
> Java Client 0-8/0-9.x deadlocks on concurrent connection close and session
> close from failover thread
> {noformat}
> Java stack information for the threads listed above:
> ===================================================
> "Failover":
> at org.apache.qpid.client.AMQSession.closed(AMQSession.java:822)
> - waiting to lock <0x00000000e03c3160> (a java.lang.Object)
> at
> org.apache.qpid.client.AMQConnection.closeAllSessions(AMQConnection.java:954)
> at
> org.apache.qpid.client.AMQConnection.exceptionReceived(AMQConnection.java:1298)
> - locked <0x00000000e03c71b8> (a java.lang.Object)
> at
> org.apache.qpid.client.failover.FailoverHandler.run(FailoverHandler.java:187)
> - locked <0x00000000e03c71b8> (a java.lang.Object)
> at java.lang.Thread.run(Thread.java:662)
> "main":
> at org.apache.qpid.client.AMQConnection.doClose(AMQConnection.java:857)
> - waiting to lock <0x00000000e03c71b8> (a java.lang.Object)
> - locked <0x00000000e03c71c8> (a java.lang.Object)
> at org.apache.qpid.client.AMQConnection.doClose(AMQConnection.java:848)
> - locked <0x00000000e03c3160> (a java.lang.Object)
> - locked <0x00000000e03c71c8> (a java.lang.Object)
> at org.apache.qpid.client.AMQConnection.close(AMQConnection.java:832)
> at org.apache.qpid.client.AMQConnection.close(AMQConnection.java:823)
> at org.apache.qpid.client.AMQConnection.close(AMQConnection.java:818)
> at
> org.apache.qpid.test.utils.QpidBrokerTestCase.tearDown(QpidBrokerTestCase.java:1177)
> at junit.framework.TestCase.runBare(TestCase.java:130)
> at
> org.apache.qpid.test.utils.QpidBrokerTestCase.runBare(QpidBrokerTestCase.java:239)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at org.apache.qpid.test.utils.QpidTestCase.run(QpidTestCase.java:137)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> at
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:520)
> at
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1060)
> at
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:911)
> Found 1 deadlock.
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]