SVN Checkout on agent always fails with exception in 4.0.1

I just upgraded a TeamCity installation from 3.x.x to 4.0.1, but now certain builds do not run, and I don't know why. I get the following log (URL portions replaced with dashes):

[13:58:27]: Checking for changes
[13:58:27]: Clearing temporary directory: /home/teamcity/TeamCity/buildAgent/temp/buildTmp
[13:58:27]: Checkout directory: /home/teamcity/TeamCity/buildAgent/work/483004a4ff245559
[13:58:27]: Updating project sources
[13:58:27]: Clearing /home/teamcity/TeamCity/buildAgent/work/483004a4ff245559/.
[13:58:27]: Checking /home/teamcity/TeamCity/buildAgent/work/483004a4ff245559/. out from svn
[13:58:27]: Removing files from /home/teamcity/TeamCity/buildAgent/work/483004a4ff245559/.
[13:58:27]: Failed to delete empty directory: /home/teamcity/TeamCity/buildAgent/work/483004a4ff245559/.
[13:58:28]: jetbrains.buildServer.vcs.VcsException: org.tmatesoft.svn.core.SVNException: svn: Error during update from http://localhost/svn/------/-----------/trunk to /home/teamcity/TeamCity/buildAgent/work/483004a4ff245559/.
svn: Working copy '/home/teamcity/TeamCity/buildAgent/work/483004a4ff245559/.' locked; try performing 'cleanup'
jetbrains.buildServer.vcs.VcsException: org.tmatesoft.svn.core.SVNException: svn: Error during update from http://localhost/svn/------/-----------/trunk to /home/teamcity/TeamCity/buildAgent/work/483004a4ff245559/.
svn: Working copy '/home/teamcity/TeamCity/buildAgent/work/483004a4ff245559/.' locked; try performing 'cleanup'
at jetbrains.buildServer.vcs.svn.SvnCheckoutOnAgentSupport.updateSources(SvnCheckoutOnAgentSupport.java:103)
at jetbrains.buildServer.agent.impl.patch.GetProjectSources.checkoutSources(GetProjectSources.java:278)
at jetbrains.buildServer.agent.impl.patch.GetProjectSources.execute(GetProjectSources.java:100)
at jetbrains.buildServer.agent.impl.runStages.GetSourcesStage.doBuildStage(GetSourcesStage.java:31)
at jetbrains.buildServer.agent.impl.BuildRunAction.doStages(BuildRunAction.java:115)
at jetbrains.buildServer.agent.impl.BuildRunAction.run(BuildRunAction.java:81)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.tmatesoft.svn.core.SVNException: svn: Error during update from http://localhost/svn/----/-----/trunk to /home/teamcity/TeamCity/buildAgent/work/483004a4ff245559/.
svn: Working copy '/home/teamcity/TeamCity/buildAgent/work/483004a4ff245559/.' locked; try performing 'cleanup'
at jetbrains.buildServer.vcs.svn.TCSvnUpdateClient.doCheckout(TCSvnUpdateClient.java:77)
at jetbrains.buildServer.vcs.svn.SvnCheckoutOnAgentSupport.updateSources(SvnCheckoutOnAgentSupport.java:73)
... 6 more
Caused by: org.tmatesoft.svn.core.SVNException: svn: Working copy '/home/teamcity/TeamCity/buildAgent/work/483004a4ff245559/.' locked; try performing 'cleanup'
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
at org.tmatesoft.svn.core.internal.wc.admin.SVNAdminArea14.lock(SVNAdminArea14.java:1552)
at org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess.doOpen(SVNWCAccess.java:359)
at org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess.open(SVNWCAccess.java:263)
at org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess.open(SVNWCAccess.java:256)
at org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess.openAnchor(SVNWCAccess.java:151)
at org.tmatesoft.svn.core.wc.SVNUpdateClient.update(SVNUpdateClient.java:413)
at org.tmatesoft.svn.core.wc.SVNUpdateClient.doCheckout(SVNUpdateClient.java:871)
at jetbrains.buildServer.vcs.svn.TCSvnUpdateClient.doCheckout(TCSvnUpdateClient.java:74)
... 7 more


I am running Ubuntu Linux 8.04 LTS with the .tar.gz form of TeamCity (that comes with Tomcat). SVN 1.5, MySQL 5, TeamCity 4, and single agent all on the same server.

To resolve this, I first tried to delete the work directory entirely to let it recreate it. That did not work. Setting VCS checkout to "checkout on server" works fine, but is not ideal in terms of performance as my understanding is that it will copy all files twice and also perform a "clean checkout" every time and not allow SVN incremental update. If "checkout on server" is faster, please let me know and I can switch anything to that and workaround this problem.

The checkout rule is: +:-----/trunk=>./ The base URL is http://localhost/svn/----/ (dashes used in place of project names)

Any suggestions?

4 comments
Comment actions Permalink

Sorry, I didn't make it totally clear in my last post (only implied it), but the issue only appears to happen when the build configuration is set to "Automatically on agent." When I change this to "Automatically on server" checkout mode, it works. When I change it back, it fails on every project I've tried. Most of my projects, but not all, are set to agent checkout. I imagine that I really wanted agent checkout for all projects for best performance.

0
Comment actions Permalink

Please submit a bug to our tracker with exception attached: http://jetbrains.net/tracker/workspace/TW

0
Comment actions Permalink

Thanks for the report,
the workaround for this problem is to use checkout rule ending with =>. instead of =>./

Regards,
KIR

0

Please sign in to leave a comment.