[ 
https://issues.apache.org/jira/browse/QPIDJMS-366?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16405496#comment-16405496
 ] 

Keith Wall commented on QPIDJMS-366:
------------------------------------

Please find attached log.  I am reproducing the problem exactly as described 
above except that I am testing with master now 
(4b022971b7461ebaefe12161358e03c0af9b590a).   I note that since the changes 
made by QPIDJMS-365, failover for this case seems to continue indefinitely 
(i.e. ignores the failover.maxReconnectAttempts=2 in my connection url).

 

> [Failover] JMS commit hangs forever if peer Closes gracefully and 
> failover.maxReconnectAttempts 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
>            Priority: Major
>         Attachments: 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-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to