[ https://issues.apache.org/jira/browse/ARTEMIS-5598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Justin Bertram updated ARTEMIS-5598: ------------------------------------ Description: There is a race condition in {{ServerConsumerImpl}} involving {{callback}} which can result in a {{NullPointerException}}, e.g.: {noformat} java.lang.NullPointerException at org.apache.activemq.artemis.core.server.impl.ServerConsumerImpl.proceedDeliver(ServerConsumerImpl.java:532) at org.apache.activemq.artemis.core.server.impl.ServerConsumerImpl$BrowserDeliverer.run(ServerConsumerImpl.java:1488) at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:57) at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:32) at org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:68) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118){noformat} The race happens when a message is being delivered at the same time the consumer is closed. was: There is a race condition in {{ServerConsumerImpl}} involving {{callback}} which can result in a {{NullPointerException}}, e.g.: {noformat} java.lang.NullPointerException at org.apache.activemq.artemis.core.server.impl.ServerConsumerImpl.proceedDeliver(ServerConsumerImpl.java:532) at org.apache.activemq.artemis.core.server.impl.ServerConsumerImpl$BrowserDeliverer.run(ServerConsumerImpl.java:1488) at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:57) at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:32) at org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:68) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118){noformat} > Mitigate race condition on ServerConsumer callback > -------------------------------------------------- > > Key: ARTEMIS-5598 > URL: https://issues.apache.org/jira/browse/ARTEMIS-5598 > Project: ActiveMQ Artemis > Issue Type: Bug > Reporter: Justin Bertram > Assignee: Justin Bertram > Priority: Major > > There is a race condition in {{ServerConsumerImpl}} involving {{callback}} > which can result in a {{NullPointerException}}, e.g.: > {noformat} > java.lang.NullPointerException > at > org.apache.activemq.artemis.core.server.impl.ServerConsumerImpl.proceedDeliver(ServerConsumerImpl.java:532) > at > org.apache.activemq.artemis.core.server.impl.ServerConsumerImpl$BrowserDeliverer.run(ServerConsumerImpl.java:1488) > at > org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:57) > at > org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:32) > at > org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:68) > at > java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) > at > java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) > at > org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118){noformat} > The race happens when a message is being delivered at the same time the > consumer is closed. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@activemq.apache.org For additional commands, e-mail: issues-h...@activemq.apache.org For further information, visit: https://activemq.apache.org/contact