Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-3636

LinkedListImpl$Iterator leak on mesage consume error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.19.0
    • 2.19.1, 2.21.0
    • None
    • None

    Description

      There is a leak of org.apache.activemq.artemis.utils.collections.LinkedListIterator when a message is marked for rollback on consume.

      https://github.com/apache/activemq-artemis/blob/1c9516db6aef8d853c7afd4fb01b7cb996dc23e0/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientConsumerImpl.java#L713

      The iterator used at ClientConsumerImpl:713 is never closed causing the leak.

       

      I wrote a "unit test" that simulates this condition. Start the test with Xmx256m and after some seconds the program terminates with "OutOfMemoryError".

      Attachments

        1. ClientConsumerImplTest.java
          0.5 kB
          Fabio Nascimento Brandão
        2. production_gc.png
          24 kB
          Fabio Nascimento Brandão
        3. production_heap_dump_wildfly.png
          51 kB
          Fabio Nascimento Brandão

        Issue Links

          Activity

            People

              jbertram Justin Bertram
              fabio.nb Fabio Nascimento Brandão
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m