IndexOutOfBoundsException when checking out from SVN (on build 4161)

Hello, I reported this before on 4111 but 4161 behaves still the same.

I'm trying to make TeamCity checkout source files (including the maven configuration files if it helps) from subversion but it ends immediately (within 10 seconds) with following exception:

: Checking for changes (<1s)
: Building in /home/pepan/TeamCity/buildAgent/work/Server/deset
: Getting project sources (16s)
: Could not get project sources: for build #16
: java.lang.IndexOutOfBoundsException
java.lang.IndexOutOfBoundsException
at java.nio.Buffer.checkBounds(Buffer.java:454)
at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:125)
at java.nio.ByteBuffer.get(ByteBuffer.java:674)
at org.tmatesoft.svn.core.internal.delta.SVNDeltaReader.deflate(SVNDeltaReader.java:159)
at org.tmatesoft.svn.core.internal.delta.SVNDeltaReader.nextWindow(SVNDeltaReader.java:125)
at org.tmatesoft.svn.core.internal.io.dav.handlers.BasicDAVDeltaHandler.characters(BasicDAVDeltaHandler.java:98)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.characters(AbstractSAXParser.java:570)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanContent(XMLDocumentFragmentScannerImpl.java:1062)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1649)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.readData(HTTPConnection.java:634)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.readData(HTTPConnection.java:597)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPRequest.dispatch(HTTPRequest.java:197)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:285)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:230)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:218)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.doReport(DAVConnection.java:219)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.doReport(DAVConnection.java:211)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.update(DAVRepository.java:608)
at jetbrains.buildServer.buildTriggers.vcs.svn.SvnConnection.exportFiles(SvnConnection.java:152)
at jetbrains.buildServer.buildTriggers.vcs.svn.SvnConnection.buildPatch(SvnConnection.java:174)
at jetbrains.buildServer.buildTriggers.vcs.svn.SvnSupport.buildPatch(SvnSupport.java:80)
at jetbrains.buildServer.serverSide.impl.BuildTypeImpl.buildPatch(BuildTypeImpl.java:25)
at jetbrains.buildServer.serverSide.impl.BuildTypeImpl.buildPatch(BuildTypeImpl.java:34)
at jetbrains.buildServer.serverSide.impl.BuildStarter$3.run(BuildStarter.java:14)
at java.lang.Thread.run(Thread.java:595)
: Build finished

Any help?

3 comments

Hello,

This is one on issues that occur sometimes, but we cannot track it down yet. Could you please turn SVN debug logging on (see "SVN Logging" section at http://www.jetbrains.net/confluence/display/TW/HowtoDebug+problems#HowtoDebugproblems-SVNLogging ) and when it reproduces, attach the archived logs to http://jetbrains.net/jira/browse/TW-1913 issue?

Please note that sever reboot usually helps with the issue at least for some time.

--
Best regards,

Yegor Yarko
Quality Assurance Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

I have restarted the server and it really did help. I have encountered two different problems, however.

1. The log outputs are mixed.
I have run maven compilation (see the second problem below) and this was the log (All messages shown in project page):
: Analyzing code... 84%
: Analyzing code... 85%
: Analyzing code... 86%
: Done.
: Build has too many problems ...
: updating diff...
: Total: 4280 (1 -7) Errors: 106 (0 -0)
: Inspection output: /usr/java/jdk1.5.0_10/bin/java -Djdk.1.5.home=/usr/java/jdk1.5.0_10/ -Dbuild.working.dir=/home/pepan/TeamCity/buildAgent/work/Server/deset -Dbuild.number=4 -Duser.language=en -Duser.country=US -Dos.version=2.6.19-1.2895.fc6 -Duser.timezone=Europe/Prague -Dfile.encoding=UTF-8 -Dfile.separator=/ -Didea.no.jdk.check=true -Dos.arch=i386 -Djdk.1.5=/usr/java/jdk1.5.0_10 -Djava.io.tmpdir=/home/pepan/TeamCity/buildAgent/bin/../temp/teamcity.tmp -Dbuild.vcs.number.1=107 -Didea.plugins.path=/home/pepan/TeamCity/buildAgent/plugins/idea/plugins -Duser.name=pepan -Dos.name=Linux -Didea.build.agent.port=9090 -Didea.system.path=/home/pepan/TeamCity/buildAgent/work/Server/deset/system -Didea.config.path=/home/pepan/TeamCity/buildAgent/temp/teamcity.tmp/config -Dteamcity.buildType.id=bt5 -Dsuccessful.build.number=1 -Didea.home.path=/home/pepan/TeamCity/buildAgent/plugins/idea -Duser.home=/home/pepan -Didea.build.server.build.id=23 -Dpath.separator=: -Xmx512m -Xbootclasspath/p:/home/pepan/TeamCity/buildAgent/plugins/idea/lib/boot.jar -classpath /usr/java/jdk1.5.0_10/lib/tools.jar:/home/pepan/TeamCity/buildAgent/plugins/idea/lib/bootstrap.jar:/home/pepan/TeamCity/buildAgent/plugins/idea/lib/extensions.jar:/home/pepan/TeamCity/buildAgent/plugins/idea/lib/openapi.jar:/home/pepan/TeamCity/buildAgent/plugins/idea/lib/jdom.jar:/home/pepan/TeamCity/buildAgent/plugins/idea/lib/log4j.jar com.intellij.idea.Main inspect /home/pepan/TeamCity/buildAgent/work/Server/deset/deset.ipr profile /home/pepan/TeamCity/buildAgent/temp/teamcity.tmp/inspection25535result -e -v3
: Checking for changes (<1s)
: Building in /home/pepan/TeamCity/buildAgent/work/Server/deset
: Getting project sources (15s)
: sh /home/pepan/TeamCity/buildAgent/plugins/maven-2.0.6/bin/mvn -f /home/pepan/TeamCity/buildAgent/work/Server/deset/prototype1/pom.xml -B -Dbuild.vcs.number.1=160 -Djdk.1.5.home=/usr/java/jdk1.5.0_10/ -Dbuild.working.dir=/home/pepan/TeamCity/buildAgent/work/Server/deset -Dagent.name=Default_agent -Duser.name=pepan -Dbuild.number=10 -Dos.name=Linux -Duser.language=en -Duser.country=US -Didea.build.agent.port=9090 -Dos.version=2.6.19-1.2895.fc6 -Duser.timezone=Europe/Prague -Dfile.encoding=UTF-8 -Dfile.separator=/ -Dagent.work.dir=/home/pepan/TeamCity/buildAgent/work -Dteamcity.buildType.id=bt7 -Dos.arch=i386 -Dsuccessful.build.number=1 -Duser.home=/home/pepan -Didea.build.server.build.id=23 -Dpath.separator=: -Djava.io.tmpdir=/home/pepan/TeamCity/buildAgent/temp/teamcity.tmp compile
: /home/pepan/TeamCity/buildAgent/plugins/maven-2.0.6/bin/mvn: line 20: : command not found
: /home/pepan/TeamCity/buildAgent/plugins/maven-2.0.6/bin/mvn: line 23: : command not found
: /home/pepan/TeamCity/buildAgent/plugins/maven-2.0.6/bin/mvn: line 38: : command not found
: /home/pepan/TeamCity/buildAgent/plugins/maven-2.0.6/bin/mvn: line 39: : command not found
: /home/pepan/TeamCity/buildAgent/plugins/maven-2.0.6/bin/mvn: line 60: syntax error near unexpected token `in '
: /home/pepan/TeamCity/buildAgent/plugins/maven-2.0.6/bin/mvn: line 60: `case "`uname`" in '
: Number of processed tests: 0
: Build finished


You can notice that only the end of the log is valid (also the times can be used to learn it). The beginning is taken from completely different build log (from inspections).

2. The default maven installation does not work on Linux (I'm using the tar.gz distribution bundled with Tomcat). First of all, mvn is not set as runnable, second, the encoding of the file is wrong (incorrect encoding of new lines). I had to download a fresh maven from the apache site and replaced the default one, then it worked.

0

1.
Mixed logs can be a sign of mismatched .Buildserver\system directory and the database state. i.e. new build id is assigned based on the builds in the database, but the log of the build with the same id happens to already exist in the .Buildserver\system. This may happen if you restored database state without restoring the "system" directory. If you do not have matching backup, you may try to clear .Buildserver\system folder (losing artifacts and logs of previous builds); please back it up beforehand.

2.
Thank you, we will look into Maven-Linux issue. See http://jetbrains.net/jira/browse/TW-2521

--
Best regards,

Yegor Yarko
Quality Assurance Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

Please sign in to leave a comment.