You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Keith Wall (JIRA)" <ji...@apache.org> on 2018/03/21 12:20:00 UTC
[jira] [Comment Edited] (QPIDJMS-366) [Failover] JMS commit hangs
forever if peer Closes gracefully and failover.maxReconnectAttempts
exhausted
[ https://issues.apache.org/jira/browse/QPIDJMS-366?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16407797#comment-16407797 ]
Keith Wall edited comment on QPIDJMS-366 at 3/21/18 12:19 PM:
--------------------------------------------------------------
Commit [054e24c|https://git-wip-us.apache.org/repos/asf?p=qpid-jms.git;h=054e24c] did indeed resolve the issue, but I quickly discovered a closely related problem. If the *initial* connection attempt to the peer ends with a graceful close, then I see the client's failover spin indefinitely: {{failover.maxReconnectAttempts}}, {{failover.startupMaxReconnectAttempts}} and {{failover.reconnectDelay}} are ignored. To reproduce, I have moved step 8 in my list in this JIRA's description to after step 3.
I attach a log.
was (Author: k-wall):
Commit [054e24c|https://git-wip-us.apache.org/repos/asf?p=qpid-jms.git;h=054e24c] did indeed resolve the issue, but I quickly discovered a closely related problem. If the *initial* connection attempt to the peer ends with a graceful close, then I see the client's failover spin indefinitely: {{failover.maxReconnectAttempts}}, {{failover.startupMaxReconnectAttempts}} and {{failover.reconnectDelay}} are ignored. To reproduce, I have move step 8 in my list in this JIRA's description to after step 3.
I attach a log.
> [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-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org