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

Cannot delete orphaned items in Multibranch pipeline

    Details

    • Similar Issues:

      Description

      I believe this is similar to JENKINS-58733 and JENKINS-58998 but it reproduces in 2.190.

      The issue I'm facing is that Multibranch Scan cannot delete orphaned projects. When I try to delete them using Jenkins UI I get the same error. Deletion is blocked by a stash being ostensibly used by someone.

      I don't have the necessary access to Jenkins to find who is using the file. I'm working on figuring that out.

      Here is the Scan log output (the error from the UI matches):

      Will remove PR-12345
      FATAL: Failed to recompute children of ***PROJECT_NAME***
      jenkins.util.io.CompositeIOException: Unable to delete '/var/jenkins_home/jobs/***PROJECT_NAME***/branches/PR-12345'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.
      	at jenkins.util.io.PathRemover.forceRemoveRecursive(PathRemover.java:99)
      	at hudson.Util.deleteRecursive(Util.java:293)
      	at hudson.Util.deleteRecursive(Util.java:282)
      	at hudson.model.AbstractItem.performDelete(AbstractItem.java:801)
      	at org.jenkinsci.plugins.workflow.job.WorkflowJob.performDelete(WorkflowJob.java:650)
      	at hudson.model.AbstractItem.delete(AbstractItem.java:785)
      	at hudson.model.Job.delete(Job.java:676)
      	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:290)
      	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:164)
      	at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1026)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      jenkins.util.io.CompositeIOException: Unable to remove file /var/jenkins_home/jobs/***PROJECT_NAME***/branches/PR-12345/builds/3/stashes/.nfs0000000095fe10b1000020ec
      	at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:252)
      	at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:205)
      	at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:216)
      	at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:226)
      	at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:215)
      	at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:226)
      	at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:215)
      	at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:226)
      	at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:215)
      	at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:226)
      	at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:215)
      	at jenkins.util.io.PathRemover.forceRemoveRecursive(PathRemover.java:96)
      	at hudson.Util.deleteRecursive(Util.java:293)
      	...
      

      See the attached file for the full stack trace.

      I marked this as Critical as it eventually will fill the disk space and block any other builds from running.

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              igalg Igal Gluh
              Reporter:
              saynurin Shavkat Aynurin
            • Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: