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

Unable to delete file causes Multibranch Pipeline scan FAILURE

XMLWordPrintable

      We are using Multibranch Pipeline job on Jenkins. Sometimes during the scan, we receive an exception:

      java.io.IOException: Unable to delete '/var/lib/jenkins/jobs/sample.job.build/branches/feature-P.of17kqq8ojl6.-PFT-repo'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts. at hudson.Util.deleteRecursive(Util.java:352) at hudson.model.AbstractItem.performDelete(AbstractItem.java:691) at org.jenkinsci.plugins.workflow.job.WorkflowJob.performDelete(WorkflowJob.java:642) at hudson.model.AbstractItem.delete(AbstractItem.java:675) at hudson.model.Job.delete(Job.java:676) at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:289) at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:165) at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1022) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:421) Caused by: java.nio.file.FileSystemException: /var/lib/jenkins/jobs/sample.job.build/branches/feature-P.of17kqq8ojl6.-PFT-repo/builds/58/.nfs00000000000e9e0d000000ba: Device or resource busy at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244) at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:108) at java.nio.file.Files.deleteIfExists(Files.java:1165) at hudson.Util.tryOnceDeleteFile(Util.java:290) at hudson.Util.tryOnceDeleteRecursive(Util.java:370) at hudson.Util.tryOnceDeleteContentsRecursive(Util.java:389) at hudson.Util.tryOnceDeleteRecursive(Util.java:369) at hudson.Util.tryOnceDeleteContentsRecursive(Util.java:389) at hudson.Util.tryOnceDeleteRecursive(Util.java:369) at hudson.Util.tryOnceDeleteContentsRecursive(Util.java:389) at hudson.Util.tryOnceDeleteRecursive(Util.java:369) at hudson.Util.deleteRecursive(Util.java:347)

       

      It causes that our scan fails so no new builds are created. Maybe this kind of error is not such a big problem so scan can proceed?

            Unassigned Unassigned
            adambialas Adam Bialas
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: