Qpid
  1. Qpid
  2. QPID-3911

Consumer.close() and session.rollback() deadlocks

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.15
    • Fix Version/s: 0.16
    • Component/s: Java Client
    • Labels:
    • Environment:

      0.16(beta/RC1) Java Client and Java Broker

      Description

      Found one Java-level deadlock:
      =============================
      "Dispatcher-Channel-0":
      waiting to lock monitor 0x0000000001e65ec8 (object
      0x00000007c180bd58, a java.lang.Object),
      which is held by "main"
      "main":
      waiting to lock monitor 0x0000000001cffbc8 (object
      0x00000007c2e10c08, a java.lang.Object),
      which is held by "Dispatcher-Channel-0"

      Java stack information for the threads listed above:
      ===================================================
      "Dispatcher-Channel-0":
      at
      org.apache.qpid.client.AMQConnection.exceptionReceived(AMQConnection.java:1255)

      • waiting to lock <0x00000007c180bd58> (a java.lang.Object)
        at
        org.apache.qpid.client.AMQSession_0_10.setCurrentException(AMQSession_0_10.java:1057)
        at
        org.apache.qpid.client.AMQSession_0_10.sync(AMQSession_0_10.java:1034)
        at
        org.apache.qpid.client.AMQSession_0_10.sendSuspendChannel(AMQSession_0_10.java:851)
        at
        org.apache.qpid.client.AMQSession.suspendChannel(AMQSession.java:3075)
      • locked <0x00000007c2c3d330> (a java.lang.Object)
        at org.apache.qpid.client.AMQSession.rollback(AMQSession.java:1854)
      • locked <0x00000007c2c3d330> (a java.lang.Object)
        at
        QpidConsumerCloseRollbackDeadlock$QpidMqHandler.onMessage(QpidConsumerCloseRollbackDeadlock.java:208)
        at
        org.apache.qpid.client.BasicMessageConsumer.notifyMessage(BasicMessageConsumer.java:745)
        at
        org.apache.qpid.client.BasicMessageConsumer_0_10.notifyMessage(BasicMessageConsumer_0_10.java:141)
        at
        org.apache.qpid.client.BasicMessageConsumer.notifyMessage(BasicMessageConsumer.java:719)
        at
        org.apache.qpid.client.BasicMessageConsumer_0_10.notifyMessage(BasicMessageConsumer_0_10.java:186)
        at
        org.apache.qpid.client.BasicMessageConsumer_0_10.notifyMessage(BasicMessageConsumer_0_10.java:54)
        at
        org.apache.qpid.client.AMQSession$Dispatcher.notifyConsumer(AMQSession.java:3467)
        at
        org.apache.qpid.client.AMQSession$Dispatcher.dispatchMessage(AMQSession.java:3406)
      • locked <0x00000007c2c3d350> (a java.lang.Object)
      • locked <0x00000007c2e10c08> (a java.lang.Object)
        at
        org.apache.qpid.client.AMQSession$Dispatcher.access$1000(AMQSession.java:3180)
        at org.apache.qpid.client.AMQSession.dispatch(AMQSession.java:3173)
        at
        org.apache.qpid.client.message.UnprocessedMessage.dispatch(UnprocessedMessage.java:54)
        at
        org.apache.qpid.client.AMQSession$Dispatcher.run(AMQSession.java:3329)
        at java.lang.Thread.run(Thread.java:636)
        "main":
        at
        org.apache.qpid.client.AMQSession$Dispatcher.rejectPending(AMQSession.java:3211)
      • waiting to lock <0x00000007c2e10c08> (a java.lang.Object)
        at
        org.apache.qpid.client.AMQSession.confirmConsumerCancelled(AMQSession.java:903)
        at
        org.apache.qpid.client.BasicMessageConsumer_0_10.sendCancel(BasicMessageConsumer_0_10.java:170)
        at
        org.apache.qpid.client.BasicMessageConsumer.close(BasicMessageConsumer.java:593)
      • locked <0x00000007c180bd58> (a java.lang.Object)
        at
        org.apache.qpid.client.BasicMessageConsumer.close(BasicMessageConsumer.java:555)
        at
        QpidConsumerCloseRollbackDeadlock.main(QpidConsumerCloseRollbackDeadlock.java:77)

      Found 1 deadlock.

        Activity

        Robbie Gemmell made changes -
        Fix Version/s 0.16 [ 12319870 ]
        Fix Version/s 0.17 [ 12320179 ]
        Affects Version/s 0.15 [ 12319043 ]
        Affects Version/s 0.16 [ 12319870 ]
        Environment 0.16 Java Client and Java Broker 0.16(beta/RC1) Java Client and Java Broker
        Robbie Gemmell made changes -
        Status Ready To Review [ 10006 ] Resolved [ 5 ]
        Fix Version/s 0.17 [ 12320179 ]
        Resolution Fixed [ 1 ]
        Robbie Gemmell made changes -
        Assignee Alex Rudyy [ alex.rufous ] Robbie Gemmell [ gemmellr ]
        Alex Rudyy made changes -
        Status In Progress [ 3 ] Ready To Review [ 10006 ]
        Alex Rudyy made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Alex Rudyy made changes -
        Assignee Alex Rudyy [ alex.rufous ]
        Praveen Murugesan made changes -
        Attachment DeadLockStackTraces.txt [ 12519536 ]
        Praveen Murugesan made changes -
        Field Original Value New Value
        Attachment QpidConsumerCloseRollbackDeadlock.java [ 12519535 ]
        Praveen Murugesan created issue -

          People

          • Assignee:
            Robbie Gemmell
            Reporter:
            Praveen Murugesan
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development