Unable to cleanup build temporary directory

I get the following lines in a agent log.  What is worse is the build is marked as a success.  Does the following lines indicate what the issue is or is more info required?  This is with TeamCity 6.0.1, Windows 7

[22:04:12]: Clearing temporary directory: C:\TeamCity\buildAgent\temp\buildTmp
[22:04:13]: Failed to delete file: C:\TeamCity\buildAgent\temp\buildTmp\hsperfdata_SYSTEM\3248
[22:04:13]: Unable to cleanup build temporary directory: C:\TeamCity\buildAgent\temp\buildTmp

1
3 comments
Avatar
Permanently deleted user

Hello,

Did you have the same checkout directory specified for several build configurations?
Can you check were there any processes running on the machine that access the directory during the error occurrence? (You can use ProcessExplorer for finding processes that opened a file C:\TeamCity\buildAgent\temp\buildTmp\hsperfdata_SYSTEM\3248 ).



Kind regards,
Marina
0
Avatar
Permanently deleted user

I will check in more detail but the general outline is I have a build configuration that builds an IDEA based project triggered on a perforce change which is checked every 60 seconds.  There are two other build configurations but there are no triggers set for them.  They are only manually started.  They both use an Ant build step and both are dependent on a last successful build of the  IDEA based build configuration .  The Ant build step build configs are only to deploy the war file to a Tomcat server.  There is only one build agent which is on the same machine as the TeamCity server.

If I manually try deleting the file from the command line it states "buildTmp\HSPERF~1\3984 - Access is denied.".  Checking the permissions shows that "Everyone" has only read & execute and only SYSTEM and Administrators have full control.  

Maybe it is coincidence and something else changed but this was working fine when I had these two Ant based build configurations triggered on successful build of the IDEA based project build config.  Now that it is switched over to manually Running them I am getting this error.  I will attempt to switch it back to triggering on successful build of the IDEA based project and see if that fixes it but I did want to manually trigger these instead.

0

In this case Access is denied error means the file is actually locked by another process.
As Marina suggested, try to figure out what process exactly does that.
Also, you may consider using Swabra to force deletion.

Michael

0

Please sign in to leave a comment.