Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-55174

Pipeline: Support. NPE in build state marshalling

    Details

    • Similar Issues:
    • Released As:
      workflow-support 3.0

      Description

      While testing config-file-provider plugin on PCT, setting the dependency to workflow-support 3.0-java11-alpha-1, I discovered an NPE on the marshalling

      java.lang.NullPointerException at com.cloudbees.groovy.cps.SerializableScript.readObject(SerializableScript.java:31) at org.jboss.marshalling.reflect.JDKSpecific$SerMethods.callReadObject(JDKSpecific.java:100) at org.jboss.marshalling.reflect.SerializableClass.callReadObject(SerializableClass.java:212) at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1742) at
      

       

      Full log:

      hudson.remoting.ProxyException: an exception which occurred:hudson.remoting.ProxyException: an exception which occurred: in object of type WorkflowScript in field groovy.lang.Closure.delegate in object org.jenkinsci.plugins.workflow.cps.CpsClosure2@73fa5905 in object of type org.jenkinsci.plugins.workflow.cps.CpsClosure2 in object of type java.util.HashMap in field org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.closures in object org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@63ea2c01 in object of type org.jenkinsci.plugins.workflow.cps.CpsThreadGroupCaused: hudson.remoting.ProxyException: java.lang.NullPointerException at com.cloudbees.groovy.cps.SerializableScript.readObject(SerializableScript.java:31) at org.jboss.marshalling.reflect.JDKSpecific$SerMethods.callReadObject(JDKSpecific.java:100) at org.jboss.marshalling.reflect.SerializableClass.callReadObject(SerializableClass.java:212) at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1742) at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1711) at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1711) at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1391) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:220) at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1849) at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1763) at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1711) at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1711) at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1391) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272) at org.jboss.marshalling.river.BlockUnmarshaller.readObject(BlockUnmarshaller.java:149) at org.jboss.marshalling.river.BlockUnmarshaller.readObject(BlockUnmarshaller.java:135) at org.jboss.marshalling.MarshallerObjectInputStream.readObjectOverride(MarshallerObjectInputStream.java:53) at org.jboss.marshalling.river.RiverObjectInputStream.readObjectOverride(RiverObjectInputStream.java:307) at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:424) at java.base/java.util.HashMap.readObject(HashMap.java:1460) at org.jboss.marshalling.reflect.JDKSpecific$SerMethods.callReadObject(JDKSpecific.java:100) at org.jboss.marshalling.reflect.SerializableClass.callReadObject(SerializableClass.java:212) at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1742) at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1391) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:220) at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1849) at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1763) at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1391) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:205) at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41) at org.jenkinsci.plugins.workflow.support.pickles.serialization.RiverReader$SandboxedUnmarshaller.lambda$readObject$0(RiverReader.java:250) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108) at org.jenkinsci.plugins.workflow.support.pickles.serialization.RiverReader$SandboxedUnmarshaller.sandbox(RiverReader.java:237) at org.jenkinsci.plugins.workflow.support.pickles.serialization.RiverReader$SandboxedUnmarshaller.readObject(RiverReader.java:250) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$2.onSuccess(CpsFlowExecution.java:627) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$2.onSuccess(CpsFlowExecution.java:620) at org.jenkinsci.plugins.workflow.support.concurrent.Futures$1.run(Futures.java:150) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149) at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:134) at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:170) at org.jenkinsci.plugins.workflow.support.concurrent.ChainingListenableFuture.access$000(ChainingListenableFuture.java:33) at org.jenkinsci.plugins.workflow.support.concurrent.ChainingListenableFuture$1.run(ChainingListenableFuture.java:196) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149) at com.google.common.util.concurrent.ExecutionList.add(ExecutionList.java:105) at com.google.common.util.concurrent.AbstractFuture.addListener(AbstractFuture.java:155) at org.jenkinsci.plugins.workflow.support.concurrent.ChainingListenableFuture.run(ChainingListenableFuture.java:189) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149) at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:134) at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:170) at org.jenkinsci.plugins.workflow.support.concurrent.ChainingListenableFuture.access$000(ChainingListenableFuture.java:33) at org.jenkinsci.plugins.workflow.support.concurrent.ChainingListenableFuture$1.run(ChainingListenableFuture.java:196) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149) at com.google.common.util.concurrent.ExecutionList.add(ExecutionList.java:105) at com.google.common.util.concurrent.AbstractFuture.addListener(AbstractFuture.java:155) at org.jenkinsci.plugins.workflow.support.concurrent.ChainingListenableFuture.run(ChainingListenableFuture.java:189) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149) at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:134) at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:170) at org.jenkinsci.plugins.workflow.support.concurrent.ListFuture.setOneValue(ListFuture.java:158) at org.jenkinsci.plugins.workflow.support.concurrent.ListFuture.access$000(ListFuture.java:40) at org.jenkinsci.plugins.workflow.support.concurrent.ListFuture$2.run(ListFuture.java:107) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149) at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:134) at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:170) at org.jenkinsci.plugins.workflow.support.concurrent.ChainingListenableFuture.access$000(ChainingListenableFuture.java:33) at org.jenkinsci.plugins.workflow.support.concurrent.ChainingListenableFuture$1.run(ChainingListenableFuture.java:196) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149) at com.google.common.util.concurrent.ExecutionList.add(ExecutionList.java:105) at com.google.common.util.concurrent.AbstractFuture.addListener(AbstractFuture.java:155) at org.jenkinsci.plugins.workflow.support.concurrent.ChainingListenableFuture.run(ChainingListenableFuture.java:189) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149) at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:134) at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:170) at org.jenkinsci.plugins.workflow.support.pickles.TryRepeatedly.access$500(TryRepeatedly.java:48) at org.jenkinsci.plugins.workflow.support.pickles.TryRepeatedly$1.run(TryRepeatedly.java:112) at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:58) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)Caused: hudson.remoting.ProxyException: java.io.IOException: Failed to load build state at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$3.onSuccess(CpsFlowExecution.java:699) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$3.onSuccess(CpsFlowExecution.java:697) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$4$1.run(CpsFlowExecution.java:746) at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.run(CpsVmExecutorService.java:35) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) 

        Attachments

          Issue Links

            Activity

            alecharp Adrien Lecharpentier created issue -
            oleg_nenashev Oleg Nenashev made changes -
            Field Original Value New Value
            Description While testing {{config-file-provider}} plugin on PCT, setting the dependency to {{workflow-support}} {{3.0-java11-alpha-1}}, I discovered an {{NPE}} on the marshalling
            {noformat}
            hudson.remoting.ProxyException: an exception which occurred:hudson.remoting.ProxyException: an exception which occurred: in object of type WorkflowScript in field groovy.lang.Closure.delegate in object org.jenkinsci.plugins.workflow.cps.CpsClosure2@73fa5905 in object of type org.jenkinsci.plugins.workflow.cps.CpsClosure2 in object of type java.util.HashMap in field org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.closures in object org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@63ea2c01 in object of type org.jenkinsci.plugins.workflow.cps.CpsThreadGroupCaused: hudson.remoting.ProxyException: java.lang.NullPointerException at com.cloudbees.groovy.cps.SerializableScript.readObject(SerializableScript.java:31) at org.jboss.marshalling.reflect.JDKSpecific$SerMethods.callReadObject(JDKSpecific.java:100) at org.jboss.marshalling.reflect.SerializableClass.callReadObject(SerializableClass.java:212) at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1742) at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1711) at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1711) at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1391) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:220) at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1849) at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1763) at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1711) at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1711) at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1391) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272) at org.jboss.marshalling.river.BlockUnmarshaller.readObject(BlockUnmarshaller.java:149) at org.jboss.marshalling.river.BlockUnmarshaller.readObject(BlockUnmarshaller.java:135) at org.jboss.marshalling.MarshallerObjectInputStream.readObjectOverride(MarshallerObjectInputStream.java:53) at org.jboss.marshalling.river.RiverObjectInputStream.readObjectOverride(RiverObjectInputStream.java:307) at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:424) at java.base/java.util.HashMap.readObject(HashMap.java:1460) at org.jboss.marshalling.reflect.JDKSpecific$SerMethods.callReadObject(JDKSpecific.java:100) at org.jboss.marshalling.reflect.SerializableClass.callReadObject(SerializableClass.java:212) at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1742) at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1391) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:220) at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1849) at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1763) at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1391) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:205) at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41) at org.jenkinsci.plugins.workflow.support.pickles.serialization.RiverReader$SandboxedUnmarshaller.lambda$readObject$0(RiverReader.java:250) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108) at org.jenkinsci.plugins.workflow.support.pickles.serialization.RiverReader$SandboxedUnmarshaller.sandbox(RiverReader.java:237) at org.jenkinsci.plugins.workflow.support.pickles.serialization.RiverReader$SandboxedUnmarshaller.readObject(RiverReader.java:250) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$2.onSuccess(CpsFlowExecution.java:627) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$2.onSuccess(CpsFlowExecution.java:620) at org.jenkinsci.plugins.workflow.support.concurrent.Futures$1.run(Futures.java:150) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149) at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:134) at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:170) at org.jenkinsci.plugins.workflow.support.concurrent.ChainingListenableFuture.access$000(ChainingListenableFuture.java:33) at org.jenkinsci.plugins.workflow.support.concurrent.ChainingListenableFuture$1.run(ChainingListenableFuture.java:196) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149) at com.google.common.util.concurrent.ExecutionList.add(ExecutionList.java:105) at com.google.common.util.concurrent.AbstractFuture.addListener(AbstractFuture.java:155) at org.jenkinsci.plugins.workflow.support.concurrent.ChainingListenableFuture.run(ChainingListenableFuture.java:189) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149) at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:134) at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:170) at org.jenkinsci.plugins.workflow.support.concurrent.ChainingListenableFuture.access$000(ChainingListenableFuture.java:33) at org.jenkinsci.plugins.workflow.support.concurrent.ChainingListenableFuture$1.run(ChainingListenableFuture.java:196) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149) at com.google.common.util.concurrent.ExecutionList.add(ExecutionList.java:105) at com.google.common.util.concurrent.AbstractFuture.addListener(AbstractFuture.java:155) at org.jenkinsci.plugins.workflow.support.concurrent.ChainingListenableFuture.run(ChainingListenableFuture.java:189) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149) at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:134) at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:170) at org.jenkinsci.plugins.workflow.support.concurrent.ListFuture.setOneValue(ListFuture.java:158) at org.jenkinsci.plugins.workflow.support.concurrent.ListFuture.access$000(ListFuture.java:40) at org.jenkinsci.plugins.workflow.support.concurrent.ListFuture$2.run(ListFuture.java:107) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149) at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:134) at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:170) at org.jenkinsci.plugins.workflow.support.concurrent.ChainingListenableFuture.access$000(ChainingListenableFuture.java:33) at org.jenkinsci.plugins.workflow.support.concurrent.ChainingListenableFuture$1.run(ChainingListenableFuture.java:196) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149) at com.google.common.util.concurrent.ExecutionList.add(ExecutionList.java:105) at com.google.common.util.concurrent.AbstractFuture.addListener(AbstractFuture.java:155) at org.jenkinsci.plugins.workflow.support.concurrent.ChainingListenableFuture.run(ChainingListenableFuture.java:189) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149) at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:134) at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:170) at org.jenkinsci.plugins.workflow.support.pickles.TryRepeatedly.access$500(TryRepeatedly.java:48) at org.jenkinsci.plugins.workflow.support.pickles.TryRepeatedly$1.run(TryRepeatedly.java:112) at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:58) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)Caused: hudson.remoting.ProxyException: java.io.IOException: Failed to load build state at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$3.onSuccess(CpsFlowExecution.java:699) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$3.onSuccess(CpsFlowExecution.java:697) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$4$1.run(CpsFlowExecution.java:746) at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.run(CpsVmExecutorService.java:35) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) {noformat}
            While testing {{config-file-provider}} plugin on PCT, setting the dependency to {{workflow-support}} {{3.0-java11-alpha-1}}, I discovered an {{NPE}} on the marshalling
            {code:java}
            java.lang.NullPointerException at com.cloudbees.groovy.cps.SerializableScript.readObject(SerializableScript.java:31) at org.jboss.marshalling.reflect.JDKSpecific$SerMethods.callReadObject(JDKSpecific.java:100) at org.jboss.marshalling.reflect.SerializableClass.callReadObject(SerializableClass.java:212) at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1742) at
            {code}
             

            Full log:
            {noformat}
            hudson.remoting.ProxyException: an exception which occurred:hudson.remoting.ProxyException: an exception which occurred: in object of type WorkflowScript in field groovy.lang.Closure.delegate in object org.jenkinsci.plugins.workflow.cps.CpsClosure2@73fa5905 in object of type org.jenkinsci.plugins.workflow.cps.CpsClosure2 in object of type java.util.HashMap in field org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.closures in object org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@63ea2c01 in object of type org.jenkinsci.plugins.workflow.cps.CpsThreadGroupCaused: hudson.remoting.ProxyException: java.lang.NullPointerException at com.cloudbees.groovy.cps.SerializableScript.readObject(SerializableScript.java:31) at org.jboss.marshalling.reflect.JDKSpecific$SerMethods.callReadObject(JDKSpecific.java:100) at org.jboss.marshalling.reflect.SerializableClass.callReadObject(SerializableClass.java:212) at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1742) at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1711) at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1711) at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1391) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:220) at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1849) at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1763) at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1711) at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1711) at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1391) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272) at org.jboss.marshalling.river.BlockUnmarshaller.readObject(BlockUnmarshaller.java:149) at org.jboss.marshalling.river.BlockUnmarshaller.readObject(BlockUnmarshaller.java:135) at org.jboss.marshalling.MarshallerObjectInputStream.readObjectOverride(MarshallerObjectInputStream.java:53) at org.jboss.marshalling.river.RiverObjectInputStream.readObjectOverride(RiverObjectInputStream.java:307) at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:424) at java.base/java.util.HashMap.readObject(HashMap.java:1460) at org.jboss.marshalling.reflect.JDKSpecific$SerMethods.callReadObject(JDKSpecific.java:100) at org.jboss.marshalling.reflect.SerializableClass.callReadObject(SerializableClass.java:212) at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1742) at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1391) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:220) at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1849) at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1763) at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1391) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272) at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:205) at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41) at org.jenkinsci.plugins.workflow.support.pickles.serialization.RiverReader$SandboxedUnmarshaller.lambda$readObject$0(RiverReader.java:250) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108) at org.jenkinsci.plugins.workflow.support.pickles.serialization.RiverReader$SandboxedUnmarshaller.sandbox(RiverReader.java:237) at org.jenkinsci.plugins.workflow.support.pickles.serialization.RiverReader$SandboxedUnmarshaller.readObject(RiverReader.java:250) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$2.onSuccess(CpsFlowExecution.java:627) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$2.onSuccess(CpsFlowExecution.java:620) at org.jenkinsci.plugins.workflow.support.concurrent.Futures$1.run(Futures.java:150) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149) at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:134) at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:170) at org.jenkinsci.plugins.workflow.support.concurrent.ChainingListenableFuture.access$000(ChainingListenableFuture.java:33) at org.jenkinsci.plugins.workflow.support.concurrent.ChainingListenableFuture$1.run(ChainingListenableFuture.java:196) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149) at com.google.common.util.concurrent.ExecutionList.add(ExecutionList.java:105) at com.google.common.util.concurrent.AbstractFuture.addListener(AbstractFuture.java:155) at org.jenkinsci.plugins.workflow.support.concurrent.ChainingListenableFuture.run(ChainingListenableFuture.java:189) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149) at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:134) at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:170) at org.jenkinsci.plugins.workflow.support.concurrent.ChainingListenableFuture.access$000(ChainingListenableFuture.java:33) at org.jenkinsci.plugins.workflow.support.concurrent.ChainingListenableFuture$1.run(ChainingListenableFuture.java:196) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149) at com.google.common.util.concurrent.ExecutionList.add(ExecutionList.java:105) at com.google.common.util.concurrent.AbstractFuture.addListener(AbstractFuture.java:155) at org.jenkinsci.plugins.workflow.support.concurrent.ChainingListenableFuture.run(ChainingListenableFuture.java:189) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149) at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:134) at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:170) at org.jenkinsci.plugins.workflow.support.concurrent.ListFuture.setOneValue(ListFuture.java:158) at org.jenkinsci.plugins.workflow.support.concurrent.ListFuture.access$000(ListFuture.java:40) at org.jenkinsci.plugins.workflow.support.concurrent.ListFuture$2.run(ListFuture.java:107) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149) at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:134) at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:170) at org.jenkinsci.plugins.workflow.support.concurrent.ChainingListenableFuture.access$000(ChainingListenableFuture.java:33) at org.jenkinsci.plugins.workflow.support.concurrent.ChainingListenableFuture$1.run(ChainingListenableFuture.java:196) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149) at com.google.common.util.concurrent.ExecutionList.add(ExecutionList.java:105) at com.google.common.util.concurrent.AbstractFuture.addListener(AbstractFuture.java:155) at org.jenkinsci.plugins.workflow.support.concurrent.ChainingListenableFuture.run(ChainingListenableFuture.java:189) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149) at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:134) at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:170) at org.jenkinsci.plugins.workflow.support.pickles.TryRepeatedly.access$500(TryRepeatedly.java:48) at org.jenkinsci.plugins.workflow.support.pickles.TryRepeatedly$1.run(TryRepeatedly.java:112) at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:58) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)Caused: hudson.remoting.ProxyException: java.io.IOException: Failed to load build state at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$3.onSuccess(CpsFlowExecution.java:699) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$3.onSuccess(CpsFlowExecution.java:697) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$4$1.run(CpsFlowExecution.java:746) at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.run(CpsVmExecutorService.java:35) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) {noformat}
            oleg_nenashev Oleg Nenashev made changes -
            Labels java11
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            I believe this is the same issue as Sam Van Oort trying to fix for the GA release. It was reported for tests in https://github.com/jenkinsci/workflow-support-plugin/pull/84 

            Show
            oleg_nenashev Oleg Nenashev added a comment - I believe this is the same issue as Sam Van Oort trying to fix for the GA release. It was reported for tests in https://github.com/jenkinsci/workflow-support-plugin/pull/84  
            oleg_nenashev Oleg Nenashev made changes -
            Epic Link JENKINS-51805 [ 191255 ]
            oleg_nenashev Oleg Nenashev made changes -
            Labels java11 java11 java11-compatibility
            svanoort Sam Van Oort made changes -
            Assignee Sam Van Oort [ svanoort ]
            Hide
            svanoort Sam Van Oort added a comment -

            Oleg Nenashev Yup, that's the very same bugbear that's had me pulling out my hair for a while now. Right now I'm working on an alternate way of debugging it.

            Show
            svanoort Sam Van Oort added a comment - Oleg Nenashev Yup, that's the very same bugbear that's had me pulling out my hair for a while now. Right now I'm working on an alternate way of debugging it.
            svanoort Sam Van Oort made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            svanoort Sam Van Oort made changes -
            svanoort Sam Van Oort made changes -
            Hide
            svanoort Sam Van Oort added a comment -

            Writing up results of pair-investigation with Devin Nusbaum today and summarizing some previous findings

            0. I'd previously established that the culprit here is a null "binding" field in the WorkflowScript when deserializing, and had not been able to determine how the setting of that field differs between JBoss Marshalling versions
            1. This issue appears to occur with even very trivial Pipelines when trying to read the program.dat – see: https://github.com/svanoort/workflow-support-plugin/commit/60dff8f944407a46e70f1fcfc3843cf7da29d974#diff-5592588df61e52ede2b60dbc65f7009bR56
            2. Some subtle differences in the serialization format between jboss-marshalling 1.4.12-jenkins-3 and 2.0.5.Final (I'd bisected the issue and confirmed it occurs as early as version 2.0.0 previously) – see attached program.dat files – but analyzing them briefly in a hex editor and via 'strings' does not show substantial differences. I.E. it's not like things simply aren't being serialized, the format is just modified to be a bit more efficient.
            3. Stack traces when trying to read the SerializableScript are attached – note that the stacks seem more or less identical, aside froma switch for Java version changes, and different line numbers due to source changes in JBoss marshalling
            4. Nothing obvious in the JBoss marshalling JIRA that would reflect this bug
            5. Nothing obvious jumping out in the commits for JBoss marshalling that have changed https://github.com/jboss-remoting/jboss-marshalling/compare/1.4.12.Final...2.0.0.Final

            See data dumps:
            jboss-NEW-marshaller-unmarshal-thread.txt jboss-old-marshaller-unmarshal-thread.txt test-java8-LEGACY-marshaller-program.dat test-java8-new-marshaller-program.dat

            Show
            svanoort Sam Van Oort added a comment - Writing up results of pair-investigation with Devin Nusbaum today and summarizing some previous findings 0. I'd previously established that the culprit here is a null "binding" field in the WorkflowScript when deserializing, and had not been able to determine how the setting of that field differs between JBoss Marshalling versions 1. This issue appears to occur with even very trivial Pipelines when trying to read the program.dat – see: https://github.com/svanoort/workflow-support-plugin/commit/60dff8f944407a46e70f1fcfc3843cf7da29d974#diff-5592588df61e52ede2b60dbc65f7009bR56 2. Some subtle differences in the serialization format between jboss-marshalling 1.4.12-jenkins-3 and 2.0.5.Final (I'd bisected the issue and confirmed it occurs as early as version 2.0.0 previously) – see attached program.dat files – but analyzing them briefly in a hex editor and via 'strings' does not show substantial differences. I.E. it's not like things simply aren't being serialized, the format is just modified to be a bit more efficient. 3. Stack traces when trying to read the SerializableScript are attached – note that the stacks seem more or less identical, aside froma switch for Java version changes, and different line numbers due to source changes in JBoss marshalling 4. Nothing obvious in the JBoss marshalling JIRA that would reflect this bug 5. Nothing obvious jumping out in the commits for JBoss marshalling that have changed https://github.com/jboss-remoting/jboss-marshalling/compare/1.4.12.Final...2.0.0.Final See data dumps: jboss-NEW-marshaller-unmarshal-thread.txt jboss-old-marshaller-unmarshal-thread.txt test-java8-LEGACY-marshaller-program.dat test-java8-new-marshaller-program.dat
            Hide
            svanoort Sam Van Oort added a comment -

            Oleg Nenashev I've attached a bunch of info from investigation above, but am running out of investigative ideas here aside from manually building and bisecting all the JBoss marshalling commits here, or tracing line-by-line through all the mutations of the SerialializableScript in the marshaller (I've done quite a bit of poking with the debugger & breakpoints here already).

            Would love to know if you have any ideas for how to attack this particular beast.

            Show
            svanoort Sam Van Oort added a comment - Oleg Nenashev I've attached a bunch of info from investigation above, but am running out of investigative ideas here aside from manually building and bisecting all the JBoss marshalling commits here, or tracing line-by-line through all the mutations of the SerialializableScript in the marshaller (I've done quite a bit of poking with the debugger & breakpoints here already). Would love to know if you have any ideas for how to attack this particular beast.
            Hide
            svanoort Sam Van Oort added a comment -

            My suspicion is that one of the following is the cause based on the evidence above:

            1. Unlikely: a very subtle change in the serialized format causes a net-new bug in JBoss Marshalling that prevents correct serialization.
            2. Likely: Some subtlety in how readReplace methods are being handled (perhaps with regards to customizations in workflow or Groovy) – or especially with regards to order of operations here. This is supported by limited differences in the serialized output.

            Show
            svanoort Sam Van Oort added a comment - My suspicion is that one of the following is the cause based on the evidence above: 1. Unlikely: a very subtle change in the serialized format causes a net-new bug in JBoss Marshalling that prevents correct serialization. 2. Likely: Some subtlety in how readReplace methods are being handled (perhaps with regards to customizations in workflow or Groovy) – or especially with regards to order of operations here. This is supported by limited differences in the serialized output.
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            At the yesterday's Platform SIG meeting we agreed to reach out to JBoss Marshalling maintainers. I also do not have much idea what could be the root cause.

            Show
            oleg_nenashev Oleg Nenashev added a comment - At the yesterday's Platform SIG meeting we agreed to reach out to JBoss Marshalling maintainers. I also do not have much idea what could be the root cause.
            oleg_nenashev Oleg Nenashev made changes -
            Summary NPE in build state marshalling NPE in build state marshallingPi
            oleg_nenashev Oleg Nenashev made changes -
            Summary NPE in build state marshallingPi Pipeline: Support. NPE in build state marshalling
            vivek Vivek Pandey made changes -
            Remote Link This issue links to "JBMAR-223 (Web Link)" [ 22121 ]
            batmat Baptiste Mathus made changes -
            Labels java11 java11-compatibility java11 java11-compatibility triaged
            Hide
            oleg_nenashev Oleg Nenashev added a comment -
            Show
            oleg_nenashev Oleg Nenashev added a comment - https://issues.jboss.org/browse/JBMAR-223  was created by Sam Van Oort  
            oleg_nenashev Oleg Nenashev made changes -
            Remote Link This issue links to "JBMAR-223 (Web Link)" [ 22126 ]
            Hide
            dnusbaum Devin Nusbaum added a comment - - edited

            I think our issue is a duplicate of JBMAR-221, which was fixed in JBoss Marshalling 2.0.6.Final. I've opened https://github.com/jenkinsci/workflow-support-plugin/pull/86 against the Java 11 branch to update the library and unignore the previously-failing tests.

            Show
            dnusbaum Devin Nusbaum added a comment - - edited I think our issue is a duplicate of JBMAR-221 , which was fixed in JBoss Marshalling 2.0.6.Final. I've opened https://github.com/jenkinsci/workflow-support-plugin/pull/86 against the Java 11 branch to update the library and unignore the previously-failing tests.
            dnusbaum Devin Nusbaum made changes -
            Remote Link This issue links to "jenkinsci/workflow-support-plugin#86 (Web Link)" [ 22127 ]
            dnusbaum Devin Nusbaum made changes -
            Remote Link This issue links to "JBMAR-221 (Web Link)" [ 22128 ]
            dnusbaum Devin Nusbaum made changes -
            Remote Link This issue links to "JBMAR-223 (Web Link)" [ 22126 ]
            markewaite Mark Waite made changes -
            Comment [ [~dnusbaum] did you actually open the pull request pointing to the jenkinsci-cert repo? I assume this is not security related, so should be opened against the jenkinsci repo instead. ]
            dnusbaum Devin Nusbaum made changes -
            Link This issue is duplicated by JENKINS-55338 [ JENKINS-55338 ]
            dnusbaum Devin Nusbaum made changes -
            Comment [ No, I just copied-and-pasted the wrong link, thanks for catching it! ]
            dnusbaum Devin Nusbaum made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            dnusbaum Devin Nusbaum made changes -
            Link This issue blocks JENKINS-52187 [ JENKINS-52187 ]
            Hide
            dnusbaum Devin Nusbaum added a comment -

            Fixed in version 3.0 of Pipeline Supporting APIs Plugin.

            Show
            dnusbaum Devin Nusbaum added a comment - Fixed in version 3.0 of Pipeline Supporting APIs Plugin.
            dnusbaum Devin Nusbaum made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            Released As workflow-support 3.0

              People

              • Assignee:
                svanoort Sam Van Oort
                Reporter:
                alecharp Adrien Lecharpentier
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: