[
https://issues.apache.org/jira/browse/QPID-3575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pavel Moravec updated QPID-3575:
--------------------------------
Priority: Critical (was: Major)
Description:
Description of problem:
There is a connection leak as described below.
A session level exception is designed to close the underlying connection (along
with the other sessions). However this is not true as there are at least two
scenarios leading in an orphaned connection that can't be further used(*)
(along with any session created on it) but it can't be deleted.
(*) Once an exception is raised, the connection, a session created on it or a
producer/consumer created on such a session can't be effectivelly used - any
usage ends up in an exception like the connection would be closed.
---------------
First scenario:
If qpid.declare_queues is set to false and an attempt to subscribe to a
non-existing queue is made, an exception is raised and subsequent
connection.close() method does not close the TCP connection at all.
Steps to Reproduce:
1. Start a fresh qpid broker with auth=no - make sure no
"some.unreal.destination" queue is there
2. Run attached Java program TestQpidLeak.java
3. Do _not_ terminate it when a prompt appears in it
4. Run qpid-stat -c in parallel
Actual results:
qpid-stat shows 10 connections made by the client and despite
connection.close() has been called for each of them.
Expected results:
qpid-stat does not show the 10 connections.
---------------
Second scenario:
Try to send 500 messages into a queue with max-queue-count 10. Again, a session
exception is raised, connection is attempted to be closed but with no impact.
Steps to Reproduce:
1. Start a fresh qpid broker with auth=no
2. qpid-config add queue testQueue --max-queue-count 10
3. Run attached Java program QueueFull.java
3. Do _not_ terminate it when a prompt appears in it
4. Run qpid-stat -c in parallel
Actual results:
qpid-stat shows 1 connection made by the client and despite connection.close()
has been called.
Sometimes (using a slightly different Java program that I can't revoke) the
invoking of connection.close() method in finally-block does not terminate.
Expected results:
qpid-stat does not show the connection from the client.
was:
Description of problem:
If qpid.declare_queues is set to false and an attempt to subscribe to a
non-existing queue is made, connection.close() method does not close the TCP
connection. This causes a TCP connection leak for case when heartbeats are set.
How reproducible:
100%
Steps to Reproduce:
1. Start a fresh qpid broker with auth=no - make sure no
"some.unreal.destination" queue is there
2. Run attached Java program
3. Do _not_ terminate it when a prompt appears in it
4. Run qpid-stat -c in parallel
Actual results:
qpid-stat shows 10 connections made by the client and despite
connection.close() has been called for each of them.
Expected results:
qpid-stat does not show the 10 connections.
Affects Version/s: (was: 0.14)
0.12
Summary: session exceptions do not properly close connections,
causing connections leak (was: connection leak after an attempt to subscribe
to nonexisting queue)
Description of the issue rewritten after playing more around.
> session exceptions do not properly close connections, causing connections leak
> ------------------------------------------------------------------------------
>
> Key: QPID-3575
> URL: https://issues.apache.org/jira/browse/QPID-3575
> Project: Qpid
> Issue Type: Bug
> Components: Java Client
> Affects Versions: 0.12
> Reporter: Pavel Moravec
> Priority: Critical
> Attachments: TestQpidLeak.java
>
>
> Description of problem:
> There is a connection leak as described below.
> A session level exception is designed to close the underlying connection
> (along with the other sessions). However this is not true as there are at
> least two scenarios leading in an orphaned connection that can't be further
> used(*) (along with any session created on it) but it can't be deleted.
> (*) Once an exception is raised, the connection, a session created on it or a
> producer/consumer created on such a session can't be effectivelly used - any
> usage ends up in an exception like the connection would be closed.
> ---------------
> First scenario:
> If qpid.declare_queues is set to false and an attempt to subscribe to a
> non-existing queue is made, an exception is raised and subsequent
> connection.close() method does not close the TCP connection at all.
> Steps to Reproduce:
> 1. Start a fresh qpid broker with auth=no - make sure no
> "some.unreal.destination" queue is there
> 2. Run attached Java program TestQpidLeak.java
> 3. Do _not_ terminate it when a prompt appears in it
> 4. Run qpid-stat -c in parallel
> Actual results:
> qpid-stat shows 10 connections made by the client and despite
> connection.close() has been called for each of them.
> Expected results:
> qpid-stat does not show the 10 connections.
> ---------------
> Second scenario:
> Try to send 500 messages into a queue with max-queue-count 10. Again, a
> session exception is raised, connection is attempted to be closed but with no
> impact.
> Steps to Reproduce:
> 1. Start a fresh qpid broker with auth=no
> 2. qpid-config add queue testQueue --max-queue-count 10
> 3. Run attached Java program QueueFull.java
> 3. Do _not_ terminate it when a prompt appears in it
> 4. Run qpid-stat -c in parallel
> Actual results:
> qpid-stat shows 1 connection made by the client and despite
> connection.close() has been called.
> Sometimes (using a slightly different Java program that I can't revoke) the
> invoking of connection.close() method in finally-block does not terminate.
> Expected results:
> qpid-stat does not show the connection from the client.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]