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

ConcurrentModificationException on Page.destroy

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.35.0
    • None
    • None

    Description

      I observed this while running org.apache.activemq.artemis.tests.integration.client.ConcurrentCreateDeleteProduceTest.testConcurrentProduceCreateAndDelete in loop:

      java.lang.AssertionError: null is not a legitimate internal value. Concurrent Modification?
      at io.netty.util.collection.IntObjectHashMap.toExternal(IntObjectHashMap.java:103) ~[netty-common-4.1.109.Final.jar:4.1.109.Final]
      at io.netty.util.collection.IntObjectHashMap.access$900(IntObjectHashMap.java:37) ~[netty-common-4.1.109.Final.jar:4.1.109.Final]
      at io.netty.util.collection.IntObjectHashMap$PrimitiveIterator.value(IntObjectHashMap.java:650) ~[netty-common-4.1.109.Final.jar:4.1.109.Final]
      at io.netty.util.collection.IntObjectHashMap$2$1.next(IntObjectHashMap.java:234) ~[netty-common-4.1.109.Final.jar:4.1.109.Final]
      at org.apache.activemq.artemis.core.paging.cursor.impl.PageSubscriptionImpl.destroy(PageSubscriptionImpl.java:642) ~[classes/:?]
      at org.apache.activemq.artemis.core.server.impl.QueueImpl.destroyPaging(QueueImpl.java:2382) ~[classes/:?]
      at org.apache.activemq.artemis.core.server.impl.QueueImpl.deleteQueue(QueueImpl.java:2441) ~[classes/:?]
      at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.destroyQueue(ActiveMQServerImpl.java:2512) ~[classes/:?]
      at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.destroyQueue(ActiveMQServerImpl.java:2461) ~[classes/:?]
      at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.deleteQueue(ServerSessionImpl.java:1212) ~[classes/:?]
      at org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.deleteQueue(ServerSessionImpl.java:1196) ~[classes/:?]
      at org.apache.activemq.artemis.core.protocol.core.ServerSessionPacketHandler.slowPacketHandler(ServerSessionPacketHandler.java:436) ~[classes/:?]

      On the occasion I had a fix for ARTEMIS-4165 in place, but the issue seems orthogonal to me.

      The cleanup methods are clearing the Netty collection out of abundance of caution (to help out GC). The fix here is just to stop doing that.

      As part of this fix I'm also adding a check-leak test to make sure such objects are not leaking.

      Attachments

        Activity

          People

            clebertsuconic Clebert Suconic
            clebertsuconic Clebert Suconic
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: