Build log errors after upgrade

After upgrading from TeamCity version 4 to version 9, old Build Logs are broken.  Build logs from new builds seem to work fine, but all old logs give the following error:

"Attempt to read past the end of the build log file (905971010 bytes requested at current index 22). The build log is broken which can be caused by incorrect server shutdown. If many builds are affected on a regular basis, please turn to TeamCity support."

Additionally, there are lots of errors related to the build logs in the TeamCity server logs...

[2015-03-23 21:32:44,295]  ERROR - Side.buildLog.LogMessageFacade - Failed to read from build log file "D:\TeamCity_Data\system\artifacts\PyroSim\Release Build\531\.teamcity\logs\buildLog.msg5": jetbrains.buildServer.serverSide.buildLog.BrokenBuildLogException: Attempt to read past the end of the build log file (855639362 bytes requested at current index 22). The build log is broken which can be caused by incorrect server shutdown. If many builds are affected on a regular basis, please turn to TeamCity support.
[2015-03-23 21:32:44,295]  ERROR - tbrains.buildServer.ACTIVITIES - ERROR publishing build for jetbrains.buildServer.serverSide.statistics.BuildDurationTimes@19f2169 (#184 {build id=531, buildTypeId=bt3}): Attempt to read past the end of the build log file (855639362 bytes requested at current index 22). The build log is broken which can be caused by incorrect server shutdown. If many builds are affected on a regular basis, please turn to TeamCity support.
jetbrains.buildServer.serverSide.buildLog.BrokenBuildLogException: Attempt to read past the end of the build log file (855639362 bytes requested at current index 22). The build log is broken which can be caused by incorrect server shutdown. If many builds are affected on a regular basis, please turn to TeamCity support.
 at jetbrains.buildServer.serverSide.buildLog.AbstractLowLevelReader.readSplittedString(AbstractLowLevelReader.java:13)
 at jetbrains.buildServer.serverSide.buildLog.AbstractLowLevelReader.next(AbstractLowLevelReader.java:24)
 at jetbrains.buildServer.serverSide.buildLog.LogMessageFacade$9$1.run(LogMessageFacade.java:3)
 at jetbrains.buildServer.serverSide.buildLog.LogMessageFacade.runExclusively(LogMessageFacade.java:106)
 at jetbrains.buildServer.serverSide.buildLog.LogMessageFacade.access$1800(LogMessageFacade.java:86)
 at jetbrains.buildServer.serverSide.buildLog.LogMessageFacade$9.readMessagesChunkIfBufferEmpty(LogMessageFacade.java:5)
 at jetbrains.buildServer.serverSide.buildLog.LogMessageFacade$9.hasNext(LogMessageFacade.java:21)
 at jetbrains.buildServer.serverSide.buildLog.LogMessageFacade$LogMessageIterator.hasNext(LogMessageFacade.java:5)
 at jetbrains.buildServer.serverSide.buildLog.FilteredIterator.getNext(FilteredIterator.java:11)
 at jetbrains.buildServer.serverSide.buildLog.FilteredIterator.hasNext(FilteredIterator.java:4)
 at jetbrains.buildServer.serverSide.statistics.BuildDurationTimes.collectBuildDurationsPerBlockType(BuildDurationTimes.java:67)
 at jetbrains.buildServer.serverSide.statistics.BuildDurationTimes.buildFinished(BuildDurationTimes.java:57)
 at jetbrains.buildServer.serverSide.statistics.impl.StatisticsPublisher.publishBuildForValueType(StatisticsPublisher.java:56)
 at jetbrains.buildServer.serverSide.statistics.impl.StatisticsPublisher.publishHistoryChunk(StatisticsPublisher.java:61)
 at jetbrains.buildServer.serverSide.statistics.impl.StatisticsPublisher$PublishChunkTask.run(StatisticsPublisher.java:6)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)


It appears that all of the logs have been auto-migrated from the messages folder into artifacts, but none tyring to view them in the web interface always gives an error.  Is there anything that can be done to repair the old build logs?

1 comment
Comment actions Permalink

Hi Brian,

(copied from email conversation)
There was the bug found in our code. The issue in our tracker: https://youtrack.jetbrains.com/issue/TW-40562, please watch it for the fix.
Unfortunately, there is no workaround for now.

0

Please sign in to leave a comment.