activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMQ-5426) ActiveMQMessageConsumer could run into NPE due to concurrent access to internal state
Date Tue, 05 Jul 2016 20:39:11 GMT

    [ https://issues.apache.org/jira/browse/AMQ-5426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15363188#comment-15363188
] 

ASF subversion and git services commented on AMQ-5426:
------------------------------------------------------

Commit c02bc648460059b6dbc201fa21b7ee0ce2445082 in activemq's branch refs/heads/master from
[~cshannon]
[ https://git-wip-us.apache.org/repos/asf?p=activemq.git;h=c02bc64 ]

https://issues.apache.org/jira/browse/AMQ-5426

Fixing a race condition in ActiveMQMessageConsumer that could cause a
NPE when the consumer is closing by only modifing pendingAck inside of
the deliveredMessagesMutex

Thanks to Michael Wong for providing the test case for this issue.


> ActiveMQMessageConsumer could run into NPE due to concurrent access to internal state
> -------------------------------------------------------------------------------------
>
>                 Key: AMQ-5426
>                 URL: https://issues.apache.org/jira/browse/AMQ-5426
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: JMS client
>    Affects Versions: 5.8.0, 5.9.1, 5.10.0
>            Reporter: Michael Wong
>            Assignee: Christopher L. Shannon
>            Priority: Minor
>             Fix For: 5.14.0, 5.13.4
>
>         Attachments: AMQ5426Test.java
>
>
> ActiveMQMessageConsumer could run into NPE when the consumer is closing and a message
arrived at the same time.
> Here is the stacktrace:
> java.lang.NullPointerException
> at org.apache.activemq.ActiveMQMessageConsumer.ackLater(ActiveMQMessageConsumer.java:979)
> at org.apache.activemq.ActiveMQMessageConsumer.afterMessageIsConsumed(ActiveMQMessageConsumer.java:929)
> at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1323)
> at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:131)
> at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:202)
> at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:129)
> at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:47)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message