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

Session leak for Core Bridge when there are no bindings on the target broker

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • AMQ 7.11.7.GA, AMQ 7.12.1.GA
    • None
    • 2
    • False
    • None
    • False
    • Hide

      Relatively easy to reproduce:

      1. Configure a core bridge on one (source) broker. Example:

            <bridges>
              <bridge name="TEST.Q.00.To.Common-Sub2">
                  <queue-name>TEST.Q.00</queue-name>
                  <forwarding-address>TEST.Q.00</forwarding-address>
                  <reconnect-attempts>-1</reconnect-attempts>
                  <user>admin</user>
                  <password>admin</password>
                  <static-connectors>
                     <connector-ref>node1</connector-ref>
                  </static-connectors>
               </bridge>
            </bridges>
      

      2. Do not create the corresponding address / queue on the target broker.

      3. Start both brokers

      4. You should see binding failures on the broker with the bridge (this is expected):

      2024-08-27 14:36:22,264 WARN  [org.apache.activemq.artemis.core.server] AMQ222097: Address TEST.Q.00 does not have any bindings, retry #(6)
      2024-08-27 14:36:24,292 WARN  [org.apache.activemq.artemis.core.server] AMQ222097: Address TEST.Q.00 does not have any bindings, retry #(7)
      2024-08-27 14:36:26,313 WARN  [org.apache.activemq.artemis.core.server] AMQ222097: Address TEST.Q.00 does not have any bindings, retry #(8)
      2024-08-27 14:36:28,323 WARN  [org.apache.activemq.artemis.core.server] AMQ222097: Address TEST.Q.00 does not have any bindings, retry #(9)
      2024-08-27 14:36:30,342 WARN  [org.apache.activemq.artemis.core.server] AMQ222097: Address TEST.Q.00 does not have any bindings, retry #(10)
      2024-08-27 14:36:32,371 WARN  [org.apache.activemq.artemis.core.server] AMQ222097: Address TEST.Q.00 does not have any bindings, retry #(11)
      2024-08-27 14:36:34,403 WARN  [org.apache.activemq.artemis.core.server] AMQ222097: Address TEST.Q.00 does not have any bindings, retry #(12)
      2024-08-27 14:36:36,420 WARN  [org.apache.activemq.artemis.core.server] AMQ222097: Address TEST.Q.00 does not have any bindings, retry #(13)
      

      5. Take periodic heap dumps of the source broker and we see growing numbers of ClientSessionFactoryImpl and related classes (not expected)

      Show
      Relatively easy to reproduce: 1. Configure a core bridge on one (source) broker. Example: <bridges> <bridge name="TEST.Q.00.To.Common-Sub2"> <queue-name>TEST.Q.00</queue-name> <forwarding-address>TEST.Q.00</forwarding-address> <reconnect-attempts>-1</reconnect-attempts> <user>admin</user> <password>admin</password> <static-connectors> <connector-ref>node1</connector-ref> </static-connectors> </bridge> </bridges> 2. Do not create the corresponding address / queue on the target broker. 3. Start both brokers 4. You should see binding failures on the broker with the bridge (this is expected): 2024-08-27 14:36:22,264 WARN [org.apache.activemq.artemis.core.server] AMQ222097: Address TEST.Q.00 does not have any bindings, retry #(6) 2024-08-27 14:36:24,292 WARN [org.apache.activemq.artemis.core.server] AMQ222097: Address TEST.Q.00 does not have any bindings, retry #(7) 2024-08-27 14:36:26,313 WARN [org.apache.activemq.artemis.core.server] AMQ222097: Address TEST.Q.00 does not have any bindings, retry #(8) 2024-08-27 14:36:28,323 WARN [org.apache.activemq.artemis.core.server] AMQ222097: Address TEST.Q.00 does not have any bindings, retry #(9) 2024-08-27 14:36:30,342 WARN [org.apache.activemq.artemis.core.server] AMQ222097: Address TEST.Q.00 does not have any bindings, retry #(10) 2024-08-27 14:36:32,371 WARN [org.apache.activemq.artemis.core.server] AMQ222097: Address TEST.Q.00 does not have any bindings, retry #(11) 2024-08-27 14:36:34,403 WARN [org.apache.activemq.artemis.core.server] AMQ222097: Address TEST.Q.00 does not have any bindings, retry #(12) 2024-08-27 14:36:36,420 WARN [org.apache.activemq.artemis.core.server] AMQ222097: Address TEST.Q.00 does not have any bindings, retry #(13) 5. Take periodic heap dumps of the source broker and we see growing numbers of ClientSessionFactoryImpl and related classes (not expected)

      When a core bridge is configured between a source and target broker and the corresponding address does not exist in the target broker, the result is a leak of ClientSessionFactoryImpl and related objects, eventually resulting in OOM, if not caught.

              rhn-support-jbertram Justin Bertram
              rhn-support-dhawkins Duane Hawkins
              Mikhail Krutov Mikhail Krutov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: