You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Robbie Gemmell (JIRA)" <ji...@apache.org> on 2018/03/22 17:56:00 UTC

[jira] [Updated] (QPIDJMS-366) session commit hangs if server remote-closes and failover.maxReconnectAttempts is exhausted

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

Robbie Gemmell updated QPIDJMS-366:
-----------------------------------
    Summary: session commit hangs if server remote-closes and failover.maxReconnectAttempts is exhausted  (was: [Failover] JMS commit hangs forever if peer Closes gracefully and failover.maxReconnectAttempts exhausted)

> session commit hangs if server remote-closes and failover.maxReconnectAttempts is exhausted
> -------------------------------------------------------------------------------------------
>
>                 Key: QPIDJMS-366
>                 URL: https://issues.apache.org/jira/browse/QPIDJMS-366
>             Project: Qpid JMS
>          Issue Type: Bug
>          Components: qpid-jms-client
>            Reporter: Keith Wall
>            Assignee: Timothy Bish
>            Priority: Major
>             Fix For: 0.31.0
>
>         Attachments: 054e24_qpid366_initalconnattemptfailsgracefully.log, 4b02297_qpid-366.log, HelloWorld.patch
>
>
> If failover occurs whilst a JMS commit is in-flight, and that failover exhausts its {{failover.maxReconnectAttempts}} the JMS commit call is seen to hang forever.  This problem manifests when the connection attempts are failing with a graceful {{Close}} from the peer.  If the connection failure is at a 'transport' level (e.g. Connection refused) the problem does not appear.
> Reproduction:
> # Start Broker-J 7.0.2
> # Go to http://localhost:8080, double click on virtualhost {{default}} in the virtualhost table to open the virtualhost tab.
> # Create queue {{queue}}
> # Start IDE with qpid-jms project open (master today - 7e7cebe5)
> # Apply HelloWorld patch attached to this JIRA
> # Put a breakpoint in {{org.apache.qpid.jms.provider.amqp.AmqpProvider#commit}} line 693 (i.e. the closing brace of the try/catch the statement immediately following the pumpToProton())
> # Run HelloWorld with attached patch applied under the debugger
> # Once the breakpoint is reached, use the console to stop the virtualhost.  Do this by clicking the {{Stop}} button on the virtualhost tab.
> # Resume the debugger
> # Expected : once failover attempts are exhausted, the JMS {{commit()}} call should end with an exception - Actual: {{commit()}} continues to hang indefinitely.
> The blocked main thread looks like this:
> {noformat}
> "main@1" prio=5 tid=0x1 nid=NA waiting
>   java.lang.Thread.State: WAITING
> 	  at sun.misc.Unsafe.park(Unsafe.java:-1)
> 	  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.jms.provider.ProviderFuture.sync(ProviderFuture.java:103)
> 	  at org.apache.qpid.jms.JmsConnection.commit(JmsConnection.java:766)
> 	  at org.apache.qpid.jms.JmsLocalTransactionContext.commit(JmsLocalTransactionContext.java:171)
> 	  at org.apache.qpid.jms.JmsSession.commit(JmsSession.java:227)
> 	  at org.apache.qpid.jms.example.HelloWorld.main(HelloWorld.java:61)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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