Build failed when new build cleaning up

The builds randomly fail on start up.  I cut and past this title from another post; it seems to be a common problem.  Mine was different then the poster's whose title I co-opted in that I'm not using unit tests (just yet).  I'm running nant, and perforce.

Failed to start build:  Failed to clean files from: C:\TeamCity\buildAgent\work\fc9b0c0fedc3d0e
jetbrains.buildServer.RunBuildException:  Failed to clean files from: C:\TeamCity\buildAgent\work\fc9b0c0fedc3d0e
at  jetbrains.buildServer.agent.impl.buildStages.startStages.CleanBuildCheckoutDirectoryIfNeededStage$1.logFailedToCleanEntireFolder(CleanBuildCheckoutDirectoryIfNeededStage.java:40)  
at  jetbrains.buildServer.agent.impl.buildStages.startStages.DirectoryCleanerStage$1.logFailedToCleanEntireFolder(DirectoryCleanerStage.java:59)  
at  jetbrains.buildServer.agent.impl.directories.SmartDirectoryCleanerImpl.cleanFolder(SmartDirectoryCleanerImpl.java:67)  
at  jetbrains.buildServer.agent.impl.buildStages.startStages.DirectoryCleanerStage.doBuildStage(DirectoryCleanerStage.java:30)  
at  jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:31)  
at  jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:29)  
at  jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.callRunStage(StagesExecutor.java:76)  
at  jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:36)  
at  jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor.doStages(BuildStagesExecutor.java:24)  
at  jetbrains.buildServer.agent.impl.BuildRunAction.doStages(BuildRunAction.java:65)  
at  jetbrains.buildServer.agent.impl.BuildRunAction.runBuild(BuildRunAction.java:52)  
at  jetbrains.buildServer.agent.impl.BuildAgentImpl.doActualBuild(BuildAgentImpl.java:245)  
at  jetbrains.buildServer.agent.impl.BuildAgentImpl.access$100(BuildAgentImpl.java:50)  
at  jetbrains.buildServer.agent.impl.BuildAgentImpl$1.run(BuildAgentImpl.java:218)  
at java.lang.Thread.run(Unknown Source)


So far I have to restart the build agent each time I encounter this error. Is there a solution in the pipe for this?  I'm running 6.5.4 (build 18046) in a test enviroment and it doesn't seem our production enviroment (6.5.2) has this problem.  This is not a "sometimes" thing... it happens every day, several times a day.  I keep the services window open I'm restarting that agent that often.
1 comment
Comment actions Permalink

Hi David

Check if are there any processes left after a build which lock file handles in the checkout directory.
Also, we have Build Files Cleaner feature that allows to close the handles automatically.

Michael

0

Please sign in to leave a comment.