java.io.IOException: Unable to delete C:\DOCUME~1\name\LOCALS~1\Temp\hudson40664test\plugins\maven-plugin\WEB-INF\lib\ classworlds-1.1.jar

Jenkins JIRA | redsolo | 7 years ago
  1. 0

    I have noticed that the HudsonTestCase sometimes does not do a proper clean up of the temp folders. On Windows this happens every time because of a file in use error. On Linux (debian) this sometimes happen if a test fails. As the temp folder can contain up to 14mbs, the total size can grow quickly. After 1 month of developing/testing my hudson test case folders consisted of 500+k files in 892 folders, amounting to 7+Gb. (Windows) Maybe we can use the new TemporaryFolder rule that is available in JUnit 4.7, so we can lift out stuff from our implementation? http://github.com/KentBeck/junit/raw/23ffc6baf5768057e366e183e53f4dfa86fbb005/do c/ReleaseNotes4.7.txt Steps to reproduce on linux: 1. Clean out all hudsonXXXX folders in the temp folder 2. Go to hudson/plugins/seleniuma 3. run "mvn test" and watch it fail 4. Check the temp folder Expected result: No new folder in the temp folder Actual Result: A folder named hudsonXXXXXXX has been created Steps to reproduce: 1. Go to hudson/plugins/ci-game 2. run "mvn test" 3. Watch output Expected result: Test fails Actual Result: An exception is thrown during the test clean up: java.io.IOException: Unable to delete C:\DOCUME~1\name\LOCALS~1\Temp\hudson40664test\plugins\maven-plugin\WEB-INF\lib\ classworlds-1.1.jar at hudson.Util.deleteFile(Util.java:225) at hudson.Util.deleteRecursive(Util.java:257) at hudson.Util.deleteContentsRecursive(Util.java:186) at hudson.Util.deleteRecursive(Util.java:256) at hudson.Util.deleteContentsRecursive(Util.java:186) at hudson.Util.deleteRecursive(Util.java:256) at hudson.Util.deleteContentsRecursive(Util.java:186) at hudson.Util.deleteRecursive(Util.java:256) at hudson.Util.deleteContentsRecursive(Util.java:186) at hudson.Util.deleteRecursive(Util.java:256) at hudson.Util.deleteContentsRecursive(Util.java:186) at hudson.Util.deleteRecursive(Util.java:256) at hudson.FilePath$9.invoke(FilePath.java:748) at hudson.FilePath$9.invoke(FilePath.java:746) at hudson.FilePath.act(FilePath.java:676) at hudson.FilePath.act(FilePath.java:660) at hudson.FilePath.deleteRecursive(FilePath.java:746) at org.jvnet.hudson.test.TemporaryDirectoryAllocator$1.run(TemporaryDirectoryAlloca tor.java:90)

    Jenkins JIRA | 7 years ago | redsolo
    java.io.IOException: Unable to delete C:\DOCUME~1\name\LOCALS~1\Temp\hudson40664test\plugins\maven-plugin\WEB-INF\lib\ classworlds-1.1.jar
  2. 0

    I have noticed that the HudsonTestCase sometimes does not do a proper clean up of the temp folders. On Windows this happens every time because of a file in use error. On Linux (debian) this sometimes happen if a test fails. As the temp folder can contain up to 14mbs, the total size can grow quickly. After 1 month of developing/testing my hudson test case folders consisted of 500+k files in 892 folders, amounting to 7+Gb. (Windows) Maybe we can use the new TemporaryFolder rule that is available in JUnit 4.7, so we can lift out stuff from our implementation? http://github.com/KentBeck/junit/raw/23ffc6baf5768057e366e183e53f4dfa86fbb005/do c/ReleaseNotes4.7.txt Steps to reproduce on linux: 1. Clean out all hudsonXXXX folders in the temp folder 2. Go to hudson/plugins/seleniuma 3. run "mvn test" and watch it fail 4. Check the temp folder Expected result: No new folder in the temp folder Actual Result: A folder named hudsonXXXXXXX has been created Steps to reproduce: 1. Go to hudson/plugins/ci-game 2. run "mvn test" 3. Watch output Expected result: Test fails Actual Result: An exception is thrown during the test clean up: java.io.IOException: Unable to delete C:\DOCUME~1\name\LOCALS~1\Temp\hudson40664test\plugins\maven-plugin\WEB-INF\lib\ classworlds-1.1.jar at hudson.Util.deleteFile(Util.java:225) at hudson.Util.deleteRecursive(Util.java:257) at hudson.Util.deleteContentsRecursive(Util.java:186) at hudson.Util.deleteRecursive(Util.java:256) at hudson.Util.deleteContentsRecursive(Util.java:186) at hudson.Util.deleteRecursive(Util.java:256) at hudson.Util.deleteContentsRecursive(Util.java:186) at hudson.Util.deleteRecursive(Util.java:256) at hudson.Util.deleteContentsRecursive(Util.java:186) at hudson.Util.deleteRecursive(Util.java:256) at hudson.Util.deleteContentsRecursive(Util.java:186) at hudson.Util.deleteRecursive(Util.java:256) at hudson.FilePath$9.invoke(FilePath.java:748) at hudson.FilePath$9.invoke(FilePath.java:746) at hudson.FilePath.act(FilePath.java:676) at hudson.FilePath.act(FilePath.java:660) at hudson.FilePath.deleteRecursive(FilePath.java:746) at org.jvnet.hudson.test.TemporaryDirectoryAllocator$1.run(TemporaryDirectoryAlloca tor.java:90)

    Jenkins JIRA | 7 years ago | redsolo
    java.io.IOException: Unable to delete C:\DOCUME~1\name\LOCALS~1\Temp\hudson40664test\plugins\maven-plugin\WEB-INF\lib\ classworlds-1.1.jar
  3. 0

    Hudson and gitosis

    Stack Overflow | 5 years ago | Jon
    java.io.IOException: Unable to delete C:\Documents and Settings\hudson\.hudson\jobs\<job>\workspace
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Failed to clean up temp dirs

    GitHub | 2 years ago | RZhou94
    java.io.IOException: Failed to clean up temp dirs
  6. 0

    Unable to delete unicode files during workspace cleanup

    Google Groups | 4 years ago | grayaii
    java.io.IOException: Unable to delete /.../XmlParseUtilityTestFiles/��ҿ]

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.io.IOException

      Unable to delete C:\DOCUME~1\name\LOCALS~1\Temp\hudson40664test\plugins\maven-plugin\WEB-INF\lib\ classworlds-1.1.jar

      at hudson.Util.deleteFile()
    2. Hudson
      FilePath.deleteRecursive
      1. hudson.Util.deleteFile(Util.java:225)
      2. hudson.Util.deleteRecursive(Util.java:257)
      3. hudson.Util.deleteContentsRecursive(Util.java:186)
      4. hudson.Util.deleteRecursive(Util.java:256)
      5. hudson.Util.deleteContentsRecursive(Util.java:186)
      6. hudson.Util.deleteRecursive(Util.java:256)
      7. hudson.Util.deleteContentsRecursive(Util.java:186)
      8. hudson.Util.deleteRecursive(Util.java:256)
      9. hudson.Util.deleteContentsRecursive(Util.java:186)
      10. hudson.Util.deleteRecursive(Util.java:256)
      11. hudson.Util.deleteContentsRecursive(Util.java:186)
      12. hudson.Util.deleteRecursive(Util.java:256)
      13. hudson.FilePath$9.invoke(FilePath.java:748)
      14. hudson.FilePath$9.invoke(FilePath.java:746)
      15. hudson.FilePath.act(FilePath.java:676)
      16. hudson.FilePath.act(FilePath.java:660)
      17. hudson.FilePath.deleteRecursive(FilePath.java:746)
      17 frames