You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Alex Rudyy (JIRA)" <ji...@apache.org> on 2015/07/28 18:30:04 UTC
[jira] [Created] (QPID-6664) Connection#close may hang awaiting
failover to exhaust retries
Alex Rudyy created QPID-6664:
--------------------------------
Summary: Connection#close may hang awaiting failover to exhaust retries
Key: QPID-6664
URL: https://issues.apache.org/jira/browse/QPID-6664
Project: Qpid
Issue Type: Bug
Components: Java Client
Affects Versions: 0.32, 0.30, 0.28, 0.26, 0.24, 0.22, 0.20, 0.18, 0.16, 0.14, 0.12, 0.10, 0.8
Reporter: Alex Rudyy
Assignee: Alex Rudyy
Fix For: 6.0 [Java]
A client's call to Connection#close may hang awaiting failover to exhaust its retry count. This occurs because the failover thread has acquired the failover mutex, and closing sessions requires the same mutex.
If the connection has no Sessions, instead the Connection#close will complete, but the failover thread will continue to spin in the background.
The following could be done to fix the issue:
# AMQConnection#attemptReconnection while expression needs to include !isClosed().
# AMQConnection#close() needs to acquire the failover mutex *after* its call to doClose(sessions, timeout) to ensure that, in the case of a connection without sessions, the thread performing failover will have finished its work (i.e. for 0-8 the FailoverThread will be ending) before #close returns to the caller.
# #AMQConnection#exceptionReceived needs to lose responsibility for mutating closed/closing. This responsibility needs to be pushed to its callers. 0-10 already does this, this change will make 0-8 the same. This will mean that _closed means the user has closed the connections, or the Broker has closed the connection and failover has given up.
# Remove Closable#resetClosedFlag
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org