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

Timothy Bish resolved QPIDJMS-366.
----------------------------------
    Resolution: Fixed

The reported issue has been resolved.  Please open a new issue to cover the 
newly reported problems and provide detailed instructions to reproduce along 
with any supporting logs or reproducer tests

> [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
>            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-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to