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 2016/12/20 08:14:58 UTC

[jira] [Created] (QPID-7593) Abnormally ending an AMQP1.0 connection with consumer leaks the connection, session and objects related to the consumer

Keith Wall created QPID-7593:
--------------------------------

             Summary: Abnormally ending an AMQP1.0 connection with consumer leaks the connection, session and objects related to the consumer
                 Key: QPID-7593
                 URL: https://issues.apache.org/jira/browse/QPID-7593
             Project: Qpid
          Issue Type: Bug
          Components: Java Broker
            Reporter: Keith Wall
             Fix For: qpid-java-7.0.0


If I run the following code, jvisualvm shows that the object that underlies the AMQP1.0 Connection, Session and Consumer are leaked.

The GC root is the QueueConsumerNodeList associated with the Queue/QueueConsumerManager.  The node the tail and is in the deleted state and will be eventually scavenged (once new consumers join the queue).  This is common with the other protocols and I believe this aspect is as designed.

However, I think the fact that the Connections/Session/ConsumerTarget remains referenced is a defect.  It shows us that the ConsumerTarget_1.0 (org/apache/qpid/server/consumer/AbstractConsumerTarget.java:284) is not being closed.  Other protocols don't show this same defect.


{code:java}
            Properties properties = new Properties();
            properties.load(resourceAsStream);
            Context context = new InitialContext(properties);

            ConnectionFactory connectionFactory = (ConnectionFactory) context.lookup("qpidConnectionfactory");
            Connection connection = connectionFactory.createConnection();
            connection.start();

            Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
            Destination destination = (Destination) context.lookup("myqueue");

            MessageConsumer messageConsumer = session.createConsumer(destination);
            if (true) System.exit(1);
{code}



--
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