TeamCity 7.0.2 .svn\wc.db locked when using 'Agent side checkout'

Hi,

I've just been trialling using the 'Agent side checkout' option for my team city builds, and have ran into an issue related to this youTRACK bug.
I've made sure to update my server to 7.0.2 in an attempt to fix it.

The initial checkout is fine, all works well and the build works great. (using svn 1.7 btw)
Subsequent builds are also fine, the update works correctly and all data is obtained.
In a situation where I need to clear the checkout, and re-checkout, I get this failure message.

[10:28:30]Updating sources: agent side checkout (7s)
[10:28:30][Updating sources] Will perform clean checkout. Reason: The project sources on the agent are newer than requested
[10:28:30][Updating sources] Cleaning C:\TeamCity\buildAgent\work\72cc5abbe35a5c66
[10:28:37][Updating sources] Failed to delete file: C:\TeamCity\buildAgent\work\72cc5abbe35a5c66\.svn\wc.db
[10:28:37][Updating sources] Failed to perform checkout on agent: Failed to clean build checkout directory: C:\TeamCity\buildAgent\work\72cc5abbe35a5c66

Looking at that wc.db file, it's locked by tsvncache, is there a way to resolve this?

4 comments
Comment actions Permalink

Hello Jim,

   Looks like you have some TortoiseSVN process which locks the directory - and TeamCity agent cannot handle this case.
   Please make sure you don't run TortoiseSVN for the TeamCity working directory.

 

   Regards,
   KIR

0
Comment actions Permalink

Hi KIR, thanks for the response,

To the best of my knowledge, nothing was ran between each of the builds that would cause TortoiseSVN to do anything with the working copy, unless you're referring to the locking of the server itself?

The way I produced this error was solely through the web dashboard UI. And the configuration being tested only attempts to compile a given visual studio 2010 solution within the checkout.

It seemed strange to me that clicking 'run' would work fine, it'd correctly update to the latest revision, and successfully build.
While clicking the [...] for custom run actions, and selecting a previous SVN revision from the changes tab forced the clean and recheckout, and produced the error messages printed in the original post.

I can perhaps experiment some more, but our checkout takes about 35 minutes, so it's not a simple one to test.

Thanks,
Jim

0
Comment actions Permalink

Hello Jim,

  The matter is, TeamCity doesn't use TortoiseSVN at all - it uses a Java library to access SVN working copy.
  So, TortoiseSVN should not access TeamCity's buildAgent working copy.

  Please make sure TortoiseSVN is not running on the machine where build agent is running.

  Hope this helps,
  KIR

0
Comment actions Permalink

Ahh, I see, so the problem is primarily due to me having TortoiseSVN installed.
Because TeamCity is creating a checkout with Java, TSVN will happily find that new working copy in the background and assume it can work with it (for Explorer shell and such I suppose).

So it sounds like the ideal approach would be to uninstall tsvn or at least set it to ignore the TeamCity buildagent WC.


I'll mark this question as 'answered', thanks for the clarification.

It would have been nice for us to be able to log onto the build agent displaying a test failure, fix the issue there, and commit from there using TortoiseSVN, but I suppose that's undesirable using TeamCity.

Thanks again,

0

Please sign in to leave a comment.