ActiveMQ
  1. ActiveMQ
  2. AMQ-4092

ConcurrentModificationException when using message groups

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.6.0
    • Fix Version/s: 5.9.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      ActiveMQ 5.6.0 standalone, kahadb persistence, Spring JMSTemplate producer (ObjectMessage), Camel 2.9.2 route consumer (AMQ connection pool, vm transport)

      Description

      seeing these WARN messages frequently while consuming (maxConcurrentConsumers=5) from a queue with the message groups header (JMSXGroupID) set. If I disable the message groups header, these errors go away...

      That said, I don't see any specific errors with my application (at this point), just these messages in my logs.

      2012-10-04 02:34:02,552 | WARN - Service - | Async error occurred: java.util.concurrent.ExecutionException: java.util.ConcurrentModificationException
      java.util.concurrent.ExecutionException: java.util.ConcurrentModificationException
      at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
      at java.util.concurrent.FutureTask.get(FutureTask.java:83)
      at org.apache.activemq.broker.region.Queue.doMessageSend(Queue.java:785)
      at org.apache.activemq.broker.region.Queue.send(Queue.java:707)
      at org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:407)
      at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:503)
      at org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:305)
      at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:129)
      at org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:96)
      at org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:306)
      at org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:135)
      at org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:453)
      at org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:681)
      at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
      at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
      at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:116)
      at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
      at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:231)
      at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122)
      at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:680)
      Caused by: java.util.ConcurrentModificationException
      at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
      at java.util.HashMap$KeyIterator.next(HashMap.java:828)
      at org.apache.activemq.util.MarshallingSupport.marshalPrimitiveMap(MarshallingSupport.java:64)
      at org.apache.activemq.command.Message.beforeMarshall(Message.java:210)
      at org.apache.activemq.command.ActiveMQObjectMessage.beforeMarshall(ActiveMQObjectMessage.java:199)
      at org.apache.activemq.openwire.v6.MessageMarshaller.looseMarshal(MessageMarshaller.java:277)
      at org.apache.activemq.openwire.v6.ActiveMQMessageMarshaller.looseMarshal(ActiveMQMessageMarshaller.java:111)
      at org.apache.activemq.openwire.v6.ActiveMQObjectMessageMarshaller.looseMarshal(ActiveMQObjectMessageMarshaller.java:111)
      at org.apache.activemq.openwire.OpenWireFormat.marshal(OpenWireFormat.java:168)
      at org.apache.activemq.store.kahadb.KahaDBStore$KahaDBMessageStore.addMessage(KahaDBStore.java:429)
      at org.apache.activemq.store.kahadb.KahaDBStore$StoreQueueTask.run(KahaDBStore.java:1177)
      ... 3 more

        Activity

        Ben O'Day created issue -
        Ben O'Day made changes -
        Field Original Value New Value
        Description seeing these WARN messages frequently using consuming (maxConcurrentConsumers=5) from a queue with the message groups header (JMSXGroupID) set. If I disable the message groups, these go away...

        That said, I don't see any specific errors with my application (at this point), just these messages in my logs.

        2012-10-04 02:34:02,552 | WARN - Service - | Async error occurred: java.util.concurrent.ExecutionException: java.util.ConcurrentModificationException
        java.util.concurrent.ExecutionException: java.util.ConcurrentModificationException
        at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
        at java.util.concurrent.FutureTask.get(FutureTask.java:83)
        at org.apache.activemq.broker.region.Queue.doMessageSend(Queue.java:785)
        at org.apache.activemq.broker.region.Queue.send(Queue.java:707)
        at org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:407)
        at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:503)
        at org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:305)
        at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:129)
        at org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:96)
        at org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:306)
        at org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:135)
        at org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:453)
        at org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:681)
        at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
        at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
        at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:116)
        at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
        at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:231)
        at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122)
        at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:680)
        Caused by: java.util.ConcurrentModificationException
        at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
        at java.util.HashMap$KeyIterator.next(HashMap.java:828)
        at org.apache.activemq.util.MarshallingSupport.marshalPrimitiveMap(MarshallingSupport.java:64)
        at org.apache.activemq.command.Message.beforeMarshall(Message.java:210)
        at org.apache.activemq.command.ActiveMQObjectMessage.beforeMarshall(ActiveMQObjectMessage.java:199)
        at org.apache.activemq.openwire.v6.MessageMarshaller.looseMarshal(MessageMarshaller.java:277)
        at org.apache.activemq.openwire.v6.ActiveMQMessageMarshaller.looseMarshal(ActiveMQMessageMarshaller.java:111)
        at org.apache.activemq.openwire.v6.ActiveMQObjectMessageMarshaller.looseMarshal(ActiveMQObjectMessageMarshaller.java:111)
        at org.apache.activemq.openwire.OpenWireFormat.marshal(OpenWireFormat.java:168)
        at org.apache.activemq.store.kahadb.KahaDBStore$KahaDBMessageStore.addMessage(KahaDBStore.java:429)
        at org.apache.activemq.store.kahadb.KahaDBStore$StoreQueueTask.run(KahaDBStore.java:1177)
        ... 3 more
        seeing these WARN messages frequently while consuming (maxConcurrentConsumers=5) from a queue with the message groups header (JMSXGroupID) set. If I disable the message groups header, these errors go away...

        That said, I don't see any specific errors with my application (at this point), just these messages in my logs.

        2012-10-04 02:34:02,552 | WARN - Service - | Async error occurred: java.util.concurrent.ExecutionException: java.util.ConcurrentModificationException
        java.util.concurrent.ExecutionException: java.util.ConcurrentModificationException
        at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
        at java.util.concurrent.FutureTask.get(FutureTask.java:83)
        at org.apache.activemq.broker.region.Queue.doMessageSend(Queue.java:785)
        at org.apache.activemq.broker.region.Queue.send(Queue.java:707)
        at org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:407)
        at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:503)
        at org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:305)
        at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:129)
        at org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:96)
        at org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:306)
        at org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:135)
        at org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:453)
        at org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:681)
        at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
        at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
        at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:116)
        at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
        at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:231)
        at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122)
        at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:680)
        Caused by: java.util.ConcurrentModificationException
        at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
        at java.util.HashMap$KeyIterator.next(HashMap.java:828)
        at org.apache.activemq.util.MarshallingSupport.marshalPrimitiveMap(MarshallingSupport.java:64)
        at org.apache.activemq.command.Message.beforeMarshall(Message.java:210)
        at org.apache.activemq.command.ActiveMQObjectMessage.beforeMarshall(ActiveMQObjectMessage.java:199)
        at org.apache.activemq.openwire.v6.MessageMarshaller.looseMarshal(MessageMarshaller.java:277)
        at org.apache.activemq.openwire.v6.ActiveMQMessageMarshaller.looseMarshal(ActiveMQMessageMarshaller.java:111)
        at org.apache.activemq.openwire.v6.ActiveMQObjectMessageMarshaller.looseMarshal(ActiveMQObjectMessageMarshaller.java:111)
        at org.apache.activemq.openwire.OpenWireFormat.marshal(OpenWireFormat.java:168)
        at org.apache.activemq.store.kahadb.KahaDBStore$KahaDBMessageStore.addMessage(KahaDBStore.java:429)
        at org.apache.activemq.store.kahadb.KahaDBStore$StoreQueueTask.run(KahaDBStore.java:1177)
        ... 3 more
        Gary Tully made changes -
        Fix Version/s 5.9.0 [ 12323932 ]
        Gary Tully made changes -
        Assignee Gary Tully [ gtully ]
        Gary Tully made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Gary Tully
            Reporter:
            Ben O'Day
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development