Bug 1185118

Summary: [GSS](6.4.0) random NPE in RootResourceIterator
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Brad Maxwell <bmaxwell>
Component: JMXAssignee: Brad Maxwell <bmaxwell>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Martiska <jmartisk>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3.2CC: brian.stansberry, cdewolf, hrupp, jmartisk, joallen, kkhan, myarboro
Target Milestone: ER2   
Target Release: EAP 6.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
In previous versions of JBoss EAP 6, the logic in the facade that exposes management resources as JMX MBeans made an unnecessary duplicate read of child resources. It was possible for this second read to return a null child if the resource was dynamic and could be removed due to non-management action (a resource for a temporary JMS queue added or removed by an application, for example). As a result, calling remote JMX server methods such as `getMBeanCount()` by remote clients could intermittently lead to random NullPointerExceptions with a log message similar to the following. [source,] ---- [0m[33m18:38:11,612 WARN [org.jboss.remotingjmx.protocol.v2.ServerCommon] (pool-2-thread-12) Unexpected internal error: java.lang.NullPointerException at org.jboss.as.jmx.model.RootResourceIterator.doIterate(RootResourceIterator.java:49) ---- In this release of the product, the duplicate read of child resources has been removed, with the value from the initial read (which will never be `null`) used. This ensures the NullPointerExceptions no longer occur.
Story Points: ---
Clone Of:
: 1344803 (view as bug list) Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1192181    
Bug Blocks: 1344803    

Description Brad Maxwell 2015-01-23 01:37:19 UTC
Calling remote JMX server method such as getMBeanCount() by several remote clients leads to random NullPointerExceptions on the server side such as: 

[0m[33m18:38:11,612 WARN  [org.jboss.remotingjmx.protocol.v2.ServerCommon] (pool-2-thread-12) Unexpected internal error: java.lang.NullPointerException
   at org.jboss.as.jmx.model.RootResourceIterator.doIterate(RootResourceIterator.java:49)
   at org.jboss.as.jmx.model.RootResourceIterator.doIterate(RootResourceIterator.java:55)
   at org.jboss.as.jmx.model.RootResourceIterator.doIterate(RootResourceIterator.java:55)
   at org.jboss.as.jmx.model.RootResourceIterator.iterate(RootResourceIterator.java:39)
   at org.jboss.as.jmx.model.ModelControllerMBeanHelper.getMBeanCount(ModelControllerMBeanHelper.java:103)
   at org.jboss.as.jmx.model.ModelControllerMBeanServerPlugin.getMBeanCount(ModelControllerMBeanServerPlugin.java:116)
   at org.jboss.as.jmx.PluggableMBeanServerImpl.getMBeanCount(PluggableMBeanServerImpl.java:220)
   at org.jboss.remotingjmx.protocol.v2.ServerProxy$GetMBeanCountHandler.handle(ServerProxy.java:618)
   at org.jboss.remotingjmx.protocol.v2.ServerCommon$MessageReciever$1.run(ServerCommon.java:152)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_13]
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_13]
   at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_13]

Comment 6 Jan Martiska 2015-02-13 08:10:09 UTC
Given that the newly found NPE is tracked under BZ 1192181, closing this. The original NPE is fixed in EAP 6.4.0.ER2.