Run Build - Failed to Perform Checkout - IndexOutOfBoundsException

I have a system that was working fine until this morning.

Checkins to SVN automatically create builds on the TeamCity Server. This morning I checked in some changes in SVN and since then every build from then onwards returns:

Failed to start build
Build agent:     DUBS00005065

Error while applying patch

Error while applying patch: Failed to perform checkout on agent: java.lang.IndexOutOfBoundsException

[2015-10-20 11:06:49,786]   INFO - .ssh.AgentVcsRootSshKeyManager - Cannot find uploaded key property in VCS root "SVN_****" {internal id=3}
[2015-10-20 11:08:26,320]   WARN - ch.UpdateSourcesBuildStageBase - Error while checkout on agent: java.lang.IndexOutOfBoundsException  jetbrains.buildServer.vcs.VcsException: java.lang.IndexOutOfBoundsException      at jetbrains.buildServer.vcs.svn.SvnIncludeRuleUpdater$SvnSourceUpdater.checkoutSources(SvnIncludeRuleUpdater.java:205)      at jetbrains.buildServer.vcs.svn.SvnIncludeRuleUpdater.process(SvnIncludeRuleUpdater.java:86)      at jetbrains.buildServer.agent.impl.vcs.CheckoutByIncludeRuleAdapter$4.updateSources(CheckoutByIncludeRuleAdapter.java:97)      at jetbrains.buildServer.agent.impl.patch.ProjectSourcesOnAgent$1.run(ProjectSourcesOnAgent.java:249)      at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.IndexOutOfBoundsException      at java.nio.Buffer.checkBounds(Buffer.java:567)      at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:149)


I've tried restarting the Service for the Agent and the Server.
The Test Connection button under Edit VCS Root returns "Connection Successful"

Has anyone seen this error message before?

0
7 comments

Hi Michael,

What TeamCity version do you use? Could you please attach zipped logs from the build agent: buildAgent/logs directory?

0
Avatar
Permanently deleted user

Thanks for the reply. Yesterday evening a big update from SVN came in and the Error dissapeared.

I can post up the logs if you're interested in what happened, but I'm happy it's working again and I can move on.

Oh and it's 9.1.1 TC

0
Avatar
Permanently deleted user

We are seeing the same issue with TC9.1.3:

[2015-10-22 14:16:33,012]   WARN - ch.UpdateSourcesBuildStageBase - Error while checkout on agent: java.lang.IndexOutOfBoundsException
jetbrains.buildServer.vcs.VcsException: java.lang.IndexOutOfBoundsException
 at jetbrains.buildServer.vcs.svn.SvnIncludeRuleUpdater$SvnSourceUpdater.checkoutSources(SvnIncludeRuleUpdater.java:205)
 at jetbrains.buildServer.vcs.svn.SvnIncludeRuleUpdater.process(SvnIncludeRuleUpdater.java:86)
 at jetbrains.buildServer.agent.impl.vcs.CheckoutByIncludeRuleAdapter$4.updateSources(CheckoutByIncludeRuleAdapter.java:97)
 at jetbrains.buildServer.agent.impl.patch.ProjectSourcesOnAgent$1.run(ProjectSourcesOnAgent.java:249)
 at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IndexOutOfBoundsException
 at java.nio.Buffer.checkBounds(Buffer.java:567)
 at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:149)
 at org.tmatesoft.svn.core.internal.io.fs.FSFile.read(FSFile.java:387)
 at org.tmatesoft.svn.core.internal.io.fs.FSFS.applyDeltaFromFSFile(FSFS.java:920)
 at org.tmatesoft.svn.core.internal.io.fs.FSFS.parseRawDeltaProperties(FSFS.java:892)
 at org.tmatesoft.svn.core.internal.io.fs.FSFS.parseProperties(FSFS.java:969)
 at org.tmatesoft.svn.core.internal.io.fs.FSFS.getDirContents(FSFS.java:845)
 at org.tmatesoft.svn.core.internal.io.fs.FSRevisionNode.getDirEntries(FSRevisionNode.java:607)
 at org.tmatesoft.svn.core.internal.io.fs.FSUpdateContext.diffDirs(FSUpdateContext.java:333)
 at org.tmatesoft.svn.core.internal.io.fs.FSUpdateContext.updateEntry(FSUpdateContext.java:533)
 at org.tmatesoft.svn.core.internal.io.fs.FSUpdateContext.diffDirs(FSUpdateContext.java:413)
 at org.tmatesoft.svn.core.internal.io.fs.FSUpdateContext.updateEntry(FSUpdateContext.java:533)
 at org.tmatesoft.svn.core.internal.io.fs.FSUpdateContext.diffDirs(FSUpdateContext.java:413)
 at org.tmatesoft.svn.core.internal.io.fs.FSUpdateContext.updateEntry(FSUpdateContext.java:533)
 at org.tmatesoft.svn.core.internal.io.fs.FSUpdateContext.diffDirs(FSUpdateContext.java:413)
 at org.tmatesoft.svn.core.internal.io.fs.FSUpdateContext.drive(FSUpdateContext.java:310)
 at org.tmatesoft.svn.core.internal.io.fs.FSRepository.finishReport(FSRepository.java:560)
 at org.tmatesoft.svn.core.internal.wc17.SVNReporter17.report(SVNReporter17.java:196)
 at org.tmatesoft.svn.core.internal.io.fs.FSRepository.update(FSRepository.java:634)
 at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.updateInternal(SvnNgAbstractUpdate.java:247)
 at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.update(SvnNgAbstractUpdate.java:111)
 at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.checkout(SvnNgAbstractUpdate.java:855)
 at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgCheckout.run(SvnNgCheckout.java:26)
 at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgCheckout.run(SvnNgCheckout.java:11)
 at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgOperationRunner.run(SvnNgOperationRunner.java:20)
 at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
 at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1235)
 at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
 at jetbrains.buildServer.vcs.svn.TCSvnUpdateClient.doCheckout(TCSvnUpdateClient.java:102)
 at jetbrains.buildServer.vcs.svn.SvnIncludeRuleUpdater$SvnSourceUpdater.checkoutSources(SvnIncludeRuleUpdater.java:147)
 ... 4 more


One possibly significant detail is that we are using a file-based repository, and I suspect there may be some incompatibility between SVNkit and Apache Subversion 1.9.
0
Avatar
Permanently deleted user

Quick update, I could reproduce the failure with the SVNkit 1.8.11 command-line client.

0

Hello Anders,

   Sorry for the problem, I've filed this issue as https://youtrack.jetbrains.com/issue/TW-42951
   We'll contact SVNKit team for the fix.

   Thanks,

0
Avatar
Permanently deleted user

Hi Anders

Did you find any fix to get around this issue? We've tried reinstalling the agent but it's still throwing the exception.

We're seeing this issue again on every build.

INFO   | jvm 1    | 2015/11/11 11:11:30 | [2015-11-11 11:11:30,847]   WARN - ch.UpdateSourcesBuildStageBase - Error while checkout on agent: java.lang.IndexOutOfBoundsException
INFO   | jvm 1    | 2015/11/11 11:11:30 | jetbrains.buildServer.vcs.VcsException: java.lang.IndexOutOfBoundsException
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at jetbrains.buildServer.vcs.svn.SvnIncludeRuleUpdater$SvnSourceUpdater.checkoutSources(SvnIncludeRuleUpdater.java:205)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at jetbrains.buildServer.vcs.svn.SvnIncludeRuleUpdater.process(SvnIncludeRuleUpdater.java:86)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at jetbrains.buildServer.agent.impl.vcs.CheckoutByIncludeRuleAdapter$4.updateSources(CheckoutByIncludeRuleAdapter.java:97)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at jetbrains.buildServer.agent.impl.patch.ProjectSourcesOnAgent$1.run(ProjectSourcesOnAgent.java:249)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at java.lang.Thread.run(Thread.java:745)
INFO   | jvm 1    | 2015/11/11 11:11:30 | Caused by: java.lang.IndexOutOfBoundsException
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at java.nio.Buffer.checkBounds(Buffer.java:567)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:149)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at org.tmatesoft.svn.core.internal.io.fs.FSFile.read(FSFile.java:387)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at org.tmatesoft.svn.core.internal.io.fs.FSFS.applyDeltaFromFSFile(FSFS.java:920)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at org.tmatesoft.svn.core.internal.io.fs.FSFS.parseRawDeltaProperties(FSFS.java:892)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at org.tmatesoft.svn.core.internal.io.fs.FSFS.parseRawDeltaProperties(FSFS.java:889)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at org.tmatesoft.svn.core.internal.io.fs.FSFS.parseProperties(FSFS.java:969)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at org.tmatesoft.svn.core.internal.io.fs.FSFS.getDirContents(FSFS.java:845)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at org.tmatesoft.svn.core.internal.io.fs.FSRevisionNode.getDirEntries(FSRevisionNode.java:607)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at org.tmatesoft.svn.core.internal.io.fs.FSUpdateContext.diffDirs(FSUpdateContext.java:333)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at org.tmatesoft.svn.core.internal.io.fs.FSUpdateContext.updateEntry(FSUpdateContext.java:533)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at org.tmatesoft.svn.core.internal.io.fs.FSUpdateContext.diffDirs(FSUpdateContext.java:413)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at org.tmatesoft.svn.core.internal.io.fs.FSUpdateContext.updateEntry(FSUpdateContext.java:533)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at org.tmatesoft.svn.core.internal.io.fs.FSUpdateContext.diffDirs(FSUpdateContext.java:413)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at org.tmatesoft.svn.core.internal.io.fs.FSUpdateContext.updateEntry(FSUpdateContext.java:533)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at org.tmatesoft.svn.core.internal.io.fs.FSUpdateContext.diffDirs(FSUpdateContext.java:413)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at org.tmatesoft.svn.core.internal.io.fs.FSUpdateContext.updateEntry(FSUpdateContext.java:533)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at org.tmatesoft.svn.core.internal.io.fs.FSUpdateContext.diffDirs(FSUpdateContext.java:413)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at org.tmatesoft.svn.core.internal.io.fs.FSUpdateContext.drive(FSUpdateContext.java:310)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at org.tmatesoft.svn.core.internal.io.fs.FSRepository.finishReport(FSRepository.java:560)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at org.tmatesoft.svn.core.internal.wc17.SVNReporter17.report(SVNReporter17.java:196)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at org.tmatesoft.svn.core.internal.io.fs.FSRepository.update(FSRepository.java:634)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.updateInternal(SvnNgAbstractUpdate.java:247)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.update(SvnNgAbstractUpdate.java:111)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.checkout(SvnNgAbstractUpdate.java:855)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgCheckout.run(SvnNgCheckout.java:26)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgCheckout.run(SvnNgCheckout.java:11)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgOperationRunner.run(SvnNgOperationRunner.java:20)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1235)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at jetbrains.buildServer.vcs.svn.TCSvnUpdateClient.doCheckout(TCSvnUpdateClient.java:102)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     at jetbrains.buildServer.vcs.svn.SvnIncludeRuleUpdater$SvnSourceUpdater.checkoutSources(SvnIncludeRuleUpdater.java:147)
INFO   | jvm 1    | 2015/11/11 11:11:30 |     ... 4 more

0
Avatar
Permanently deleted user

Making a commit using a SVN 1.8 client fixed it. In our case, I had to make changes in two directories where I had earlier made a commit that changed a large (300+) amount of files, just a regular commit didn't help. In another team, they recreated the repository with the enable-dir-deltification and enable-props-deltification properties set to false.

The real fix is of course to start using a real SVN server, which avoids a lot of potential problems.

0

Please sign in to leave a comment.