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

Job fails randomly when attempt to lock resources

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Labels:
      None
    • Environment:
      Jenkins ver. 2.107.3
      Windows 10x64 on master and slave-nodes
      lockable-resources-plugin 2.2
    • Similar Issues:

      Description

      As the title states, the job fails randomly. Thus, I could not find out any more precise scenarios where the error occurs.

       

      Running in Durability level: MAX_SURVIVABILITY
      [Pipeline] node
      Running on DSWZ10022 in C:\appl\Jenkins\workspace\unittest_dsw_libs_on_node
      [Pipeline] {
      [Pipeline] VersionNumber
      [Pipeline] lock
      Trying to acquire lock on [lock_build_DSWZ10022]
      Lock acquired on [lock_build_DSWZ10022]
      [Pipeline] // lock
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      [lockable-resources] released lock on [lock_build_DSWZ10022]
      Also:   java.nio.file.AccessDeniedException: C:\appl\Jenkins\jobs\unittest_dsw_libs_on_node\builds\126\workflow\atomic4768153447733004901tmp -> C:\appl\Jenkins\jobs\unittest_dsw_libs_on_node\builds\126\workflow\6.xml
              at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
              at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
              at sun.nio.fs.WindowsFileCopy.move(Unknown Source)
              at sun.nio.fs.WindowsFileSystemProvider.move(Unknown Source)
              at java.nio.file.Files.move(Unknown Source)
              at hudson.util.AtomicFileWriter.commit(AtomicFileWriter.java:191)
      java.nio.file.FileAlreadyExistsException: C:\appl\Jenkins\jobs\unittest_dsw_libs_on_node\builds\126\workflow\atomic4768153447733004901tmp -> C:\appl\Jenkins\jobs\unittest_dsw_libs_on_node\builds\126\workflow\6.xml
          at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
          at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
          at sun.nio.fs.WindowsFileCopy.move(Unknown Source)
          at sun.nio.fs.WindowsFileSystemProvider.move(Unknown Source)
          at java.nio.file.Files.move(Unknown Source)
          at hudson.util.AtomicFileWriter.commit(AtomicFileWriter.java:206)
          at hudson.XmlFile.write(XmlFile.java:198)
          at org.jenkinsci.plugins.workflow.support.PipelineIOUtils.writeByXStream(PipelineIOUtils.java:30)
          at org.jenkinsci.plugins.workflow.support.storage.SimpleXStreamFlowNodeStorage.writeNode(SimpleXStreamFlowNodeStorage.java:182)
          at org.jenkinsci.plugins.workflow.support.storage.SimpleXStreamFlowNodeStorage.saveActions(SimpleXStreamFlowNodeStorage.java:193)
          at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$TimingFlowNodeStorage.saveActions(CpsFlowExecution.java:1851)
          at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.saveActions(CpsFlowExecution.java:1185)
          at org.jenkinsci.plugins.workflow.graph.FlowNode.save(FlowNode.java:449)
          at org.jenkinsci.plugins.workflow.support.actions.PauseAction.endCurrentPause(PauseAction.java:115)
          at org.jenkins.plugins.lockableresources.LockStepExecution.proceed(LockStepExecution.java:81)
          at org.jenkins.plugins.lockableresources.LockableResourcesManager.lock(LockableResourcesManager.java:309)
          at org.jenkins.plugins.lockableresources.LockStepExecution.start(LockStepExecution.java:60)
          at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:229)
          at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:153)
          at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122)
          at sun.reflect.GeneratedMethodAccessor269.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
          at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
          at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
          at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
          at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42)
          at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
          at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
          at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:157)
          at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23)
          at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:133)
          at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:155)
          at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:159)
          at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:129)
          at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
      Caused: java.lang.RuntimeException
          at org.jenkins.plugins.lockableresources.LockStepExecution.proceed(LockStepExecution.java:99)
          at org.jenkins.plugins.lockableresources.LockableResourcesManager.lock(LockableResourcesManager.java:309)
          at org.jenkins.plugins.lockableresources.LockStepExecution.start(LockStepExecution.java:60)
          at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:229)
          at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:153)
          at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122)
          at sun.reflect.GeneratedMethodAccessor269.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
          at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
          at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
          at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
          at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42)
          at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
          at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
          at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:157)
          at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23)
          at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:133)
          at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:155)
          at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:159)
          at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:129)
          at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
          at WorkflowScript.run(WorkflowScript:114)
          at ___cps.transform___(Native Method)
          at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:57)
          at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:109)
          at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82)
          at sun.reflect.GeneratedMethodAccessor224.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
          at com.cloudbees.groovy.cps.impl.ClosureBlock.eval(ClosureBlock.java:46)
          at com.cloudbees.groovy.cps.Next.step(Next.java:83)
          at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174)
          at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163)
          at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:122)
          at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:261)
          at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
          at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$101(SandboxContinuable.java:34)
          at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.lambda$run0$0(SandboxContinuable.java:59)
          at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108)
          at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:58)
          at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:174)
          at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:332)
          at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$200(CpsThreadGroup.java:83)
          at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:244)
          at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:232)
          at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:64)
          at java.util.concurrent.FutureTask.run(Unknown Source)
          at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131)
          at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
          at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
          at java.util.concurrent.FutureTask.run(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at java.lang.Thread.run(Unknown Source)
      Finished: FAILURE
      

        Attachments

          Issue Links

            Activity

            There are no comments yet on this issue.

              People

              • Assignee:
                Unassigned
                Reporter:
                marcosteffan Marco Steffan
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: