java.io.IOException: rename C:\Jenkins\current\jobs\fo12_MainStream_R1X_development_path_Pilot_Workflow_003\builds\45\atomic7701129931116736150.tmp to C:\Jenkins\current\jobs\fo12_MainStream_R1X_development_path_Pilot_Workflow_003\builds\45\program.dat failed

Jenkins JIRA | 1 year ago
  1. 0

    Hello everyone, We are facing a "program state save failed" error which prevents the workflow from running the next steps. {code} Aug 24, 2015 1:18:27 PM org.jenkinsci.plugins.workflow.cps.CpsThreadGroup saveProgram WARNING: program state save failed java.io.IOException: rename C:\Jenkins\current\jobs\fo12_MainStream_R1X_development_path_Pilot_Workflow_003\builds\45\atomic7701129931116736150.tmp to C:\Jenkins\current\jobs\fo12_MainStream_R1X_development_path_Pilot_Workflow_003\builds\45\program.dat failed at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:350) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:328) at org.jenkinsci.plugins.workflow.cps.CpsStepContext$3.onSuccess(CpsStepContext.java:482) at org.jenkinsci.plugins.workflow.cps.CpsStepContext$3.onSuccess(CpsStepContext.java:478) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$4$1.run(CpsFlowExecution.java:546) at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.run(CpsVmExecutorService.java:32) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722) {code} This error can happen in different steps of the same Workflow, for example during creation of source-files from a model or during compilation. We did multiple tests to find-out possible reasons for this issue, by implementing a Workflow with these properties: - with and without stages, - with and without try-catch blocks, - using multiple node{} steps or a single one, - using multiple batch in a function or a single one, - adding sleep commands between the steps But the problem still persists. The Workflow is not stable in this case and we cannot use it for our project. We are using following environments and tools: - Windows 7 Professional 64-bit - Java: 1.7.0_15 - Jenkins: 1.609.1 - MKS Integrity Client 2009 EDIT: I tried to find out why the program.dat file could not be renamed by using Process monitor to monitor the builds directory of the job. I got the following information corresponding to the time where the error occured: Date: 24.08.2015 13:18:27,8099332 Thread: 8036 Class: File System Operation: SetRenameInformationFile Result: NAME COLLISION Path: C:\Jenkins\current\jobs\fo12_MainStream_R1X_development_path_Pilot_Workflow_003\builds\45\atomic7701129931116736150.tmp ReplaceIfExists; False FileName. C:\Jenkins\current\jobs\fo12_MainStream_R1X_development_path_Pilot_Workflow_003\builds\45\program.dat Thank you in advance for your help.

    Jenkins JIRA | 1 year ago
    java.io.IOException: rename C:\Jenkins\current\jobs\fo12_MainStream_R1X_development_path_Pilot_Workflow_003\builds\45\atomic7701129931116736150.tmp to C:\Jenkins\current\jobs\fo12_MainStream_R1X_development_path_Pilot_Workflow_003\builds\45\program.dat failed
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.io.IOException

      rename C:\Jenkins\current\jobs\fo12_MainStream_R1X_development_path_Pilot_Workflow_003\builds\45\atomic7701129931116736150.tmp to C:\Jenkins\current\jobs\fo12_MainStream_R1X_development_path_Pilot_Workflow_003\builds\45\program.dat failed

      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram()
    2. org.jenkinsci.plugins
      CpsVmExecutorService$1.run
      1. org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:350)
      2. org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:328)
      3. org.jenkinsci.plugins.workflow.cps.CpsStepContext$3.onSuccess(CpsStepContext.java:482)
      4. org.jenkinsci.plugins.workflow.cps.CpsStepContext$3.onSuccess(CpsStepContext.java:478)
      5. org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$4$1.run(CpsFlowExecution.java:546)
      6. org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.run(CpsVmExecutorService.java:32)
      6 frames
    3. Java RT
      FutureTask.run
      1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      2. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      3. java.util.concurrent.FutureTask.run(FutureTask.java:166)
      3 frames
    4. Hudson :: Remoting Layer
      SingleLaneExecutorService$1.run
      1. hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
      1 frame
    5. jenkins.util
      ContextResettingExecutorService$1.run
      1. jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      1 frame
    6. Java RT
      Thread.run
      1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      2. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      3. java.util.concurrent.FutureTask.run(FutureTask.java:166)
      4. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      5. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      6. java.lang.Thread.run(Thread.java:722)
      6 frames