"Unable to delete file" errors during build cleanup on Windows causing hung builds

XMLWordPrintable

    • 0
    • 3

      See for instance https://jira-bamboo.internal.atlassian.com/browse/JIRAMASTER-LDAPAD-JOB1-1200/log

      The build appears to complete normally, however it is hung and requires manual kill:

      build	11-Dec-2013 22:33:00	[INFO] ------------------------------------------------------------------------
      build	11-Dec-2013 22:33:00	[INFO] BUILD SUCCESSFUL
      build	11-Dec-2013 22:33:00	[INFO] ------------------------------------------------------------------------
      build	11-Dec-2013 22:33:00	[INFO] Total time: 19 minutes 18 seconds
      build	11-Dec-2013 22:33:00	[INFO] Finished at: Wed Dec 11 22:33:00 GMT 2013
      build	11-Dec-2013 22:33:00	[INFO] Final Memory: 84M/200M
      build	11-Dec-2013 22:33:00	[INFO] ------------------------------------------------------------------------
      command	15-Dec-2013 22:47:29	Request to stop 'JIRAMASTER-LDAPAD-JOB1-1200' received from jhazelwood
      

      Bamboo's error viewer shows the clue to the underlying problem
      https://jira-bamboo.internal.atlassian.com/admin/viewError.action?buildKey=JIRAMASTER-LDAPAD-JOB1&error=161

      java.io.IOException: Unable to delete file: C:\Users\Administrator\bamboo-agent-home\xml-data\build-dir\JIRAMASTER-LDAPAD-JOB1\jira-distribution\tpm-standalone\spm\target\atlassian-jira-6.2-SNAPSHOT-standalone\logs\manager.2013-12-12.log
      	at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2279)
      	at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1653)
      	at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1535)
      	at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2270)
      	at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1653)
      	at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1535)
      	at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2270)
      	at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1653)
      	at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1535)
      	at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2270)
      	at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1653)
      	at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1535)
      	at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2270)
      	at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1653)
      	at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1535)
      	at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2270)
      	at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1653)
      	at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1535)
      	at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2270)
      	at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1653)
      	at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.cleanWorkingDirectory(ExecuteBuildTask.java:129)
      	at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:98)
      	at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:181)
      	at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:101)
      	at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:108)
      	at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:55)
      	at java.lang.Thread.run(Thread.java:662)
      

      Observed in 5.3-m2

            Assignee:
            Unassigned
            Reporter:
            Mark Lassau (Inactive)
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: