Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-8222

[JMS AMQP 0-x][AMQP 0-8..0-91] Transaction commit/rollback or recover can hang when failover is in progress

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • qpid-java-6.1.6, qpid-java-6.0, qpid-java-6.0.1, qpid-java-6.0.2, qpid-java-6.0.3, qpid-java-6.0.4, qpid-java-6.0.5, qpid-java-6.1, qpid-java-6.0.6, qpid-java-6.1.1, qpid-java-6.1.2, qpid-java-6.0.7, qpid-java-6.1.3, qpid-java-6.0.8, qpid-java-6.1.4, qpid-java-client-0-x-6.3.0, qpid-java-6.1.5, qpid-java-client-0-x-6.3.1, qpid-java-client-0-x-6.3.2
    • JMS AMQP 0-x
    • None

    Description

      JMS transaction commit/rollback or recover can hang when connectivity is lost and failover is triggered to restore the connection. When commit/rollback/recover are invoked after restoring the connectivity and before failover finishes resubscribing of existing sessions, the syncing of dispatcher queue can hang due to race with adding the signal message into the queue from session operation and cleaning the queue by failover. Here is a dump of hang commit operation:

      "main" #1 prio=5 os_prio=0 tid=0x000000000241c000 nid=0x2e18 waiting on condition [0x0000000002a9f000]
         java.lang.Thread.State: WAITING (parking)
      	at sun.misc.Unsafe.park(Native Method)
      	- parking to wait for  <0x000000076d9f4c70> (a java.util.concurrent.CountDownLatch$Sync)
      	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:997)
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304)
      	at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:231)
      	at org.apache.qpid.client.AMQSession.syncDispatchQueue(AMQSession.java:2343)
      	at org.apache.qpid.client.AMQSession.rollback(AMQSession.java:1984)
      	- locked <0x000000076d67e5f8> (a java.lang.Object)
      	at org.apache.qpid.client.AMQSession.commit(AMQSession.java:922)
      	at org.apache.qpid.test.Test.main(Test.java:40)
      

      The defect was introduced as part of changes committed against QPID-3521. I do not see any sensible work around for the issue.

      Attachments

        1. thread-dump.txt
          14 kB
          Alex Rudyy

        Activity

          People

            Unassigned Unassigned
            orudyy Alex Rudyy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: