Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-73

NPE in RootResourceIterator

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 8.0.0.Alpha1
    • None
    • JMX, Management
    • None

    Description

      Intermittent testsuite failures, e.g.

      http://lightning.mw.lab.eng.bos.redhat.com/jenkins/job/as7-param-pull/6845/testReport/junit/org.jboss.as.test.integration.osgi.deployment/BundleUninstallTestCase/testActiveJarUninstall/

      Log shows this repeatedly:

      18: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]

      RootResourceIterator.doIterate is reading the resource twice:

                        for (ResourceEntry entry : current.getChildren(type)) {
                              final PathElement pathElement = entry.getPathElement();
                              final Resource child = current.getChild(pathElement); //  why this call since "entry" and "child" should be the same object
                              final PathAddress childAddress = address.append(pathElement);
                              doIterate(child, childAddress);
                          }
      

      The problem is "child" is null, which is possible with a dynamic resource. So, either "entry" should be used, or, if there is some reason for the 2nd read, a check for null is needed before the recursive doIterate call.

      Attachments

        Activity

          People

            bstansbe@redhat.com Brian Stansberry
            bstansbe@redhat.com Brian Stansberry
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: