You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/12/05 15:13:00 UTC

[jira] [Commented] (ARTEMIS-1526) ActiveMQServerControl.listConsumers() can fail with NullPointer

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

ASF subversion and git services commented on ARTEMIS-1526:
----------------------------------------------------------

Commit 7d61969795a9b55126818233903811bf6a1c30de in activemq-artemis's branch refs/heads/master from [~pgfox]
[ https://git-wip-us.apache.org/repos/asf?p=activemq-artemis.git;h=7d61969 ]

ARTEMIS-1526 race condition between listConsumers() and closing a Session. When session not found, ignore that consumer and continue.


> ActiveMQServerControl.listConsumers() can fail with NullPointer 
> ----------------------------------------------------------------
>
>                 Key: ARTEMIS-1526
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1526
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>    Affects Versions: 2.4.0
>            Reporter: Pat Fox
>            Priority: Minor
>
> race condition between ActiveMQServerControl.listConsumers() and closing client sessions can cause the following NullPointer 
> {code}
> java.lang.NullPointerException: null
> 	at org.apache.activemq.artemis.core.management.impl.view.ConsumerView.toJson(Unknown Source)
> 	at org.apache.activemq.artemis.core.management.impl.view.ConsumerView.toJson(Unknown Source)
> 	at org.apache.activemq.artemis.core.management.impl.view.ActiveMQAbstractView.getResultsAsJson(ActiveMQAbstractView.java:68)
> 	at org.apache.activemq.artemis.core.management.impl.ActiveMQServerControlImpl.listConsumers(ActiveMQServerControlImpl.java:1727)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:483)
> 	at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:483)
> 	at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
> 	at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112)
> 	at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46)
> 	at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237)
> 	at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
> {code}
> The ActiveMQServerControl.listConsumers() retrieves the associated ServerSession and this may be null if the session has been closed AFTER the listConsumers() has been called but BEFORE the session is retrieved.
>  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)