hudson.util.IOException2: Failed to clean up temp dirs

Jenkins JIRA | Patrik Johansson | 4 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Test results on windows Vista are: Package Tests Err Fail Skip Success Rate Time com.sonyericsson.jenkins.plugins.externalresource.dispatcher.utils.resourcemanagers 3 0 0 0 100% 5 com.sonyericsson.jenkins.plugins.externalresource.dispatcher.utils 4 1 1 0 50% 7 com.sonyericsson.jenkins.plugins.externalresource.dispatcher.spec 1 1 0 0 0% 4 com.sonyericsson.jenkins.plugins.externalresource.dispatcher.data 14 4 1 0 64.286% 76 com.sonyericsson.jenkins.plugins.externalresource.dispatcher 8 4 0 0 50% 47 org.jvnet.hudson.test.junit 1 0 0 0 100% 0 com.sonyericsson.jenkins.plugins.externalresource.dispatcher.cli 8 0 0 0 100% 10 org.jvnet.hudson.test 7 0 0 0 100% 0 10 tests fail with the following stack trace: hudson.util.IOException2: Failed to clean up temp dirs at org.jvnet.hudson.test.TemporaryDirectoryAllocator.dispose(TemporaryDirectoryAllocator.java:87) at org.jvnet.hudson.test.TestEnvironment.dispose(TestEnvironment.java:53) at org.jvnet.hudson.test.HudsonTestCase.tearDown(HudsonTestCase.java:352) at junit.framework.TestCase.runBare(TestCase.java:140) at org.jvnet.hudson.test.HudsonTestCase.runBare(HudsonTestCase.java:264) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:124) at junit.framework.TestSuite.runTest(TestSuite.java:243) at junit.framework.TestSuite.run(TestSuite.java:238) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:119) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:101) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103) at $Proxy0.invoke(Unknown Source) at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150) at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69) Caused by: java.io.IOException: Unable to delete C:\Users\xxx\AppData\Local\Temp\hudson2103820071219030666test\slave-slave0.log at hudson.Util.deleteFile(Util.java:266) at hudson.Util.deleteRecursive(Util.java:316) at hudson.Util.deleteContentsRecursive(Util.java:227) at hudson.Util.deleteRecursive(Util.java:307) at hudson.FilePath$9.invoke(FilePath.java:826) at hudson.FilePath$9.invoke(FilePath.java:824) at hudson.FilePath.act(FilePath.java:758) at hudson.FilePath.act(FilePath.java:740) at hudson.FilePath.deleteRecursive(FilePath.java:824) at org.jvnet.hudson.test.TemporaryDirectoryAllocator.dispose(TemporaryDirectoryAllocator.java:82) ... 23 more

    Jenkins JIRA | 4 years ago | Patrik Johansson
    hudson.util.IOException2: Failed to clean up temp dirs
  2. 0

    Test results on windows Vista are: Package Tests Err Fail Skip Success Rate Time com.sonyericsson.jenkins.plugins.externalresource.dispatcher.utils.resourcemanagers 3 0 0 0 100% 5 com.sonyericsson.jenkins.plugins.externalresource.dispatcher.utils 4 1 1 0 50% 7 com.sonyericsson.jenkins.plugins.externalresource.dispatcher.spec 1 1 0 0 0% 4 com.sonyericsson.jenkins.plugins.externalresource.dispatcher.data 14 4 1 0 64.286% 76 com.sonyericsson.jenkins.plugins.externalresource.dispatcher 8 4 0 0 50% 47 org.jvnet.hudson.test.junit 1 0 0 0 100% 0 com.sonyericsson.jenkins.plugins.externalresource.dispatcher.cli 8 0 0 0 100% 10 org.jvnet.hudson.test 7 0 0 0 100% 0 10 tests fail with the following stack trace: hudson.util.IOException2: Failed to clean up temp dirs at org.jvnet.hudson.test.TemporaryDirectoryAllocator.dispose(TemporaryDirectoryAllocator.java:87) at org.jvnet.hudson.test.TestEnvironment.dispose(TestEnvironment.java:53) at org.jvnet.hudson.test.HudsonTestCase.tearDown(HudsonTestCase.java:352) at junit.framework.TestCase.runBare(TestCase.java:140) at org.jvnet.hudson.test.HudsonTestCase.runBare(HudsonTestCase.java:264) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:124) at junit.framework.TestSuite.runTest(TestSuite.java:243) at junit.framework.TestSuite.run(TestSuite.java:238) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:119) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:101) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103) at $Proxy0.invoke(Unknown Source) at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150) at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69) Caused by: java.io.IOException: Unable to delete C:\Users\xxx\AppData\Local\Temp\hudson2103820071219030666test\slave-slave0.log at hudson.Util.deleteFile(Util.java:266) at hudson.Util.deleteRecursive(Util.java:316) at hudson.Util.deleteContentsRecursive(Util.java:227) at hudson.Util.deleteRecursive(Util.java:307) at hudson.FilePath$9.invoke(FilePath.java:826) at hudson.FilePath$9.invoke(FilePath.java:824) at hudson.FilePath.act(FilePath.java:758) at hudson.FilePath.act(FilePath.java:740) at hudson.FilePath.deleteRecursive(FilePath.java:824) at org.jvnet.hudson.test.TemporaryDirectoryAllocator.dispose(TemporaryDirectoryAllocator.java:82) ... 23 more

    Jenkins JIRA | 4 years ago | Patrik Johansson
    hudson.util.IOException2: Failed to clean up temp dirs
  3. 0

    Using a slave in a plugin test with JenkinsRule (Junit4 based), it fails with a following error: {code} hudson.util.IOException2: Failed to clean up temp dirs at org.jvnet.hudson.test.TemporaryDirectoryAllocator.dispose(TemporaryDirectoryAllocator.java:87) at org.jvnet.hudson.test.TestEnvironment.dispose(TestEnvironment.java:78) at org.jvnet.hudson.test.HudsonTestCase.tearDown(HudsonTestCase.java:420) at junit.framework.TestCase.runBare(TestCase.java:146) at org.jvnet.hudson.test.HudsonTestCase.runBare(HudsonTestCase.java:297) at junit.framework.TestResult$1.protect(TestResult.java:122) at junit.framework.TestResult.runProtected(TestResult.java:142) at junit.framework.TestResult.run(TestResult.java:125) at junit.framework.TestCase.run(TestCase.java:129) at junit.framework.TestSuite.runTest(TestSuite.java:255) at junit.framework.TestSuite.run(TestSuite.java:250) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110) at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:172) at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:104) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:70) Caused by: java.io.IOException: Unable to delete C:\Users\ikedam\AppData\Local\Temp\hudson4683007175849200528test\logs\slaves\slave0\slave.log at hudson.Util.deleteFile(Util.java:253) at hudson.Util.deleteRecursive(Util.java:305) at hudson.Util.deleteContentsRecursive(Util.java:202) at hudson.Util.deleteRecursive(Util.java:296) at hudson.Util.deleteContentsRecursive(Util.java:202) at hudson.Util.deleteRecursive(Util.java:296) at hudson.Util.deleteContentsRecursive(Util.java:202) at hudson.Util.deleteRecursive(Util.java:296) at hudson.Util.deleteContentsRecursive(Util.java:202) at hudson.Util.deleteRecursive(Util.java:296) at hudson.FilePath$11.invoke(FilePath.java:1040) at hudson.FilePath$11.invoke(FilePath.java:1037) at hudson.FilePath.act(FilePath.java:905) at hudson.FilePath.act(FilePath.java:878) at hudson.FilePath.deleteRecursive(FilePath.java:1037) at org.jvnet.hudson.test.TemporaryDirectoryAllocator.dispose(TemporaryDirectoryAllocator.java:82) ... 23 more {code}

    Jenkins JIRA | 4 years ago | ikedam
    hudson.util.IOException2: Failed to clean up temp dirs
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Using a slave in a plugin test with JenkinsRule (Junit4 based), it fails with a following error: {code} hudson.util.IOException2: Failed to clean up temp dirs at org.jvnet.hudson.test.TemporaryDirectoryAllocator.dispose(TemporaryDirectoryAllocator.java:87) at org.jvnet.hudson.test.TestEnvironment.dispose(TestEnvironment.java:78) at org.jvnet.hudson.test.HudsonTestCase.tearDown(HudsonTestCase.java:420) at junit.framework.TestCase.runBare(TestCase.java:146) at org.jvnet.hudson.test.HudsonTestCase.runBare(HudsonTestCase.java:297) at junit.framework.TestResult$1.protect(TestResult.java:122) at junit.framework.TestResult.runProtected(TestResult.java:142) at junit.framework.TestResult.run(TestResult.java:125) at junit.framework.TestCase.run(TestCase.java:129) at junit.framework.TestSuite.runTest(TestSuite.java:255) at junit.framework.TestSuite.run(TestSuite.java:250) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110) at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:172) at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:104) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:70) Caused by: java.io.IOException: Unable to delete C:\Users\ikedam\AppData\Local\Temp\hudson4683007175849200528test\logs\slaves\slave0\slave.log at hudson.Util.deleteFile(Util.java:253) at hudson.Util.deleteRecursive(Util.java:305) at hudson.Util.deleteContentsRecursive(Util.java:202) at hudson.Util.deleteRecursive(Util.java:296) at hudson.Util.deleteContentsRecursive(Util.java:202) at hudson.Util.deleteRecursive(Util.java:296) at hudson.Util.deleteContentsRecursive(Util.java:202) at hudson.Util.deleteRecursive(Util.java:296) at hudson.Util.deleteContentsRecursive(Util.java:202) at hudson.Util.deleteRecursive(Util.java:296) at hudson.FilePath$11.invoke(FilePath.java:1040) at hudson.FilePath$11.invoke(FilePath.java:1037) at hudson.FilePath.act(FilePath.java:905) at hudson.FilePath.act(FilePath.java:878) at hudson.FilePath.deleteRecursive(FilePath.java:1037) at org.jvnet.hudson.test.TemporaryDirectoryAllocator.dispose(TemporaryDirectoryAllocator.java:82) ... 23 more {code}

    Jenkins JIRA | 4 years ago | ikedam
    hudson.util.IOException2: Failed to clean up temp dirs
  6. 0

    Tests extending HudsonTestCase intermittently fail with, {quote} hudson.util.IOException2: Failed to clean up temp dirs at org.jvnet.hudson.test.TemporaryDirectoryAllocator.dispose(TemporaryDirectoryAllocator.java:87) at org.jvnet.hudson.test.TestEnvironment.dispose(TestEnvironment.java:54) at org.jvnet.hudson.test.HudsonTestCase.tearDown(HudsonTestCase.java:304) at junit.framework.TestCase.runBare(TestCase.java:140) at org.jvnet.hudson.test.HudsonTestCase.runBare(HudsonTestCase.java:224) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:124) at junit.framework.TestSuite.runTest(TestSuite.java:232) at junit.framework.TestSuite.run(TestSuite.java:227) at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103) at $Proxy0.invoke(Unknown Source) at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150) at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69) Caused by: java.io.IOException: Unable to delete /tmp/hudson8023746522728512854test/jobs - files in dir: [/tmp/hudson8023746522728512854test/jobs/fail] at hudson.Util.deleteFile(Util.java:260) at hudson.Util.deleteRecursive(Util.java:303) at hudson.Util.deleteContentsRecursive(Util.java:222) at hudson.Util.deleteRecursive(Util.java:302) at hudson.FilePath$9.invoke(FilePath.java:821) at hudson.FilePath$9.invoke(FilePath.java:819) at hudson.FilePath.act(FilePath.java:753) at hudson.FilePath.act(FilePath.java:735) at hudson.FilePath.deleteRecursive(FilePath.java:819) at org.jvnet.hudson.test.TemporaryDirectoryAllocator.dispose(TemporaryDirectoryAllocator.java:82) ... 23 more {quote} This happens on the main hudson-on-hudson server and also on cloudbees.com, * http://ci.jenkins-ci.org/view/Plugins/job/plugins_bulk-builder/org.jvnet.hudson.plugins$bulk-builder/30/testReport/junit/org.jvnet.hudson.plugins.bulkbuilder.model/BuilderTest/testBuildFailed/ * https://swestcott.ci.cloudbees.com/job/Jenkins%20Bulk%20Builder%20(github-swestcott)/org.jvnet.hudson.plugins$bulk-builder/9/testReport/org.jvnet.hudson.plugins.bulkbuilder.model/BuilderTest/testBuildFailed/

    Jenkins JIRA | 5 years ago | Simon Westcott
    hudson.util.IOException2: Failed to clean up temp dirs

    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:\Users\xxx\AppData\Local\Temp\hudson2103820071219030666test\slave-slave0.log

      at hudson.Util.deleteFile()
    2. Hudson
      FilePath.deleteRecursive
      1. hudson.Util.deleteFile(Util.java:266)
      2. hudson.Util.deleteRecursive(Util.java:316)
      3. hudson.Util.deleteContentsRecursive(Util.java:227)
      4. hudson.Util.deleteRecursive(Util.java:307)
      5. hudson.FilePath$9.invoke(FilePath.java:826)
      6. hudson.FilePath$9.invoke(FilePath.java:824)
      7. hudson.FilePath.act(FilePath.java:758)
      8. hudson.FilePath.act(FilePath.java:740)
      9. hudson.FilePath.deleteRecursive(FilePath.java:824)
      9 frames
    3. Hudson :: Test Framework
      HudsonTestCase.tearDown
      1. org.jvnet.hudson.test.TemporaryDirectoryAllocator.dispose(TemporaryDirectoryAllocator.java:82)
      2. org.jvnet.hudson.test.TestEnvironment.dispose(TestEnvironment.java:53)
      3. org.jvnet.hudson.test.HudsonTestCase.tearDown(HudsonTestCase.java:352)
      3 frames
    4. JUnit
      TestCase.runBare
      1. junit.framework.TestCase.runBare(TestCase.java:140)
      1 frame
    5. Hudson :: Test Framework
      HudsonTestCase.runBare
      1. org.jvnet.hudson.test.HudsonTestCase.runBare(HudsonTestCase.java:264)
      1 frame
    6. JUnit
      JUnit38ClassRunner.run
      1. junit.framework.TestResult$1.protect(TestResult.java:110)
      2. junit.framework.TestResult.runProtected(TestResult.java:128)
      3. junit.framework.TestResult.run(TestResult.java:113)
      4. junit.framework.TestCase.run(TestCase.java:124)
      5. junit.framework.TestSuite.runTest(TestSuite.java:243)
      6. junit.framework.TestSuite.run(TestSuite.java:238)
      7. org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
      7 frames
    7. JUnit4 Provider
      JUnit4Provider.invoke
      1. org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
      2. org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:119)
      3. org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:101)
      3 frames
    8. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:601)
      4 frames
    9. SureFire
      ProviderFactory$ClassLoaderProxy.invoke
      1. org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
      1 frame
    10. Unknown
      $Proxy0.invoke
      1. $Proxy0.invoke(Unknown Source)
      1 frame
    11. SureFire
      ForkedBooter.main
      1. org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
      2. org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
      3. org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
      3 frames