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

Deserialization error of ExecutorStepExecution

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • pipeline
    • None

      I started a workflow which began with a node step which was waiting for an executor slot, then restarted Jenkins. After restart the flow failed:

      Started by user anonymous
      Running: Allocate node : Start
      Still waiting to schedule task
      Waiting for next available executor on evarga-jenkins-slave
      Resuming build
      Resuming build
      Running: Allocate node : End
      Running: End of Workflow
      com.google.inject.ConfigurationException: Guice configuration errors:
      
      1) Could not find a suitable constructor in org.jenkinsci.plugins.workflow.support.steps.ExecutorStep. Classes must have either one (and only one) constructor annotated with @Inject or a zero-argument constructor that is not private.
        at org.jenkinsci.plugins.workflow.support.steps.ExecutorStep.class(ExecutorStep.java:63)
        while locating org.jenkinsci.plugins.workflow.support.steps.ExecutorStep
          for field at org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution.step(ExecutorStepExecution.java:57)
        while locating org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution
      
      1 error
      	at com.google.inject.internal.InjectorImpl.getMembersInjector(InjectorImpl.java:985)
      	at com.google.inject.internal.InjectorImpl.getMembersInjector(InjectorImpl.java:990)
      	at com.google.inject.internal.InjectorImpl.injectMembers(InjectorImpl.java:976)
      	at org.jenkinsci.plugins.workflow.steps.AbstractStepExecutionImpl.inject(AbstractStepExecutionImpl.java:35)
      	at org.jenkinsci.plugins.workflow.steps.AbstractStepExecutionImpl.onResume(AbstractStepExecutionImpl.java:30)
      	at org.jenkinsci.plugins.workflow.flow.FlowExecutionList$ItemListenerImpl$1.onSuccess(FlowExecutionList.java:171)
      	at org.jenkinsci.plugins.workflow.flow.FlowExecutionList$ItemListenerImpl$1.onSuccess(FlowExecutionList.java:167)
      	at com.google.common.util.concurrent.Futures$6.run(Futures.java:975)
      	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 com.google.common.util.concurrent.Futures.addCallback(Futures.java:985)
      	at com.google.common.util.concurrent.Futures.addCallback(Futures.java:915)
      	at org.jenkinsci.plugins.workflow.flow.FlowExecutionList$ItemListenerImpl.onLoaded(FlowExecutionList.java:167)
      	at jenkins.model.Jenkins.<init>(Jenkins.java:862)
      	at hudson.model.Hudson.<init>(Hudson.java:83)
      	at hudson.model.Hudson.<init>(Hudson.java:79)
      	at hudson.WebAppMain$3.run(WebAppMain.java:225)
      Finished: FAILURE
      

      Presumably

      @Inject private transient ExecutorStep step;
      

      should say

      @Inject(optional=true) private transient ExecutorStep step;
      

      though I wonder why this does not always break when restarting flows in the middle of node; perhaps the call to newBodyInvoker after the node has been allocated somehow prevents the problem?

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: