-
Bug
-
Resolution: Duplicate
-
Critical
-
AMQ 7.8.4.GA, AMQ 7.10.0.GA
-
None
-
False
-
None
-
False
-
-
OperationContext should be logged for auditing purposes due to concurrency. Can't be synchronized due to major performance impact and it's better to remove it.
Original description:
In an environment with 2 brokers connected via AMQP Bridge, with a producer sending messages to the upstream broker via openwire, we are seeing an initial ConcurrentModificationException, as below:
2022-08-23 16:32:02,909 ERROR [org.apache.activemq.artemis.core.server] error init session: java.util.ConcurrentModificationException at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:966) [rt.jar:1.8.0_322] at java.util.LinkedList$ListItr.next(LinkedList.java:888) [rt.jar:1.8.0_322] at org.apache.activemq.artemis.core.persistence.impl.journal.OperationContextImpl.toString(OperationContextImpl.java:391) [artemis-server-2.16.0.redhat-00036.jar:2.16.0.redhat-00036] at java.lang.String.valueOf(String.java:2994) [rt.jar:1.8.0_322] at java.util.Arrays.toString(Arrays.java:4571) [rt.jar:1.8.0_322] at org.apache.activemq.artemis.logs.AuditLogger.arrayToString(AuditLogger.java:151) [artemis-commons-2.16.0.redhat-00036.jar:2.16.0.redhat-00036] at org.apache.activemq.artemis.logs.AuditLogger.createCoreSession(AuditLogger.java:2296) [artemis-commons-2.16.0.redhat-00036.jar:2.16.0.redhat-00036] at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.createSession(ActiveMQServerImpl.java:1682) [artemis-server-2.16.0.redhat-00036.jar:2.16.0.redhat-00036] at org.apache.activemq.artemis.core.protocol.openwire.amq.AMQSession.initialize(AMQSession.java:133) [artemis-openwire-protocol-2.16.0.redhat-00036.jar:2.16.0.redhat-00036] at org.apache.activemq.artemis.core.protocol.openwire.OpenWireConnection.addSession(OpenWireConnection.java:1090) [artemis-openwire-protocol-2.16.0.redhat-00036.jar:2.16.0.redhat-00036] at org.apache.activemq.artemis.core.protocol.openwire.OpenWireConnection$CommandProcessor.processAddSession(OpenWireConnection.java:1444) [artemis-openwire-protocol-2.16.0.redhat-00036.jar:2.16.0.redhat-00036] at org.apache.activemq.command.SessionInfo.visit(SessionInfo.java:66) [activemq-client-5.11.0.redhat-630515.jar:5.11.0.redhat-630515] at org.apache.activemq.artemis.core.protocol.openwire.OpenWireConnection.act(OpenWireConnection.java:365) [artemis-openwire-protocol-2.16.0.redhat-00036.jar:2.16.0.redhat-00036] at org.apache.activemq.artemis.utils.actors.ThresholdActor.doTask(ThresholdActor.java:67) [artemis-commons-2.16.0.redhat-00036.jar:2.16.0.redhat-00036] at org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:65) [artemis-commons-2.16.0.redhat-00036.jar:2.16.0.redhat-00036] at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:42) [artemis-commons-2.16.0.redhat-00036.jar:2.16.0.redhat-00036] at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:31) [artemis-commons-2.16.0.redhat-00036.jar:2.16.0.redhat-00036] at org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:65) [artemis-commons-2.16.0.redhat-00036.jar:2.16.0.redhat-00036] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_322] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_322] at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118) [artemis-commons-2.16.0.redhat-00036.jar:2.16.0.redhat-00036]
Following this, we see a NullPointerException:
2022-08-23 16:32:02,935 WARN [org.apache.activemq.artemis.core.server] Errors occurred during the buffering operation : java.lang.NullPointerException at org.apache.activemq.artemis.core.protocol.openwire.OpenWireConnection.addSession(OpenWireConnection.java:1093) [artemis-openwire-protocol-2.16.0.redhat-00036.jar:2.16.0.redhat-00036] at org.apache.activemq.artemis.core.protocol.openwire.OpenWireConnection$CommandProcessor.processAddSession(OpenWireConnection.java:1444) [artemis-openwire-protocol-2.16.0.redhat-00036.jar:2.16.0.redhat-00036] at org.apache.activemq.command.SessionInfo.visit(SessionInfo.java:66) [activemq-client-5.11.0.redhat-630515.jar:5.11.0.redhat-630515] at org.apache.activemq.artemis.core.protocol.openwire.OpenWireConnection.act(OpenWireConnection.java:365) [artemis-openwire-protocol-2.16.0.redhat-00036.jar:2.16.0.redhat-00036] at org.apache.activemq.artemis.utils.actors.ThresholdActor.doTask(ThresholdActor.java:67) [artemis-commons-2.16.0.redhat-00036.jar:2.16.0.redhat-00036] at org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:65) [artemis-commons-2.16.0.redhat-00036.jar:2.16.0.redhat-00036] at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:42) [artemis-commons-2.16.0.redhat-00036.jar:2.16.0.redhat-00036] at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:31) [artemis-commons-2.16.0.redhat-00036.jar:2.16.0.redhat-00036] at org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:65) [artemis-commons-2.16.0.redhat-00036.jar:2.16.0.redhat-00036] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_322] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_322] at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118) [artemis-commons-2.16.0.redhat-00036.jar:2.16.0.redhat-00036]
Thereafter, we see repeated IllegalStateExceptions as in the related issue:
2022-08-23 16:32:02,938 WARN [org.apache.activemq.artemis.core.server] Errors occurred during the buffering operation : javax.jms.IllegalStateException: Cannot add a producer to a session that had not been registered: ID:erps0jb02.dbag.prod-40587-1661192832995-3:1:345 at org.apache.activemq.artemis.core.protocol.openwire.OpenWireConnection$CommandProcessor.processAddProducer(OpenWireConnection.java:1215) [artemis-openwire-protocol-2.16.0.redhat-00036.jar:2.16.0.redhat-00036] at org.apache.activemq.command.ProducerInfo.visit(ProducerInfo.java:108) [activemq-client-5.11.0.redhat-630515.jar:5.11.0.redhat-630515] at org.apache.activemq.artemis.core.protocol.openwire.OpenWireConnection.act(OpenWireConnection.java:365) [artemis-openwire-protocol-2.16.0.redhat-00036.jar:2.16.0.redhat-00036] at org.apache.activemq.artemis.utils.actors.ThresholdActor.doTask(ThresholdActor.java:67) [artemis-commons-2.16.0.redhat-00036.jar:2.16.0.redhat-00036] at org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:65) [artemis-commons-2.16.0.redhat-00036.jar:2.16.0.redhat-00036] at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:42) [artemis-commons-2.16.0.redhat-00036.jar:2.16.0.redhat-00036] at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:31) [artemis-commons-2.16.0.redhat-00036.jar:2.16.0.redhat-00036] at org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:65) [artemis-commons-2.16.0.redhat-00036.jar:2.16.0.redhat-00036] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_322] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_322] at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118) [artemis-commons-2.16.0.redhat-00036.jar:2.16.0.redhat-00036]
- clones
-
ENTMQBR-7067 [Possible Regression] Errors occurred during the buffering operation : javax.jms.IllegalStateException: Cannot add a producer to a connection that had not been registered:
- Closed
- relates to
-
ENTMQBR-5960 [LTS] Errors occurred during the buffering operation : javax.jms.IllegalStateException: Cannot add a producer to a connection that had not been registered:
- Closed