Cannot build patch errors after upgrading to 8.1.2

We just upgraded TeamCity from v7 to v8.1.2. Everything seemed to work fine, the agents upgraded, and the first build worked.

Now I'm getting

Failed to build patch for build #2575 {build id=207409}, VCS root: "Sherman.Main" {instance id=712, parent internal id=2, parent id=Sherman_Main, description: "tfs: http://tfs2012.ourdomain.com:8080/tfs/DefaultCollection $/Sherman/Main"}, due to error: Cannot build patch: java.io.EOFException

Regardless of the build agent (we have three, each on a separate server).

TFS is working fine - and the first build successfully downloaded files from TFS.

How can we resolve this?

Stack trace:
jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl$1: Server was not able to build correct patch, most likely due to VCS errors at jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl.throwError(PatchDownloaderImpl.java:118) at jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl.checkPatch(PatchDownloaderImpl.java:108) at jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl.copyPatchAndCheck(PatchDownloaderImpl.java:69) at jetbrains.buildServer.agent.impl.patch.UpdateSourcesPatcherBase.copyPatchToTempFile(UpdateSourcesPatcherBase.java:71) at jetbrains.buildServer.agent.impl.patch.UpdateSourcesFromServer.updateSources(UpdateSourcesFromServer.java:60) at jetbrains.buildServer.agent.impl.patch.UpdateSourcesBuildStageBase.doSourceUpdate(UpdateSourcesBuildStageBase.java:91) at jetbrains.buildServer.agent.impl.patch.UpdateSourcesBuildStageBase.doRecoverableStage(UpdateSourcesBuildStageBase.java:59) at jetbrains.buildServer.agent.impl.buildStages.startStages.RecoverableBuildStage.doLastAttempt(RecoverableBuildStage.java:112) at jetbrains.buildServer.agent.impl.buildStages.startStages.RecoverableBuildStage.doBuildStage(RecoverableBuildStage.java:70) at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:31) at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:24) at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.callRunStage(StagesExecutor.java:78) at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:37) at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor.doStages(BuildStagesExecutor.java:24) at jetbrains.buildServer.agent.impl.BuildRunAction.doStages(BuildRunAction.java:70) at jetbrains.buildServer.agent.impl.BuildRunAction.runBuild(BuildRunAction.java:50) at jetbrains.buildServer.agent.impl.BuildAgentImpl.doActualBuild(BuildAgentImpl.java:265) at jetbrains.buildServer.agent.impl.BuildAgentImpl.access$100(BuildAgentImpl.java:52) at jetbrains.buildServer.agent.impl.BuildAgentImpl$1.run(BuildAgentImpl.java:231)

7 comments
Comment actions Permalink

Please attach teamcity-vcs.log and teamcity-server.log files from the server.

0
Comment actions Permalink

I believe I have resolved the issue.

  1. Disabled agents
  2. Cleaned out running builds & build queue
  3. Stopped TeamCity service
  4. Removed all TFS Workspaces (using Visual Studio - File/Source Control) on each agent
  5. Deleted subdirectories of BuildAgent\work (except .old) (preserving directory.map file) on each agent
  6. Deleted BuildServer\system\caches
  7. Rebooted build server
  8. Enabled agents


It's possible that this was due to low disk space on the agents.

Feature suggestions:

  • Better error messages ("Agent Foo is low on disk space")
  • Improved automated cleanup of working directories/workspaces/temp files/caches
0
Comment actions Permalink

Actually there should be some error message in teamcity-vcs.log.

0
Comment actions Permalink

The same info is in the vcs.log (nothing new):

[2014-04-24 18:19:54,525]   WARN [rmal executor 9] -      jetbrains.buildServer.VCS - Failed to build patch for build #3340 {build id=207386}, VCS root: "Abrams.Main (1)" {instance id=640, parent internal id=111, parent id=Abrams_Main__1_, description: "tfs: http://tfs2012ourserver.com:8080/tfs/DefaultCollection $/Abrams/Main"}, due to error: Cannot build patch: java.io.EOFException

jetbrains.buildServer.vcs.VcsRootVcsException: Cannot build patch: java.io.EOFException

    at jetbrains.buildServer.serverSide.impl.projectSources.PatchComposer.buildPatchForRoot(PatchComposer.java:196)

    at jetbrains.buildServer.serverSide.impl.projectSources.PatchComposer.buildPatch(PatchComposer.java:51)

    at jetbrains.buildServer.serverSide.impl.BuildTypeImpl.buildPatch(BuildTypeImpl.java:866)

    at jetbrains.buildServer.serverSide.impl.BuildStarter$3.call(BuildStarter.java:19)

    at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:117)

    at jetbrains.buildServer.serverSide.impl.BuildStarter$4.call(BuildStarter.java:0)

    at java.util.concurrent.FutureTask.run(FutureTask.java:262)

    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

    at java.lang.Thread.run(Thread.java:744)

Caused by: jetbrains.buildServer.vcs.VcsException: Cannot build patch: java.io.EOFException

    ... 10 more

Caused by: java.io.EOFException

    at java.io.DataInputStream.readByte(DataInputStream.java:267)

    at jetbrains.buildServer.vcs.patches.LowLevelPatcher.readAction(LowLevelPatcher.java:29)

    at jetbrains.buildServer.vcs.patches.LowLevelPatcher.readPatchStream(LowLevelPatcher.java:98)

    at jetbrains.buildServer.vcs.patches.LowLevelPatcher.applyPatch(LowLevelPatcher.java:88)

    at jetbrains.buildServer.serverSide.impl.projectSources.PatchComposer.getOrMakeCacheableCleanPatch(PatchComposer.java:187)

    at jetbrains.buildServer.serverSide.impl.projectSources.PatchComposer.makeCleanPatch(PatchComposer.java:5)

    at jetbrains.buildServer.serverSide.impl.projectSources.PatchComposer.makePatch(PatchComposer.java:115)

    at jetbrains.buildServer.serverSide.impl.projectSources.PatchComposer.buildPatchForRoot(PatchComposer.java:84)

    ... 9 more
0
Comment actions Permalink

So there's no fix for it and the bug hasn't been verified.

0
Comment actions Permalink

We could not reproduce it.

0

Please sign in to leave a comment.