Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-3227

LTS: Memory Leak when Opening and Closing AMQP Consumers in the Same Session / Context

XMLWordPrintable

    • +
    • Previously, if you consecutively opened and then closed a series of AMQP clients within the same `JMSContext` instance, this caused a memory leak on the broker. This issue is now resolved.
    • Documented as Resolved Issue
    • Verified in a release
    • Hide

      1. Unzip the AMQ 7.5 distribution
      2. Create a broker instance with username admin, password admin and no anonymous access
      3. Start the broker instance
      4. Compile and deploy the attached reproducer on the broker localhost
      5. Run the reproducer with java -jar consumerleak-1.0-SNAPSHOT.jar
      6. Take periodic heap dumps of the broker and watch the increase in ServerConsumerImpl and related objects
      7. Objects seem to persist even after client is killed

      Show
      1. Unzip the AMQ 7.5 distribution 2. Create a broker instance with username admin, password admin and no anonymous access 3. Start the broker instance 4. Compile and deploy the attached reproducer on the broker localhost 5. Run the reproducer with java -jar consumerleak-1.0-SNAPSHOT.jar 6. Take periodic heap dumps of the broker and watch the increase in ServerConsumerImpl and related objects 7. Objects seem to persist even after client is killed

      When connecting to an AMQ broker via the Interconnect router (qpid-dispatch 1.9) with link routing configured, I found that starting and stopping (non-transacted) clients on the other side of the router seems to result in creation of ServerConsumerImpl, ServerSenderImpl and other objects that do not get released when the client is closed.

      Upon further investigation, I found that if I open a JMSContext from a qpid JmsConnectionFactory, then open and close consumers in a loop within the context, I can trigger a leak of org.apache.activemq.artemis.protocol.amqp.proton.ProtonServerSenderContext, org.apache.activemq.artemis.core.server.impl.ServerConsumerImpl and related objects that seem to persist even after the client is killed.

          There are no Sub-Tasks for this issue.

              dbruscin Domenico Francesco Bruscino
              rhn-support-dhawkins Duane Hawkins
              Tiago Bueno Tiago Bueno
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: