Gitsync Error: Arithmetic operation resulted in an overflow

Trying to sync an old git repo with UVC and am running into some issues. Using this to begin the sync from the command line:

cm sync [Plastic repo] git [git repo]

It takes about an hour or so, but everything seems to run correctly, it lists out the correct git branches it will be importing. Compressing, Downloading, Processing, then:

There are changes to push and pull.
Will pull the remote changes then you'll have to merge them and push the changes back.
Processing objects:... OK
Error: Arithmetic operation resulted in an overflow.

I believe this error occurs during an Importing step. I’ve tried this a couple times from both the command line and in the client.

Any ideas on what could be causing this?

Next we’re going to try creating a new clean Plastic repo since we don’t actually need the history of the existing plastic repo. Git is up to date and includes everything we would need.

Hi,

Please enable cm log by following the instruction at Plastic SCM - Technical article - Enabling logging

Then try to run cm sync command and share the log with us. You can directly open a support ticket with UVCS to share the log file.

Ok, I’ve tried it a couple more times with logs enabled. Lately it has been getting hung during the Downloading step and I have to restart. I have gotten to an error twice now. The arithmetic error logs this:

2024-10-31 11:47:12,101 ERROR 11 sync - Error running sync: Arithmetic operation resulted in an overflow.. StackTrace:
   at LibGit2Sharp.Core.Proxy.git_blob_rawcontent(RepositorySafeHandle repo, ObjectId id, Int32 size)
   at LibGit2Sharp.BlobExtensions.ContentAsUtf8(Blob blob)
   at Codice.Foreign.Git.Lfs.ParseGitLfsObject.Parse(Blob blob)
   at Codice.Foreign.GitPuller.GetFile(String blobSha, String fileName, String outputFile)
   at Codice.Client.BaseCommands.Sync.Pull.Data.GitCachedDataPuller.GetFromGitPuller(String blob, String fileName)
   at Codice.Client.BaseCommands.Sync.Pull.Data.GitCachedDataPuller.GetFile(String blob, String fileName)
   at Codice.Client.BaseCommands.Sync.Pull.Trees.GitChgNodeBuilder.BuildAddedFileNode(TreeForeignNode gitNode, String parentPath)
   at Codice.Client.BaseCommands.Sync.Pull.Trees.GitChgNodeBuilder.BuildAddedNode(TreeForeignNode gitNode, String parentPath)
   at Codice.Client.BaseCommands.Sync.GitTreePuller.CalculatePlasticChgNode(TreeForeignNode gitNode, TreeNode plasticAncestorNode, Boolean bIsSameRevision, TreeChangedNode plasticParentChgNode)
   at Codice.Client.BaseCommands.Sync.GitTreePuller.ProcessGitChildren(DirectoryInfo dirInfo, GitPlasticChildrenMatcherByName plasticChildMatcher, Queue`1 pendingDirs)
   at Codice.Client.BaseCommands.Sync.GitTreePuller.ProcessDirectory(DirectoryInfo dirInfo, Queue`1 pendingDirs)
   at Codice.Client.BaseCommands.Sync.GitTreePuller.WalkTrees(TreeForeignNode gitTree, TreeNode plasticAncestorTree, PlasticTrees resultTrees)
   at Codice.Client.BaseCommands.Sync.GitTreePuller.PullGitTree(TreeForeignNode gitTree, TreeNode plasticAncestorTree, IList`1 mergeSources, DiffOptions diffOptions, Boolean bIsCollab)
   at Codice.Client.BaseCommands.Sync.GitTreePuller.PullGitTree(TreeForeignNode gitTree, TreeNode plasticAncestorTree, IList`1 mergeSources, DiffOptions diffOptions, IRevisionTranslator revTranslator, IPlasticCachedDownloader plasticDataDownloader, IGitCachedDataPuller dataPuller, IGitXlinkTranslator xlinkTranslator, GitReferencesTreeRetriever gitReferencesTreeRetriever, ITreeLoader plasticCsetTreeLoader, Boolean bIsCollab)
   at Codice.Client.BaseCommands.Sync.GitChangesetPuller.CalculatePlasticTrees(TreeNode plasticParentTree, TreeForeignNode gitTree, IList`1 mergeSourceCsets, IPlasticCachedDownloader plasticCachedDownloader, IRevisionTranslator revisionTranslator, GitReferencesTreeRetriever gitReferencesTreeRetriever, IGitCachedDataPuller gitCachedPuller)
   at Codice.Client.BaseCommands.Sync.GitChangesetPuller.PullCommit(GitCommit c, ICommitTreeMapper treeMapper)
   at Codice.Client.BaseCommands.Sync.GitChangesetPuller.PullCommits(List`1 foreignCsetsToPull, ICommitTreeMapper treeMapper)
   at Codice.Client.BaseCommands.Sync.GitSynchronizer.Pull(CollabImportStats collabStats, List`1 commitsToPull)
   at Codice.Client.BaseCommands.Sync.SyncRunner.RunGitSync(SyncStorage storage, String gitMainBranchName, Boolean bJustPrint)
   at Codice.Client.BaseCommands.Sync.SyncRunner.RunSync(SyncSettings settings, RepositoryInfo repInfo)
   at Codice.Client.BaseCommands.Sync.SyncRunner.Sync()
2024-10-31 11:47:12,120 ERROR 1 sync - Sync error: Arithmetic operation resulted in an overflow.   at LibGit2Sharp.Core.Proxy.git_blob_rawcontent(RepositorySafeHandle repo, ObjectId id, Int32 size)
   at LibGit2Sharp.BlobExtensions.ContentAsUtf8(Blob blob)
   at Codice.Foreign.Git.Lfs.ParseGitLfsObject.Parse(Blob blob)
   at Codice.Foreign.GitPuller.GetFile(String blobSha, String fileName, String outputFile)
   at Codice.Client.BaseCommands.Sync.Pull.Data.GitCachedDataPuller.GetFromGitPuller(String blob, String fileName)
   at Codice.Client.BaseCommands.Sync.Pull.Data.GitCachedDataPuller.GetFile(String blob, String fileName)
   at Codice.Client.BaseCommands.Sync.Pull.Trees.GitChgNodeBuilder.BuildAddedFileNode(TreeForeignNode gitNode, String parentPath)
   at Codice.Client.BaseCommands.Sync.Pull.Trees.GitChgNodeBuilder.BuildAddedNode(TreeForeignNode gitNode, String parentPath)
   at Codice.Client.BaseCommands.Sync.GitTreePuller.CalculatePlasticChgNode(TreeForeignNode gitNode, TreeNode plasticAncestorNode, Boolean bIsSameRevision, TreeChangedNode plasticParentChgNode)
   at Codice.Client.BaseCommands.Sync.GitTreePuller.ProcessGitChildren(DirectoryInfo dirInfo, GitPlasticChildrenMatcherByName plasticChildMatcher, Queue`1 pendingDirs)
   at Codice.Client.BaseCommands.Sync.GitTreePuller.ProcessDirectory(DirectoryInfo dirInfo, Queue`1 pendingDirs)
   at Codice.Client.BaseCommands.Sync.GitTreePuller.WalkTrees(TreeForeignNode gitTree, TreeNode plasticAncestorTree, PlasticTrees resultTrees)
   at Codice.Client.BaseCommands.Sync.GitTreePuller.PullGitTree(TreeForeignNode gitTree, TreeNode plasticAncestorTree, IList`1 mergeSources, DiffOptions diffOptions, Boolean bIsCollab)
   at Codice.Client.BaseCommands.Sync.GitTreePuller.PullGitTree(TreeForeignNode gitTree, TreeNode plasticAncestorTree, IList`1 mergeSources, DiffOptions diffOptions, IRevisionTranslator revTranslator, IPlasticCachedDownloader plasticDataDownloader, IGitCachedDataPuller dataPuller, IGitXlinkTranslator xlinkTranslator, GitReferencesTreeRetriever gitReferencesTreeRetriever, ITreeLoader plasticCsetTreeLoader, Boolean bIsCollab)
   at Codice.Client.BaseCommands.Sync.GitChangesetPuller.CalculatePlasticTrees(TreeNode plasticParentTree, TreeForeignNode gitTree, IList`1 mergeSourceCsets, IPlasticCachedDownloader plasticCachedDownloader, IRevisionTranslator revisionTranslator, GitReferencesTreeRetriever gitReferencesTreeRetriever, IGitCachedDataPuller gitCachedPuller)
   at Codice.Client.BaseCommands.Sync.GitChangesetPuller.PullCommit(GitCommit c, ICommitTreeMapper treeMapper)
   at Codice.Client.BaseCommands.Sync.GitChangesetPuller.PullCommits(List`1 foreignCsetsToPull, ICommitTreeMapper treeMapper)
   at Codice.Client.BaseCommands.Sync.GitSynchronizer.Pull(CollabImportStats collabStats, List`1 commitsToPull)
   at Codice.Client.BaseCommands.Sync.SyncRunner.RunGitSync(SyncStorage storage, String gitMainBranchName, Boolean bJustPrint)
   at Codice.Client.BaseCommands.Sync.SyncRunner.RunSync(SyncSettings settings, RepositoryInfo repInfo)
   at Codice.Client.BaseCommands.Sync.SyncRunner.Sync()

