1

Recently we have upgraded TC to the latest version (TeamCity Professional 2021.1.1 (build 92714)).

After upgrade builds run fine when a new VCS root is created, but after a push is made to the repository, VCS root falls over when trying to detect the changes. Based on the Stack trace it looks like there is a problem when retrieving free memory. Here is the stack trace:

java.lang.NumberFormatException: For input string: "18446744073709551615"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.lang.Long.parseLong(Long.java:592)
    at java.lang.Long.parseLong(Long.java:631)
    at jdk.internal.platform.cgroupv1.SubSystem.convertStringToLong(SubSystem.java:159)
    at jdk.internal.platform.cgroupv1.SubSystem.getLongValue(SubSystem.java:153)
    at jdk.internal.platform.cgroupv1.Metrics.getMemoryLimit(Metrics.java:410)
    at sun.management.OperatingSystemImpl.getFreePhysicalMemorySize(OperatingSystemImpl.java:99)
    at jetbrains.buildServer.buildTriggers.vcs.git.GitServerUtil.getFreePhysicalMemorySize(GitServerUtil.java:541)
    at jetbrains.buildServer.buildTriggers.vcs.git.ProcessXmxProvider.getDefaultStartXmx(ProcessXmxProvider.java:151)
    at jetbrains.buildServer.buildTriggers.vcs.git.ProcessXmxProvider.<init>(ProcessXmxProvider.java:63)
    at jetbrains.buildServer.buildTriggers.vcs.git.FetchCommandImpl.fetchInSeparateProcess(FetchCommandImpl.java:100)
    at jetbrains.buildServer.buildTriggers.vcs.git.FetchCommandImpl.fetch(FetchCommandImpl.java:89)
    at jetbrains.buildServer.buildTriggers.vcs.git.CommitLoaderImpl.doFetch(CommitLoaderImpl.java:126)
    at jetbrains.buildServer.buildTriggers.vcs.git.CommitLoaderImpl.loadCommits(CommitLoaderImpl.java:162)
    at jetbrains.buildServer.buildTriggers.vcs.git.GitCollectChangesPolicy$FetchContext.fetchIfNoCommitsOrFail(GitCollectChangesPolicy.java:238)
    at jetbrains.buildServer.buildTriggers.vcs.git.GitCollectChangesPolicy.ensureRepositoryStateLoadedFor(GitCollectChangesPolicy.java:128)
    at jetbrains.buildServer.buildTriggers.vcs.git.GitCollectChangesPolicy.lambda$collectChanges$0(GitCollectChangesPolicy.java:82)
    at jetbrains.buildServer.buildTriggers.vcs.git.RepositoryManagerImpl.runWithDisabledRemove(RepositoryManagerImpl.java:256)
    at jetbrains.buildServer.buildTriggers.vcs.git.GitCollectChangesPolicy.collectChanges(GitCollectChangesPolicy.java:76)
    at jetbrains.vcs.api.services.collectChanges.CollectRepositoryChangesPolicyFactory$3.collectChanges(CollectRepositoryChangesPolicyFactory.java:5)
    at jetbrains.vcs.api.services.collectChanges.CollectChangesServiceProvider$1.collectChanges(CollectChangesServiceProvider.java:10)
    at jetbrains.buildServer.buildTriggers.vcs.LoadChanges$CollectChangesForCheckoutRules.lambda$call$1(LoadChanges.java:3)
    at jetbrains.buildServer.serverSide.impl.BaseAccessChecker.runWithDisabledChecks(BaseAccessChecker.java:3)
    at jetbrains.buildServer.serverSide.impl.SecondaryNodeSecurityManager.executeSafe(SecondaryNodeSecurityManager.java:10)
    at jetbrains.buildServer.buildTriggers.vcs.LoadChanges$CollectChangesForCheckoutRules.call(LoadChanges.java:5)
    at jetbrains.buildServer.buildTriggers.vcs.LoadChanges$CollectChangesForCheckoutRules.call(LoadChanges.java:11)
    at jetbrains.buildServer.vcs.VcsOperationProgressProviderImpl.runWithProgress(VcsOperationProgressProviderImpl.java:29)
    at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.collectChangesWithProgress(LoadChanges.java:15)
    at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.collectChangesForCheckoutRules(LoadChanges.java:18)
    at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.collectChangesByCombinedRule(LoadChanges.java:9)
    at jetbrains.buildServer.buildTriggers.vcs.LoadChanges.collectChanges(LoadChanges.java:66)
    at jetbrains.buildServer.buildTriggers.vcs.VcsRootChangesLoader$RunLoadChanges.run(VcsRootChangesLoader.java:55)
    at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:76)
    at jetbrains.buildServer.buildTriggers.vcs.VcsRootChangesLoader.loadChanges(VcsRootChangesLoader.java:114)
    at jetbrains.buildServer.vcs.impl.VcsChangesFetcher$LoadChangesForRoot.run(VcsChangesFetcher.java:26)
    at jetbrains.buildServer.vcs.impl.ImmediateFutureExecService$2.call(ImmediateFutureExecService.java:2)
    at jetbrains.buildServer.serverSide.impl.ImmediateFuture.get(ImmediateFuture.java:63)
    at jetbrains.buildServer.serverSide.impl.ImmediateFuture.get(ImmediateFuture.java:73)
    at jetbrains.buildServer.vcs.impl.VcsChangesLoader.waitForTasksToComplete(VcsChangesLoader.java:38)
    at jetbrains.buildServer.vcs.impl.VcsChangesLoader.doLoadChanges(VcsChangesLoader.java:92)
    at jetbrains.buildServer.vcs.impl.VcsChangesLoader.tryLoadChanges(VcsChangesLoader.java:139)
    at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$CollectChangesAction$1.run(VcsModificationChecker.java:18)
    at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:76)
    at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$CollectChangesAction.run(VcsModificationChecker.java:5)
    at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1640)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

Any hints towards what could be the cause?

1

Just in case someone stumbles on to this question, maybe this will save some time. The issue was with JRE version. Even though Team City documentation states that it supports Java 8. The issue was caused by the JRE version. Upgrading to JDK (and JRE) 11 fixed the problem with number format conversion.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.