TeamCity/Vault build failing due to SQL exception

I suspect this will end up turning into a bug report, but I wanted to check to see if anyone can shed any light on the problem before reporting it.

We're running TeamCity (9.0.2 build 32195) and Sourcegear Vault, and out last successful build was the morning of the 4th (11 days ago). Every attempted build of this project since then has failed.

The build report from the latest (failed) build is:

Build 'Client :: WebApi :: AutoBuild' #1.0.174.0
Started 'Mon May 11 16:46:04 AEST 2015' on 'localhost' by 'Random Jones'
Finished 'Mon May 11 16:47:13 AEST 2015' with status 'FAILURE Unable to collect changes'
TeamCity URL http://teamcity-win7v:8111/viewLog.html?buildId=6049&buildTypeId=Client_WebApi_AutoBuild
TeamCity server version is 9.0.2 (build 32195)

[16:46:04]i: TeamCity server version is 9.0.2 (build 32195)
[16:46:05]E: bt14 (1m:08s)
[16:46:05] : Checking for changes (running for 1m:08s)
[16:46:05] : Collecting changes in 1 VCS root (1m:07s)
[16:46:05] :      [Collecting changes in 1 VCS root] VCS Root details
[16:46:05] :           [VCS Root details] "VaultClientRepository" {instance id=29, parent internal id=8, parent id=ClientVaultClientRepository, description: "vault: https://vault.redgum.com.au/VaultService"}
[16:46:05]i:      [Collecting changes in 1 VCS root] Waiting for completion of current operations for the VCS root 'VaultClientRepository'
[16:46:25]i:      [Collecting changes in 1 VCS root] Detecting changes in VCS root 'VaultClientRepository' (used in AutoBuild, InternalBuild and 3 other configurations)
[16:46:25]i:      [Collecting changes in 1 VCS root] Will collect changes for 'VaultClientRepository' starting from revision 168947
[16:46:25]i:      [Collecting changes in 1 VCS root] VCS revisions for 'VaultClientRepository' - 168947..none
[16:46:25]i:      [Collecting changes in 1 VCS root] Processing combined checkout rule for 'VaultClientRepository'  with 2 include rules
[16:47:13]E: Failed to collect changes, error: Error collecting changes for VCS repository '"VaultClientRepository" {instance id=29, parent internal id=8, parent id=ClientVaultClientRepository, description: "vault: https://vault.redgum.com.au/VaultService"}'
jetbrains.buildServer.serverSide.db.UnexpectedDBException: Unexpected exception BatchUpdateException: SQL error when doing: Execute batch for tuples
SQL query: insert into vcs_change ( modification_id, file_num,    
          vcs_file_name, vcs_file_name_hash,           
          relative_file_name_pos,                      
          relative_file_name, relative_file_name_hash,
          change_type, change_name,                    
          before_revision, after_revision )            
values (  ?, :myFileNum,                               
          :myVcsFileName, :myVcsFileNameHash,          
          :myRelFileNamePos,                           
          :myRelFileName, :myRelFileNameHash,          
          :myChangeType, :myChangeName,                
          :myBefo...
[16:47:13] : Build finished


The (non-truncated) error for the build is:

Error collecting changes for VCS repository '"VaultClientRepository" {instance id=29, parent internal id=8, parent id=ClientVaultClientRepository, description: "vault: https://vault.redgum.com.au/VaultService"}'
jetbrains.buildServer.serverSide.db.UnexpectedDBException: Unexpected exception BatchUpdateException: SQL error when doing: Execute batch for tuples
SQL query: insert into vcs_change ( modification_id, file_num,
vcs_file_name, vcs_file_name_hash,
relative_file_name_pos,
relative_file_name, relative_file_name_hash,
change_type, change_name,
before_revision, after_revision )
values ( ?, :myFileNum,
:myVcsFileName, :myVcsFileNameHash,
:myRelFileNamePos,
:myRelFileName, :myRelFileNameHash,
:myChangeType, :myChangeName,
:myBeforeRevision, :myAfterRevision )

SQL exception: String or binary data would be truncated.


The afternoon of the 4th, I made some changes to the project where I renamed a file from one fairly long name to another. I suspect that this change is what's caused the issue. However, looking at the data in the table, everything seems to be trucated correctly. The "obvious" column that would be causing issues is the change_name column with a length of only 64, but what's in the column seems to be truncating at 63 characters for long renames, so it doesn't look like it's the problem.

Anyone have any ideas, or anything that may help?

Enjoy
Random

2 comments
Comment actions Permalink

Right, so in an attempt to fix this, I've done a few things.

1) Rename the files back to what they were - Failed.

2) Rollback the renamed files in Vault back to before they were renamed - Failed.

3) Delete the files from the project - Success!

So, it definitely looks like it was the renamed files that were causing the problem.

I'm definitely going to be logging this as a bug.

0

Please sign in to leave a comment.