2024-10-31 11:47:12,123 ERROR 1 cm - Unity VCS client version: 11.0.16.8281

2024-10-31 11:47:12,124 ERROR 1 cm - Arithmetic operation resulted in an overflow.
2024-10-31 11:47:12,124 DEBUG 1 cm - Arithmetic operation resulted in an overflow.   at Codice.Client.BaseCommands.SyncCmd.Synchronize(SyncSettings settings)
   at Codice.Client.BaseCommands.SyncCmd.Execute(CommandLineArguments cla)
   at Codice.Client.cm.MainClass.Main(String[] args)

Earlier, I also received a Disk space error for the first time. I don’t believe this should be the cause as I had 60 Gb available at the time of the error. Regardless, I have freed up more space on the disk and am trying again.

2024-10-31 10:09:10,692 ERROR 9 sync - Error running sync: There is not enough space on the disk. : 'C:\Users\[Name]\AppData\Local\Temp\a2fe2c5e-17be-43e3-b202-04c1c48e8a9d'. StackTrace:
   at System.IO.RandomAccess.WriteAtOffset(SafeFileHandle handle, ReadOnlySpan`1 buffer, Int64 fileOffset)
   at System.IO.Strategies.OSFileStreamStrategy.Write(ReadOnlySpan`1 buffer)
   at System.IO.Strategies.OSFileStreamStrategy.Write(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.Strategies.BufferedFileStreamStrategy.WriteSpan(ReadOnlySpan`1 source, ArraySegment`1 arraySegment)
   at System.IO.FileStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at Codice.Foreign.GitPuller.WriteBlobToDisk(Blob blob, String outputFile)
   at Codice.Foreign.GitPuller.GetFile(String blobSha, String fileName, String outputFile)
   at Codice.Client.BaseCommands.Sync.Pull.Data.GitCachedDataPuller.GetFromGitPuller(String blob, String fileName)
   at Codice.Client.BaseCommands.Sync.Pull.Data.GitCachedDataPuller.GetFile(String blob, String fileName)
   at Codice.Client.BaseCommands.Sync.Pull.Trees.GitChgNodeBuilder.BuildAddedFileNode(TreeForeignNode gitNode, String parentPath)
   at Codice.Client.BaseCommands.Sync.Pull.Trees.GitChgNodeBuilder.BuildAddedNode(TreeForeignNode gitNode, String parentPath)
   at Codice.Client.BaseCommands.Sync.GitTreePuller.CalculatePlasticChgNode(TreeForeignNode gitNode, TreeNode plasticAncestorNode, Boolean bIsSameRevision, TreeChangedNode plasticParentChgNode)
   at Codice.Client.BaseCommands.Sync.GitTreePuller.ProcessGitChildren(DirectoryInfo dirInfo, GitPlasticChildrenMatcherByName plasticChildMatcher, Queue`1 pendingDirs)
   at Codice.Client.BaseCommands.Sync.GitTreePuller.ProcessDirectory(DirectoryInfo dirInfo, Queue`1 pendingDirs)
   at Codice.Client.BaseCommands.Sync.GitTreePuller.WalkTrees(TreeForeignNode gitTree, TreeNode plasticAncestorTree, PlasticTrees resultTrees)
   at Codice.Client.BaseCommands.Sync.GitTreePuller.PullGitTree(TreeForeignNode gitTree, TreeNode plasticAncestorTree, IList`1 mergeSources, DiffOptions diffOptions, Boolean bIsCollab)
   at Codice.Client.BaseCommands.Sync.GitTreePuller.PullGitTree(TreeForeignNode gitTree, TreeNode plasticAncestorTree, IList`1 mergeSources, DiffOptions diffOptions, IRevisionTranslator revTranslator, IPlasticCachedDownloader plasticDataDownloader, IGitCachedDataPuller dataPuller, IGitXlinkTranslator xlinkTranslator, GitReferencesTreeRetriever gitReferencesTreeRetriever, ITreeLoader plasticCsetTreeLoader, Boolean bIsCollab)
   at Codice.Client.BaseCommands.Sync.GitChangesetPuller.CalculatePlasticTrees(TreeNode plasticParentTree, TreeForeignNode gitTree, IList`1 mergeSourceCsets, IPlasticCachedDownloader plasticCachedDownloader, IRevisionTranslator revisionTranslator, GitReferencesTreeRetriever gitReferencesTreeRetriever, IGitCachedDataPuller gitCachedPuller)
   at Codice.Client.BaseCommands.Sync.GitChangesetPuller.PullCommit(GitCommit c, ICommitTreeMapper treeMapper)
   at Codice.Client.BaseCommands.Sync.GitChangesetPuller.PullCommits(List`1 foreignCsetsToPull, ICommitTreeMapper treeMapper)
   at Codice.Client.BaseCommands.Sync.GitSynchronizer.Pull(CollabImportStats collabStats, List`1 commitsToPull)
   at Codice.Client.BaseCommands.Sync.SyncRunner.RunGitSync(SyncStorage storage, String gitMainBranchName, Boolean bJustPrint)
   at Codice.Client.BaseCommands.Sync.SyncRunner.RunSync(SyncSettings settings, RepositoryInfo repInfo)
   at Codice.Client.BaseCommands.Sync.SyncRunner.Sync()
2024-10-31 10:09:10,760 ERROR 1 sync - Sync error: There is not enough space on the disk. : 'C:\Users\[Name]\AppData\Local\Temp\a2fe2c5e-17be-43e3-b202-04c1c48e8a9d'   at System.IO.RandomAccess.WriteAtOffset(SafeFileHandle handle, ReadOnlySpan`1 buffer, Int64 fileOffset)
   at System.IO.Strategies.OSFileStreamStrategy.Write(ReadOnlySpan`1 buffer)
   at System.IO.Strategies.OSFileStreamStrategy.Write(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.Strategies.BufferedFileStreamStrategy.WriteSpan(ReadOnlySpan`1 source, ArraySegment`1 arraySegment)
   at System.IO.FileStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at Codice.Foreign.GitPuller.WriteBlobToDisk(Blob blob, String outputFile)
   at Codice.Foreign.GitPuller.GetFile(String blobSha, String fileName, String outputFile)
   at Codice.Client.BaseCommands.Sync.Pull.Data.GitCachedDataPuller.GetFromGitPuller(String blob, String fileName)
   at Codice.Client.BaseCommands.Sync.Pull.Data.GitCachedDataPuller.GetFile(String blob, String fileName)
   at Codice.Client.BaseCommands.Sync.Pull.Trees.GitChgNodeBuilder.BuildAddedFileNode(TreeForeignNode gitNode, String parentPath)
   at Codice.Client.BaseCommands.Sync.Pull.Trees.GitChgNodeBuilder.BuildAddedNode(TreeForeignNode gitNode, String parentPath)
   at Codice.Client.BaseCommands.Sync.GitTreePuller.CalculatePlasticChgNode(TreeForeignNode gitNode, TreeNode plasticAncestorNode, Boolean bIsSameRevision, TreeChangedNode plasticParentChgNode)
   at Codice.Client.BaseCommands.Sync.GitTreePuller.ProcessGitChildren(DirectoryInfo dirInfo, GitPlasticChildrenMatcherByName plasticChildMatcher, Queue`1 pendingDirs)
   at Codice.Client.BaseCommands.Sync.GitTreePuller.ProcessDirectory(DirectoryInfo dirInfo, Queue`1 pendingDirs)
   at Codice.Client.BaseCommands.Sync.GitTreePuller.WalkTrees(TreeForeignNode gitTree, TreeNode plasticAncestorTree, PlasticTrees resultTrees)
   at Codice.Client.BaseCommands.Sync.GitTreePuller.PullGitTree(TreeForeignNode gitTree, TreeNode plasticAncestorTree, IList`1 mergeSources, DiffOptions diffOptions, Boolean bIsCollab)
   at Codice.Client.BaseCommands.Sync.GitTreePuller.PullGitTree(TreeForeignNode gitTree, TreeNode plasticAncestorTree, IList`1 mergeSources, DiffOptions diffOptions, IRevisionTranslator revTranslator, IPlasticCachedDownloader plasticDataDownloader, IGitCachedDataPuller dataPuller, IGitXlinkTranslator xlinkTranslator, GitReferencesTreeRetriever gitReferencesTreeRetriever, ITreeLoader plasticCsetTreeLoader, Boolean bIsCollab)
   at Codice.Client.BaseCommands.Sync.GitChangesetPuller.CalculatePlasticTrees(TreeNode plasticParentTree, TreeForeignNode gitTree, IList`1 mergeSourceCsets, IPlasticCachedDownloader plasticCachedDownloader, IRevisionTranslator revisionTranslator, GitReferencesTreeRetriever gitReferencesTreeRetriever, IGitCachedDataPuller gitCachedPuller)
   at Codice.Client.BaseCommands.Sync.GitChangesetPuller.PullCommit(GitCommit c, ICommitTreeMapper treeMapper)
   at Codice.Client.BaseCommands.Sync.GitChangesetPuller.PullCommits(List`1 foreignCsetsToPull, ICommitTreeMapper treeMapper)
   at Codice.Client.BaseCommands.Sync.GitSynchronizer.Pull(CollabImportStats collabStats, List`1 commitsToPull)
   at Codice.Client.BaseCommands.Sync.SyncRunner.RunGitSync(SyncStorage storage, String gitMainBranchName, Boolean bJustPrint)
   at Codice.Client.BaseCommands.Sync.SyncRunner.RunSync(SyncSettings settings, RepositoryInfo repInfo)
   at Codice.Client.BaseCommands.Sync.SyncRunner.Sync()

2024-10-31 10:09:10,770 ERROR 1 cm - Unity VCS client version: 11.0.16.8281

2024-10-31 10:09:10,770 ERROR 1 cm - There is not enough space on the disk. : 'C:\Users\[Name]\AppData\Local\Temp\a2fe2c5e-17be-43e3-b202-04c1c48e8a9d'
2024-10-31 10:09:10,771 DEBUG 1 cm - There is not enough space on the disk. : 'C:\Users\[Name]\AppData\Local\Temp\a2fe2c5e-17be-43e3-b202-04c1c48e8a9d'   at Codice.Client.BaseCommands.SyncCmd.Synchronize(SyncSettings settings)
   at Codice.Client.BaseCommands.SyncCmd.Execute(CommandLineArguments cla)
   at Codice.Client.cm.MainClass.Main(String[] args)

The full logs contain information that I am not sure if I am able to share. I need to verify company policy before sharing. In the meantime, let me know if there is any other aspect of the logs you would like me to share.