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

AccessDeniedException from AtomicFileWriter.move (e.g., while fingerprinting) on Windows

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • Jenkins 2.492.2
      JDK Temurin-17.0.11+9
      Windows Server 2022
      Cisco Secure Endpoint

      After upgrading to 2.492.1 a lot of my jobs fail due to AccessViolations while creating the fingerprints.

      The fingerprint file is created but can not be updated. All files in "/fingerprint/" are created by the same user (Non-System-Account) so the "access" should be granted.

      The error seems to be some kind of race condition as some jobs are running fine after rerun, some do not, some do fail after success (without source change)

      After rollback to v2.479.3 everything works as intended. No AccessViolations.

          [JENKINS-75255] AccessDeniedException from AtomicFileWriter.move (e.g., while fingerprinting) on Windows

          Basil Crow added a comment -

          I wonder if this is related to https://github.com/jenkinsci/jenkins/pull/10058 which first shipped in 2.491 weekly and 2.492.1 LTS. Can someone try running with that change reverted, or compare and contrast the behavior between 2.490 and 2.491 to see if the problem started occurring then?

          Basil Crow added a comment - I wonder if this is related to https://github.com/jenkinsci/jenkins/pull/10058 which first shipped in 2.491 weekly and 2.492.1 LTS. Can someone try running with that change reverted, or compare and contrast the behavior between 2.490 and 2.491 to see if the problem started occurring then?

          Markus Winter added a comment -

          I'm pretty sure this is the issue.

          The initial try to move the file atomically (StandardCopyOption.ATOMIC_MOVE) fails with the AccessDeniedException. In the old code this then lead to retrying this with the option StandardCopyOption.REPLACE_EXISTING. In the new code this doesn't happen. It only retries this when the move threw AtomicMoveNotSupportedException and it will also do this only once.

          Due to file locking on windows by the Virus scanner the problem with the accessdenied can happen quite often, the retry then usually succeeds.

          Markus Winter added a comment - I'm pretty sure this is the issue. The initial try to move the file atomically (StandardCopyOption.ATOMIC_MOVE) fails with the AccessDeniedException. In the old code this then lead to retrying this with the option StandardCopyOption.REPLACE_EXISTING. In the new code this doesn't happen. It only retries this when the move threw AtomicMoveNotSupportedException and it will also do this only once. Due to file locking on windows by the Virus scanner the problem with the accessdenied can happen quite often, the retry then usually succeeds.

          Basil Crow added a comment -

          Basil Crow added a comment - vlatombe FYI

          The initial try to move the file atomically (StandardCopyOption.ATOMIC_MOVE) fails with the AccessDeniedException

          In that case a retry mechanism keeping the atomic move flag could work in such systems.

          Vincent Latombe added a comment - The initial try to move the file atomically (StandardCopyOption.ATOMIC_MOVE) fails with the AccessDeniedException In that case a retry mechanism keeping the atomic move flag could work in such systems.

          Jesse Glick added a comment -

          mawinter69 as a hotfix, can the virus scanner be asked to ignore the %JENKINS_HOME% directory? I imagine this was already affecting performance.

          Jesse Glick added a comment - mawinter69 as a hotfix, can the virus scanner be asked to ignore the %JENKINS_HOME% directory? I imagine this was already affecting performance.

          Jesse Glick added a comment -

          Somebody test an incremental build of https://github.com/jenkinsci/jenkins/pull/10271 ?

          Jesse Glick added a comment - Somebody test an incremental build of https://github.com/jenkinsci/jenkins/pull/10271 ?

          Mark Waite added a comment - - edited

          I've been unable to duplicate the problem with my local Windows 11 computer using Jenkins 2.492.1 freestyle projects that generate artifacts, fingerprint them, and archive them. I've attempted with jobs run on the controller and with jobs run on a separate Windows agent. I'm fingerprinting and archiving artifacts with the pattern '*/file-' and am copying artifacts from another job with a directory for each build. The batch commands that I'm using to generate the artifacts are like this:

          set > file-%JOB_BASE_NAME%.1
          date /T > file-%JOB_BASE_NAME%.2
          
          setlocal EnableDelayedExpansion
          set charSets=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*
          set count=0
          
          set /a countRaw=4+(%random%)%%20
          
          for /L %%c in (1,1,%countRaw%) do (call :MAKERANDOMSTRING)
          goto ENDRANDOMSTRING;
          
          :MAKERANDOMSTRING
          set buffer=% %
          set count=0
          set /a lowValue=30+(%random%)%%40
          set /a length=10+!lowValue!
          
          :Loop
          set /a count+=1
          set /a rand=%Random%%%69
          set buffer=!buffer!!charSets:~%rand%,1!
          if !count! leq !length! goto Loop
          
          echo "%buffer%" >> file-%JOB_BASE_NAME%.3
          :ENDRANDOMSTRING
          
          copy "C:\tools\jdk-21\bin\ucrtbase.dll" file-dll-%JOB_BASE_NAME%.dll
          

          I also used a system groovy script to run the 9 jobs that I defined as quickly as I could. I set the number of executors on the Windows agent to 5 in case that would help show the issue. No failures in any of those cases.

          Mark Waite added a comment - - edited I've been unable to duplicate the problem with my local Windows 11 computer using Jenkins 2.492.1 freestyle projects that generate artifacts, fingerprint them, and archive them. I've attempted with jobs run on the controller and with jobs run on a separate Windows agent. I'm fingerprinting and archiving artifacts with the pattern '* /file- ' and am copying artifacts from another job with a directory for each build. The batch commands that I'm using to generate the artifacts are like this: set > file-%JOB_BASE_NAME%.1 date /T > file-%JOB_BASE_NAME%.2 setlocal EnableDelayedExpansion set charSets=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&* set count=0 set /a countRaw=4+(%random%)%%20 for /L %%c in (1,1,%countRaw%) do (call :MAKERANDOMSTRING) goto ENDRANDOMSTRING; :MAKERANDOMSTRING set buffer=% % set count=0 set /a lowValue=30+(%random%)%%40 set /a length=10+!lowValue! :Loop set /a count+=1 set /a rand=%Random%%%69 set buffer=!buffer!!charSets:~%rand%,1! if !count! leq !length! goto Loop echo "%buffer%" >> file-%JOB_BASE_NAME%.3 :ENDRANDOMSTRING copy "C:\tools\jdk-21\bin\ucrtbase.dll" file-dll-%JOB_BASE_NAME%.dll I also used a system groovy script to run the 9 jobs that I defined as quickly as I could. I set the number of executors on the Windows agent to 5 in case that would help show the issue. No failures in any of those cases.

          Markus Winter added a comment - - edited

          For me it's relatively easy to reproduce the problem. I just need to start a very simple pipeline

          node("lokal") {
            bat "exit 1"
          }

          by clicking 4 or 5 times on the build now and then I have a t least one run where I get errors:

           

          2025-02-14 20:23:08.576+0100 WARNING org.jenkinsci.plugins.workflow.graph.FlowNode persistSafe: failed to save actions for FlowNode id=5
          java.nio.file.AccessDeniedException: c:\temp\jenkins\jobs\pipeline\builds\5208\workflow\5.xml-atomic11965375519944267267tmp -> c:\temp\jenkins\jobs\pipeline\builds\5208\workflow\5.xml
                  at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:89)
                  at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
                  at java.base/sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:317)
                  at java.base/sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:293)
                  at java.base/java.nio.file.Files.move(Files.java:1432)
                  at hudson.util.AtomicFileWriter.move(AtomicFileWriter.java:243)
                  at hudson.util.AtomicFileWriter.commit(AtomicFileWriter.java:215)
                  at hudson.XmlFile.write(XmlFile.java:221)
                  at PluginClassLoader for workflow-support//org.jenkinsci.plugins.workflow.support.PipelineIOUtils.writeByXStream(PipelineIOUtils.java:30)
                  at PluginClassLoader for workflow-support//org.jenkinsci.plugins.workflow.support.storage.SimpleXStreamFlowNodeStorage.writeNode(SimpleXStreamFlowNodeStorage.java:183)
                  at PluginClassLoader for workflow-support//org.jenkinsci.plugins.workflow.support.storage.SimpleXStreamFlowNodeStorage.saveActions(SimpleXStreamFlowNodeStorage.java:195)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$TimingFlowNodeStorage.saveActions(CpsFlowExecution.java:1993)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.saveActions(CpsFlowExecution.java:1305)
                  at PluginClassLoader for workflow-api//org.jenkinsci.plugins.workflow.graph.FlowNode.save(FlowNode.java:486)
                  at PluginClassLoader for workflow-api//org.jenkinsci.plugins.workflow.graph.FlowNode.persistSafe(FlowNode.java:492)
                  at PluginClassLoader for workflow-api//org.jenkinsci.plugins.workflow.graph.FlowNode$1.add(FlowNode.java:442)
                  at PluginClassLoader for workflow-api//org.jenkinsci.plugins.workflow.graph.FlowNode$1.add(FlowNode.java:432)
                  at java.base/java.util.AbstractList.add(AbstractList.java:111)
                  at hudson.model.Actionable.addAction(Actionable.java:158)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.FlowHead.markIfFail(FlowHead.java:184)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsStepContext$2.onSuccess(CpsStepContext.java:433)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsStepContext$2.onSuccess(CpsStepContext.java:388)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$4$1.run(CpsFlowExecution.java:995)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.lambda$wrap$2(CpsVmExecutorService.java:85)
                  at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
                  at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
                  at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)
                  at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
                  at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
                  at jenkins.util.ErrorLoggingExecutorService.lambda$wrap$0(ErrorLoggingExecutorService.java:51)
                  at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
                  at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
                  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
                  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.call(CpsVmExecutorService.java:53)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.call(CpsVmExecutorService.java:50)
                  at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:136)
                  at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:275)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.lambda$categoryThreadFactory$0(CpsVmExecutorService.java:50)
                  at java.base/java.lang.Thread.run(Thread.java:840)
          2025-02-14 20:23:08.702+0100 WARNING jenkins.model.PeepholePermalink$DefaultCache put: failed to update c:\temp\jenkins\jobs\pipeline\builds\permalinks
          java.nio.file.AccessDeniedException: c:\temp\jenkins\jobs\pipeline\builds\permalinks-atomic3823339838932049770tmp -> c:\temp\jenkins\jobs\pipeline\builds\permalinks
                  at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:89)
                  at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
                  at java.base/sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:317)
                  at java.base/sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:293)
                  at java.base/java.nio.file.Files.move(Files.java:1432)
                  at hudson.util.AtomicFileWriter.move(AtomicFileWriter.java:243)
                  at hudson.util.AtomicFileWriter.commit(AtomicFileWriter.java:215)
                  at jenkins.model.PeepholePermalink$DefaultCache.put(PeepholePermalink.java:255)
                  at jenkins.model.PeepholePermalink.updateCache(PeepholePermalink.java:111)
                  at jenkins.model.PeepholePermalink$RunListenerImpl.onCompleted(PeepholePermalink.java:334)
                  at hudson.model.listeners.RunListener.lambda$fireCompleted$0(RunListener.java:223)
                  at jenkins.util.Listeners.lambda$notify$0(Listeners.java:59)
                  at jenkins.util.Listeners.notify(Listeners.java:67)
                  at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:221)
                  at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowRun.finish(WorkflowRun.java:651)
                  at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowRun$GraphL.onNewHead(WorkflowRun.java:1067)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.notifyListeners(CpsFlowExecution.java:1545)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$3.run(CpsThreadGroup.java:521)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.lambda$wrap$2(CpsVmExecutorService.java:85)
                  at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)
                  at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
                  at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
                  at jenkins.util.ErrorLoggingExecutorService.lambda$wrap$0(ErrorLoggingExecutorService.java:51)
                  at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
                  at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
                  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
                  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.call(CpsVmExecutorService.java:53)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.call(CpsVmExecutorService.java:50)
                  at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:136)
                  at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:275)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.lambda$categoryThreadFactory$0(CpsVmExecutorService.java:50)
                  at java.base/java.lang.Thread.run(Thread.java:840)
          2025-02-14 20:23:08.710+0100 WARNING jenkins.model.PeepholePermalink$DefaultCache put: failed to update c:\temp\jenkins\jobs\pipeline\builds\permalinks
          java.nio.file.AccessDeniedException: c:\temp\jenkins\jobs\pipeline\builds\permalinks-atomic5714437800590643820tmp -> c:\temp\jenkins\jobs\pipeline\builds\permalinks
                  at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:89)
                  at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
                  at java.base/sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:317)
                  at java.base/sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:293)
                  at java.base/java.nio.file.Files.move(Files.java:1432)
                  at hudson.util.AtomicFileWriter.move(AtomicFileWriter.java:243)
                  at hudson.util.AtomicFileWriter.commit(AtomicFileWriter.java:215)
                  at jenkins.model.PeepholePermalink$DefaultCache.put(PeepholePermalink.java:255)
                  at jenkins.model.PeepholePermalink.updateCache(PeepholePermalink.java:111)
                  at jenkins.model.PeepholePermalink$RunListenerImpl.onCompleted(PeepholePermalink.java:334)
                  at hudson.model.listeners.RunListener.lambda$fireCompleted$0(RunListener.java:223)
                  at jenkins.util.Listeners.lambda$notify$0(Listeners.java:59)
                  at jenkins.util.Listeners.notify(Listeners.java:67)
                  at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:221)
                  at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowRun.finish(WorkflowRun.java:651)
                  at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowRun$GraphL.onNewHead(WorkflowRun.java:1067)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.notifyListeners(CpsFlowExecution.java:1545)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$3.run(CpsThreadGroup.java:521)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.lambda$wrap$2(CpsVmExecutorService.java:85)
                  at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)
                  at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
                  at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
                  at jenkins.util.ErrorLoggingExecutorService.lambda$wrap$0(ErrorLoggingExecutorService.java:51)
                  at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
                  at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
                  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
                  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.call(CpsVmExecutorService.java:53)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.call(CpsVmExecutorService.java:50)
                  at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:136)
                  at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:275)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.lambda$categoryThreadFactory$0(CpsVmExecutorService.java:50)
                  at java.base/java.lang.Thread.run(Thread.java:840)
          2025-02-14 20:23:08.711+0100 INFO    org.jenkins.plugins.lockableresources.queue.LockRunListener onCompleted: pipeline #5207
          2025-02-14 20:23:08.718+0100 WARNING jenkins.model.PeepholePermalink$DefaultCache put: failed to update c:\temp\jenkins\jobs\pipeline\builds\permalinks
          java.nio.file.AccessDeniedException: c:\temp\jenkins\jobs\pipeline\builds\permalinks-atomic14312813747308396766tmp -> c:\temp\jenkins\jobs\pipeline\builds\permalinks
                  at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:89)
                  at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
                  at java.base/sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:317)
                  at java.base/sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:293)
                  at java.base/java.nio.file.Files.move(Files.java:1432)
                  at hudson.util.AtomicFileWriter.move(AtomicFileWriter.java:243)
                  at hudson.util.AtomicFileWriter.commit(AtomicFileWriter.java:215)
                  at jenkins.model.PeepholePermalink$DefaultCache.put(PeepholePermalink.java:255)
                  at jenkins.model.PeepholePermalink.updateCache(PeepholePermalink.java:111)
                  at jenkins.model.PeepholePermalink$RunListenerImpl.onCompleted(PeepholePermalink.java:334)
                  at hudson.model.listeners.RunListener.lambda$fireCompleted$0(RunListener.java:223)
                  at jenkins.util.Listeners.lambda$notify$0(Listeners.java:59)
                  at jenkins.util.Listeners.notify(Listeners.java:67)
                  at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:221)
                  at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowRun.finish(WorkflowRun.java:651)
                  at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowRun$GraphL.onNewHead(WorkflowRun.java:1067)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.notifyListeners(CpsFlowExecution.java:1545)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$3.run(CpsThreadGroup.java:521)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.lambda$wrap$2(CpsVmExecutorService.java:85)
                  at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)
                  at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
                  at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
                  at jenkins.util.ErrorLoggingExecutorService.lambda$wrap$0(ErrorLoggingExecutorService.java:51)
                  at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
                  at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
                  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
                  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.call(CpsVmExecutorService.java:53)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.call(CpsVmExecutorService.java:50)
                  at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:136)
                  at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:275)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.lambda$categoryThreadFactory$0(CpsVmExecutorService.java:50)
                  at java.base/java.lang.Thread.run(Thread.java:840)
          2025-02-14 20:23:08.719+0100 WARNING org.jenkinsci.plugins.workflow.job.WorkflowRun saveWithoutFailing: Failed to save pipeline #5207
          java.nio.file.AccessDeniedException: c:\temp\jenkins\jobs\pipeline\builds\5207\build.xml-atomic6148718542965103184tmp -> c:\temp\jenkins\jobs\pipeline\builds\5207\build.xml
                  at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:89)
                  at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
                  at java.base/sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:317)
                  at java.base/sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:293)
                  at java.base/java.nio.file.Files.move(Files.java:1432)
                  at hudson.util.AtomicFileWriter.move(AtomicFileWriter.java:243)
                  at hudson.util.AtomicFileWriter.commit(AtomicFileWriter.java:215)
                  at hudson.XmlFile.write(XmlFile.java:221)
                  at PluginClassLoader for workflow-support//org.jenkinsci.plugins.workflow.support.PipelineIOUtils.writeByXStream(PipelineIOUtils.java:30)
                  at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowRun.save(WorkflowRun.java:1250)
                  at hudson.BulkChange.commit(BulkChange.java:98)
                  at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowRun.saveWithoutFailing(WorkflowRun.java:1225)
                  at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowRun.finish(WorkflowRun.java:668)
                  at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowRun$GraphL.onNewHead(WorkflowRun.java:1067)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.notifyListeners(CpsFlowExecution.java:1545)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$3.run(CpsThreadGroup.java:521)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.lambda$wrap$2(CpsVmExecutorService.java:85)
                  at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)
                  at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
                  at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
                  at jenkins.util.ErrorLoggingExecutorService.lambda$wrap$0(ErrorLoggingExecutorService.java:51)
                  at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
                  at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
                  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
                  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.call(CpsVmExecutorService.java:53)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.call(CpsVmExecutorService.java:50)
                  at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:136)
                  at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:275)
                  at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.lambda$categoryThreadFactory$0(CpsVmExecutorService.java:50)
                  at java.base/java.lang.Thread.run(Thread.java:840)
          

          Looking at the build.xml I see: <completed>false</completed>

          So it definitely failed so save the last update properly it seems as I have a workflow-completed folder there.

          Markus Winter added a comment - - edited For me it's relatively easy to reproduce the problem. I just need to start a very simple pipeline node( "lokal" ) {   bat "exit 1" } by clicking 4 or 5 times on the build now and then I have a t least one run where I get errors:   2025-02-14 20:23:08.576+0100 WARNING org.jenkinsci.plugins.workflow.graph.FlowNode persistSafe: failed to save actions for FlowNode id=5 java.nio.file.AccessDeniedException: c:\temp\jenkins\jobs\pipeline\builds\5208\workflow\5.xml-atomic11965375519944267267tmp -> c:\temp\jenkins\jobs\pipeline\builds\5208\workflow\5.xml         at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:89)         at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)         at java.base/sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:317)         at java.base/sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:293)         at java.base/java.nio.file.Files.move(Files.java:1432)         at hudson.util.AtomicFileWriter.move(AtomicFileWriter.java:243)         at hudson.util.AtomicFileWriter.commit(AtomicFileWriter.java:215)         at hudson.XmlFile.write(XmlFile.java:221)         at PluginClassLoader for workflow-support //org.jenkinsci.plugins.workflow.support.PipelineIOUtils.writeByXStream(PipelineIOUtils.java:30)         at PluginClassLoader for workflow-support //org.jenkinsci.plugins.workflow.support.storage.SimpleXStreamFlowNodeStorage.writeNode(SimpleXStreamFlowNodeStorage.java:183)         at PluginClassLoader for workflow-support //org.jenkinsci.plugins.workflow.support.storage.SimpleXStreamFlowNodeStorage.saveActions(SimpleXStreamFlowNodeStorage.java:195)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$TimingFlowNodeStorage.saveActions(CpsFlowExecution.java:1993)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.saveActions(CpsFlowExecution.java:1305)         at PluginClassLoader for workflow-api //org.jenkinsci.plugins.workflow.graph.FlowNode.save(FlowNode.java:486)         at PluginClassLoader for workflow-api //org.jenkinsci.plugins.workflow.graph.FlowNode.persistSafe(FlowNode.java:492)         at PluginClassLoader for workflow-api //org.jenkinsci.plugins.workflow.graph.FlowNode$1.add(FlowNode.java:442)         at PluginClassLoader for workflow-api //org.jenkinsci.plugins.workflow.graph.FlowNode$1.add(FlowNode.java:432)         at java.base/java.util.AbstractList.add(AbstractList.java:111)         at hudson.model.Actionable.addAction(Actionable.java:158)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.FlowHead.markIfFail(FlowHead.java:184)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsStepContext$2.onSuccess(CpsStepContext.java:433)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsStepContext$2.onSuccess(CpsStepContext.java:388)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$4$1.run(CpsFlowExecution.java:995)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.lambda$wrap$2(CpsVmExecutorService.java:85)         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)         at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)         at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)         at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)         at jenkins.util.ErrorLoggingExecutorService.lambda$wrap$0(ErrorLoggingExecutorService.java:51)         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.call(CpsVmExecutorService.java:53)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.call(CpsVmExecutorService.java:50)         at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:136)         at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:275)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.lambda$categoryThreadFactory$0(CpsVmExecutorService.java:50)         at java.base/java.lang. Thread .run( Thread .java:840) 2025-02-14 20:23:08.702+0100 WARNING jenkins.model.PeepholePermalink$DefaultCache put: failed to update c:\temp\jenkins\jobs\pipeline\builds\permalinks java.nio.file.AccessDeniedException: c:\temp\jenkins\jobs\pipeline\builds\permalinks-atomic3823339838932049770tmp -> c:\temp\jenkins\jobs\pipeline\builds\permalinks         at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:89)         at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)         at java.base/sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:317)         at java.base/sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:293)         at java.base/java.nio.file.Files.move(Files.java:1432)         at hudson.util.AtomicFileWriter.move(AtomicFileWriter.java:243)         at hudson.util.AtomicFileWriter.commit(AtomicFileWriter.java:215)         at jenkins.model.PeepholePermalink$DefaultCache.put(PeepholePermalink.java:255)         at jenkins.model.PeepholePermalink.updateCache(PeepholePermalink.java:111)         at jenkins.model.PeepholePermalink$RunListenerImpl.onCompleted(PeepholePermalink.java:334)         at hudson.model.listeners.RunListener.lambda$fireCompleted$0(RunListener.java:223)         at jenkins.util.Listeners.lambda$notify$0(Listeners.java:59)         at jenkins.util.Listeners.notify(Listeners.java:67)         at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:221)         at PluginClassLoader for workflow-job //org.jenkinsci.plugins.workflow.job.WorkflowRun.finish(WorkflowRun.java:651)         at PluginClassLoader for workflow-job //org.jenkinsci.plugins.workflow.job.WorkflowRun$GraphL.onNewHead(WorkflowRun.java:1067)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.notifyListeners(CpsFlowExecution.java:1545)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$3.run(CpsThreadGroup.java:521)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.lambda$wrap$2(CpsVmExecutorService.java:85)         at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)         at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)         at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)         at jenkins.util.ErrorLoggingExecutorService.lambda$wrap$0(ErrorLoggingExecutorService.java:51)         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.call(CpsVmExecutorService.java:53)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.call(CpsVmExecutorService.java:50)         at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:136)         at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:275)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.lambda$categoryThreadFactory$0(CpsVmExecutorService.java:50)         at java.base/java.lang. Thread .run( Thread .java:840) 2025-02-14 20:23:08.710+0100 WARNING jenkins.model.PeepholePermalink$DefaultCache put: failed to update c:\temp\jenkins\jobs\pipeline\builds\permalinks java.nio.file.AccessDeniedException: c:\temp\jenkins\jobs\pipeline\builds\permalinks-atomic5714437800590643820tmp -> c:\temp\jenkins\jobs\pipeline\builds\permalinks         at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:89)         at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)         at java.base/sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:317)         at java.base/sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:293)         at java.base/java.nio.file.Files.move(Files.java:1432)         at hudson.util.AtomicFileWriter.move(AtomicFileWriter.java:243)         at hudson.util.AtomicFileWriter.commit(AtomicFileWriter.java:215)         at jenkins.model.PeepholePermalink$DefaultCache.put(PeepholePermalink.java:255)         at jenkins.model.PeepholePermalink.updateCache(PeepholePermalink.java:111)         at jenkins.model.PeepholePermalink$RunListenerImpl.onCompleted(PeepholePermalink.java:334)         at hudson.model.listeners.RunListener.lambda$fireCompleted$0(RunListener.java:223)         at jenkins.util.Listeners.lambda$notify$0(Listeners.java:59)         at jenkins.util.Listeners.notify(Listeners.java:67)         at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:221)         at PluginClassLoader for workflow-job //org.jenkinsci.plugins.workflow.job.WorkflowRun.finish(WorkflowRun.java:651)         at PluginClassLoader for workflow-job //org.jenkinsci.plugins.workflow.job.WorkflowRun$GraphL.onNewHead(WorkflowRun.java:1067)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.notifyListeners(CpsFlowExecution.java:1545)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$3.run(CpsThreadGroup.java:521)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.lambda$wrap$2(CpsVmExecutorService.java:85)         at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)         at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)         at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)         at jenkins.util.ErrorLoggingExecutorService.lambda$wrap$0(ErrorLoggingExecutorService.java:51)         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.call(CpsVmExecutorService.java:53)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.call(CpsVmExecutorService.java:50)         at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:136)         at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:275)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.lambda$categoryThreadFactory$0(CpsVmExecutorService.java:50)         at java.base/java.lang. Thread .run( Thread .java:840) 2025-02-14 20:23:08.711+0100 INFO    org.jenkins.plugins.lockableresources.queue.LockRunListener onCompleted: pipeline #5207 2025-02-14 20:23:08.718+0100 WARNING jenkins.model.PeepholePermalink$DefaultCache put: failed to update c:\temp\jenkins\jobs\pipeline\builds\permalinks java.nio.file.AccessDeniedException: c:\temp\jenkins\jobs\pipeline\builds\permalinks-atomic14312813747308396766tmp -> c:\temp\jenkins\jobs\pipeline\builds\permalinks         at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:89)         at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)         at java.base/sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:317)         at java.base/sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:293)         at java.base/java.nio.file.Files.move(Files.java:1432)         at hudson.util.AtomicFileWriter.move(AtomicFileWriter.java:243)         at hudson.util.AtomicFileWriter.commit(AtomicFileWriter.java:215)         at jenkins.model.PeepholePermalink$DefaultCache.put(PeepholePermalink.java:255)         at jenkins.model.PeepholePermalink.updateCache(PeepholePermalink.java:111)         at jenkins.model.PeepholePermalink$RunListenerImpl.onCompleted(PeepholePermalink.java:334)         at hudson.model.listeners.RunListener.lambda$fireCompleted$0(RunListener.java:223)         at jenkins.util.Listeners.lambda$notify$0(Listeners.java:59)         at jenkins.util.Listeners.notify(Listeners.java:67)         at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:221)         at PluginClassLoader for workflow-job //org.jenkinsci.plugins.workflow.job.WorkflowRun.finish(WorkflowRun.java:651)         at PluginClassLoader for workflow-job //org.jenkinsci.plugins.workflow.job.WorkflowRun$GraphL.onNewHead(WorkflowRun.java:1067)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.notifyListeners(CpsFlowExecution.java:1545)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$3.run(CpsThreadGroup.java:521)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.lambda$wrap$2(CpsVmExecutorService.java:85)         at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)         at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)         at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)         at jenkins.util.ErrorLoggingExecutorService.lambda$wrap$0(ErrorLoggingExecutorService.java:51)         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.call(CpsVmExecutorService.java:53)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.call(CpsVmExecutorService.java:50)         at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:136)         at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:275)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.lambda$categoryThreadFactory$0(CpsVmExecutorService.java:50)         at java.base/java.lang. Thread .run( Thread .java:840) 2025-02-14 20:23:08.719+0100 WARNING org.jenkinsci.plugins.workflow.job.WorkflowRun saveWithoutFailing: Failed to save pipeline #5207 java.nio.file.AccessDeniedException: c:\temp\jenkins\jobs\pipeline\builds\5207\build.xml-atomic6148718542965103184tmp -> c:\temp\jenkins\jobs\pipeline\builds\5207\build.xml         at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:89)         at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)         at java.base/sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:317)         at java.base/sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:293)         at java.base/java.nio.file.Files.move(Files.java:1432)         at hudson.util.AtomicFileWriter.move(AtomicFileWriter.java:243)         at hudson.util.AtomicFileWriter.commit(AtomicFileWriter.java:215)         at hudson.XmlFile.write(XmlFile.java:221)         at PluginClassLoader for workflow-support //org.jenkinsci.plugins.workflow.support.PipelineIOUtils.writeByXStream(PipelineIOUtils.java:30)         at PluginClassLoader for workflow-job //org.jenkinsci.plugins.workflow.job.WorkflowRun.save(WorkflowRun.java:1250)         at hudson.BulkChange.commit(BulkChange.java:98)         at PluginClassLoader for workflow-job //org.jenkinsci.plugins.workflow.job.WorkflowRun.saveWithoutFailing(WorkflowRun.java:1225)         at PluginClassLoader for workflow-job //org.jenkinsci.plugins.workflow.job.WorkflowRun.finish(WorkflowRun.java:668)         at PluginClassLoader for workflow-job //org.jenkinsci.plugins.workflow.job.WorkflowRun$GraphL.onNewHead(WorkflowRun.java:1067)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.notifyListeners(CpsFlowExecution.java:1545)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$3.run(CpsThreadGroup.java:521)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.lambda$wrap$2(CpsVmExecutorService.java:85)         at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)         at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)         at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)         at jenkins.util.ErrorLoggingExecutorService.lambda$wrap$0(ErrorLoggingExecutorService.java:51)         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.call(CpsVmExecutorService.java:53)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.call(CpsVmExecutorService.java:50)         at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:136)         at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:275)         at PluginClassLoader for workflow-cps //org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.lambda$categoryThreadFactory$0(CpsVmExecutorService.java:50)         at java.base/java.lang. Thread .run( Thread .java:840) Looking at the build.xml I see: <completed>false</completed> So it definitely failed so save the last update properly it seems as I have a workflow-completed folder there.

          Markus Winter added a comment -

          Using the fix from Jesse I get

          2025-02-14 20:40:46.016+0100 INFO    hudson.util.AtomicFileWriter move: Move c:\temp\jenkins\jobs\pipeline\builds\5213\build.xml-atomic15623552239278973924tmp ÔåÆ c:\temp\jenkins\jobs\pipeline\builds\5213\build.xml failed, perhaps due to a temporary file lock. Falling back to non-atomic move.
          java.nio.file.AccessDeniedException: c:\temp\jenkins\jobs\pipeline\builds\5213\build.xml-atomic15623552239278973924tmp -> c:\temp\jenkins\jobs\pipeline\builds\5213\build.xml
                  at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:89)

          and the build.xml looks good. (btw, the build.xml from above run was changed after the reboot and completed was set to true)

          Markus Winter added a comment - Using the fix from Jesse I get 2025-02-14 20:40:46.016+0100 INFO    hudson.util.AtomicFileWriter move: Move c:\temp\jenkins\jobs\pipeline\builds\5213\build.xml-atomic15623552239278973924tmp ÔåÆ c:\temp\jenkins\jobs\pipeline\builds\5213\build.xml failed, perhaps due to a temporary file lock. Falling back to non-atomic move. java.nio.file.AccessDeniedException: c:\temp\jenkins\jobs\pipeline\builds\5213\build.xml-atomic15623552239278973924tmp -> c:\temp\jenkins\jobs\pipeline\builds\5213\build.xml         at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:89) and the build.xml looks good. (btw, the build.xml from above run was changed after the reboot and completed was set to true)

          Jens H added a comment -

          >Somebody test an incremental build of https://github.com/jenkinsci/jenkins/pull/10271 ?

          I was able to run a full build with multiple jobs without any error. Seems to fix the bug. Thank you.

          Jens H added a comment - >Somebody test an incremental build of https://github.com/jenkinsci/jenkins/pull/10271 ? I was able to run a full build with multiple jobs without any error. Seems to fix the bug. Thank you.

            jglick Jesse Glick
            nigjo Jens H
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: