Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-1020

NPE in GlobalAddressHandlers

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.0.0.CR6
    • 1.0.0.Final, 1.0.1.Final, 2.0.0.CR5
    • Management
    • None

      I've seen stack traces like the following pop up in testsuite logs:

      2015-09-29 08:11:50,515 ERROR [org.jboss.as.controller.management-operation] (Host Controller Service Threads - 88) WFLYCTL0190: Step handler org.jboss.as.controller.operations.global.GlobalOperationHandlers$ModelAddressResolver$4@b4ea88 for operation {"operation" => "read-resource","address" => [("host" => "slave"),("server" => "main-three")],"operation-headers" => {"caller-type" => "user","access-mechanism" => "NATIVE","domain-uuid" => "5352863e-b467-4d70-b0b1-fa640cc022a1"}} at address [
          ("host" => "slave"),
          ("server" => "main-three")
      ] failed handling operation rollback -- java.lang.NullPointerException: java.lang.NullPointerException
      	at org.jboss.as.controller.operations.global.GlobalOperationHandlers$ModelAddressResolver$4$1.handleResult(GlobalOperationHandlers.java:708)
      	at org.jboss.as.controller.AbstractOperationContext$Step.invokeResultHandler(AbstractOperationContext.java:1384)
      	at org.jboss.as.controller.AbstractOperationContext$Step.handleResult(AbstractOperationContext.java:1366)
      	at org.jboss.as.controller.AbstractOperationContext$Step.finalizeInternal(AbstractOperationContext.java:1328)
      	at org.jboss.as.controller.AbstractOperationContext$Step.finalizeStep(AbstractOperationContext.java:1311)
      	at org.jboss.as.controller.AbstractOperationContext$Step.access$300(AbstractOperationContext.java:1185)
      	at org.jboss.as.controller.AbstractOperationContext.executeResultHandlerPhase(AbstractOperationContext.java:767)
      	at org.jboss.as.controller.AbstractOperationContext.executeDoneStage(AbstractOperationContext.java:753)
      	at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:680)
      	at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:370)
      	at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1336)
      	at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:391)
      	at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:217)
      	at org.jboss.as.controller.remote.TransactionalProtocolOperationHandler.internalExecute(TransactionalProtocolOperationHandler.java:233)
      	at org.jboss.as.controller.remote.TransactionalProtocolOperationHandler$ExecuteRequestHandler.doExecute(TransactionalProtocolOperationHandler.java:173)
      	at org.jboss.as.controller.remote.TransactionalProtocolOperationHandler$ExecuteRequestHandler$1.run(TransactionalProtocolOperationHandler.java:136)
      	at org.jboss.as.controller.remote.TransactionalProtocolOperationHandler$ExecuteRequestHandler$1.run(TransactionalProtocolOperationHandler.java:132)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at javax.security.auth.Subject.doAs(Subject.java:360)
      	at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:81)
      	at org.jboss.as.controller.remote.TransactionalProtocolOperationHandler$ExecuteRequestHandler$2$1.run(TransactionalProtocolOperationHandler.java:152)
      	at org.jboss.as.controller.remote.TransactionalProtocolOperationHandler$ExecuteRequestHandler$2$1.run(TransactionalProtocolOperationHandler.java:148)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at org.jboss.as.controller.remote.TransactionalProtocolOperationHandler$ExecuteRequestHandler$2.execute(TransactionalProtocolOperationHandler.java:148)
      	at org.jboss.as.protocol.mgmt.AbstractMessageHandler$2$1.doExecute(AbstractMessageHandler.java:299)
      	at org.jboss.as.protocol.mgmt.AbstractMessageHandler$AsyncTaskRunner.run(AbstractMessageHandler.java:519)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      	at org.jboss.threads.JBossThread.run(JBossThread.java:320)
      

      There's a call to ModelNode.remove("access-control") and then the return value is dereferenced without a null check. The "remove" method may return null.

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

                Created:
                Updated:
                Resolved: