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

Folder computation is not shutdown on Jenkins shutdown

XMLWordPrintable

      On a plugin I work on, I often see test flakes on Windows, where there is a remaining lock on indexing.log when deprovisioning the Jenkins Home directory used for the tests.

      This seems to be caused by an ongoing folder computation that is not being aborted by the Jenkins shutdown.

      Typical exception looks like this

      jenkins.util.io.CompositeIOException: Unable to delete 'C:\work\target\tmp\j h15699049866710138747'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.
      	at jenkins.util.io.PathRemover.forceRemoveRecursive(PathRemover.java:96)
      	at hudson.Util.deleteRecursive(Util.java:319)
      	at hudson.FilePath$DeleteRecursive.invoke(FilePath.java:1444)
      	at hudson.FilePath$DeleteRecursive.invoke(FilePath.java:1439)
      	at hudson.FilePath.act(FilePath.java:1200)
      	at hudson.FilePath.act(FilePath.java:1183)
      	at hudson.FilePath.deleteRecursive(FilePath.java:1436)
      	at org.jvnet.hudson.test.TemporaryDirectoryAllocator.dispose(TemporaryDirectoryAllocator.java:93)
      	at org.jvnet.hudson.test.TestEnvironment.dispose(TestEnvironment.java:84)
      	at org.jvnet.hudson.test.JenkinsRule.after(JenkinsRule.java:526)
      	at org.jvnet.hudson.test.JenkinsRule$1.evaluate(JenkinsRule.java:634)
      	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:299)
      	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:293)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.lang.Thread.run(Thread.java:829)
      	Suppressed: jenkins.util.io.CompositeIOException: Unable to remove file C:\work\target\tmp\j h15699049866710138747\jobs\ToFolder\jobs\m\indexing\indexing.log
      		at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:251)
      		at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:202)
      		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:213)
      		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
      		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
      		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
      		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
      		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
      		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
      		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
      		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
      		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
      		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
      		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
      		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
      		at jenkins.util.io.PathRemover.forceRemoveRecursive(PathRemover.java:93)
      		... 14 more
      		Suppressed: java.nio.file.FileSystemException: C:\work\target\tmp\j h15699049866710138747\jobs\ToFolder\jobs\m\indexing\indexing.log: The process cannot access the file because it is being used by another process.
      
      			at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:92)
      			at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
      			at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
      			at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:274)
      			at java.base/sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:110)
      			at java.base/java.nio.file.Files.deleteIfExists(Files.java:1181)
      			at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:236)
      			... 29 more
      		Suppressed: java.nio.file.FileSystemException: C:\work\target\tmp\j h15699049866710138747\jobs\ToFolder\jobs\m\indexing\indexing.log: The process cannot access the file because it is being used by another process.
      
      			at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:92)
      			at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
      			at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
      			at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:274)
      			at java.base/sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:110)
      			at java.base/java.nio.file.Files.deleteIfExists(Files.java:1181)
      			at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:240)
      			... 29 more
      	Suppressed: jenkins.util.io.CompositeIOException: Unable to remove directory C:\work\target\tmp\j h15699049866710138747\jobs\ToFolder\jobs\m\indexing with directory contents: [C:\work\target\tmp\j h15699049866710138747\jobs\ToFolder\jobs\m\indexing\indexing.log]
      		at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:249)
      		at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:202)
      		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:213)
      		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
      		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
      		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
      		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
      		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
      		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
      		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
      		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
      		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
      		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
      		at jenkins.util.io.PathRemover.forceRemoveRecursive(PathRemover.java:93)
      		... 14 more
      		Suppressed: java.nio.file.DirectoryNotEmptyException: C:\work\target\tmp\j h15699049866710138747\jobs\ToFolder\jobs\m\indexing
      			at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:271)
      			at java.base/sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:110)
      			at java.base/java.nio.file.Files.deleteIfExists(Files.java:1181)
      			at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:236)
      			... 27 more
      		Suppressed: java.nio.file.DirectoryNotEmptyException: C:\work\target\tmp\j h15699049866710138747\jobs\ToFolder\jobs\m\indexing
      			at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:271)
      			at java.base/sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:110)
      			at java.base/java.nio.file.Files.deleteIfExists(Files.java:1181)
      			at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:240)
      			... 27 more
      	Suppressed: jenkins.util.io.CompositeIOException: Unable to remove directory C:\work\target\tmp\j h15699049866710138747\jobs\ToFolder\jobs\m with directory contents: [C:\work\target\tmp\j h15699049866710138747\jobs\ToFolder\jobs\m\indexing]
      		at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:249)
      		at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:202)
      		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:213)
      		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
      		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
      		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
      		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
      		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
      		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
      		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
      		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
      		at jenkins.util.io.PathRemover.forceRemoveRecursive(PathRemover.java:93)
      		... 14 more
      		Suppressed: java.nio.file.DirectoryNotEmptyException: C:\work\target\tmp\j h15699049866710138747\jobs\ToFolder\jobs\m
      			at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:271)
      			at java.base/sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:110)
      			at java.base/java.nio.file.Files.deleteIfExists(Files.java:1181)
      			at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:236)
      			... 25 more
      		Suppressed: java.nio.file.DirectoryNotEmptyException: C:\work\target\tmp\j h15699049866710138747\jobs\ToFolder\jobs\m
      			at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:271)
      			at java.base/sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:110)
      			at java.base/java.nio.file.Files.deleteIfExists(Files.java:1181)
      			at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:240)
      			... 25 more
      	Suppressed: jenkins.util.io.CompositeIOException: Unable to remove directory C:\work\target\tmp\j h15699049866710138747\jobs\ToFolder\jobs with directory contents: [C:\work\target\tmp\j h15699049866710138747\jobs\ToFolder\jobs\m]
      		at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:249)
      		at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:202)
      		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:213)
      		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
      		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
      		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
      		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
      		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
      		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
      		at jenkins.util.io.PathRemover.forceRemoveRecursive(PathRemover.java:93)
      		... 14 more
      		Suppressed: java.nio.file.DirectoryNotEmptyException: C:\work\target\tmp\j h15699049866710138747\jobs\ToFolder\jobs
      			at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:271)
      			at java.base/sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:110)
      			at java.base/java.nio.file.Files.deleteIfExists(Files.java:1181)
      			at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:236)
      			... 23 more
      		Suppressed: java.nio.file.DirectoryNotEmptyException: C:\work\target\tmp\j h15699049866710138747\jobs\ToFolder\jobs
      			at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:271)
      			at java.base/sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:110)
      			at java.base/java.nio.file.Files.deleteIfExists(Files.java:1181)
      			at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:240)
      			... 23 more
      	Suppressed: jenkins.util.io.CompositeIOException: Unable to remove directory C:\work\target\tmp\j h15699049866710138747\jobs\ToFolder with directory contents: [C:\work\target\tmp\j h15699049866710138747\jobs\ToFolder\jobs]
      		at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:249)
      		at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:202)
      		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:213)
      		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
      		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
      		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
      		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
      		at jenkins.util.io.PathRemover.forceRemoveRecursive(PathRemover.java:93)
      		... 14 more
      		Suppressed: java.nio.file.DirectoryNotEmptyException: C:\work\target\tmp\j h15699049866710138747\jobs\ToFolder
      			at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:271)
      			at java.base/sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:110)
      			at java.base/java.nio.file.Files.deleteIfExists(Files.java:1181)
      			at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:236)
      			... 21 more
      		Suppressed: java.nio.file.DirectoryNotEmptyException: C:\work\target\tmp\j h15699049866710138747\jobs\ToFolder
      			at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:271)
      			at java.base/sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:110)
      			at java.base/java.nio.file.Files.deleteIfExists(Files.java:1181)
      			at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:240)
      			... 21 more
      	Suppressed: jenkins.util.io.CompositeIOException: Unable to remove directory C:\work\target\tmp\j h15699049866710138747\jobs with directory contents: [C:\work\target\tmp\j h15699049866710138747\jobs\ToFolder]
      		at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:249)
      		at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:202)
      		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:213)
      		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
      		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
      		at jenkins.util.io.PathRemover.forceRemoveRecursive(PathRemover.java:93)
      		... 14 more
      		Suppressed: java.nio.file.DirectoryNotEmptyException: C:\work\target\tmp\j h15699049866710138747\jobs
      			at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:271)
      			at java.base/sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:110)
      			at java.base/java.nio.file.Files.deleteIfExists(Files.java:1181)
      			at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:236)
      			... 19 more
      		Suppressed: java.nio.file.DirectoryNotEmptyException: C:\work\target\tmp\j h15699049866710138747\jobs
      			at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:271)
      			at java.base/sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:110)
      			at java.base/java.nio.file.Files.deleteIfExists(Files.java:1181)
      			at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:240)
      			... 19 more
      	Suppressed: jenkins.util.io.CompositeIOException: Unable to remove directory C:\work\target\tmp\j h15699049866710138747 with directory contents: [C:\work\target\tmp\j h15699049866710138747\jobs]
      		at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:249)
      		at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:202)
      		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:213)
      		at jenkins.util.io.PathRemover.forceRemoveRecursive(PathRemover.java:93)
      		... 14 more
      		Suppressed: java.nio.file.DirectoryNotEmptyException: C:\work\target\tmp\j h15699049866710138747
      			at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:271)
      			at java.base/sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:110)
      			at java.base/java.nio.file.Files.deleteIfExists(Files.java:1181)
      			at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:236)
      			... 17 more
      		Suppressed: java.nio.file.DirectoryNotEmptyException: C:\work\target\tmp\j h15699049866710138747
      			at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:271)
      			at java.base/sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:110)
      			at java.base/java.nio.file.Files.deleteIfExists(Files.java:1181)
      			at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:240)
      			... 17 more
      
      

            vlatombe Vincent Latombe
            vlatombe Vincent Latombe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: