java.io.IOException: com.syntevo.svngitkit.core.b.j: Process finished with non-zero exit code: 128

[2021-08-09 03:38:02.483][daemon][21] ######### ERROR REPORT ############
[2021-08-09 03:38:02.483][daemon][21] file ‘/var/www/svn/repos/tfx/subgit/error’ does not exist
[2021-08-09 03:38:02.483][daemon][21] ######### GIT TO SVN FAILURE REPORT END ############
[2021-08-09 03:38:02.483][daemon][21] com.syntevo.svngitkit.core.b.j: Process finished with non-zero exit code: 128
org.tmatesoft.translator.util.f: com.syntevo.svngitkit.core.b.j: Process finished with non-zero exit code: 128
at org.tmatesoft.translator.util.f.c(SourceFile:109)
at org.tmatesoft.translator.util.f.b(SourceFile:75)
at org.tmatesoft.translator.k.aj.a(SourceFile:2238)
at org.tmatesoft.translator.k.aj.a(SourceFile:2121)
at org.tmatesoft.translator.k.aj.a(SourceFile:748)
at org.tmatesoft.translator.k.aj.a(SourceFile:649)
at org.tmatesoft.translator.k.c.h.a(SourceFile:79)
at org.tmatesoft.translator.daemon.Y.run(SourceFile:259)
Caused by: com.syntevo.svngitkit.core.b.i: com.syntevo.svngitkit.core.b.j: Process finished with non-zero exit code: 128
at com.syntevo.svngitkit.core.b.i.a(SourceFile:29)
at com.syntevo.svngitkit.core.internal.g.a(SourceFile:75)
at com.syntevo.svngitkit.core.internal.g.a(SourceFile:48)
at com.syntevo.svngitkit.core.internal.g.a(SourceFile:17)
at com.syntevo.svngitkit.core.internal.k.c(SourceFile:470)
at com.syntevo.svngitkit.core.internal.k.b(SourceFile:189)
at com.syntevo.svngitkit.core.internal.i.a.j(SourceFile:147)
at com.syntevo.svngitkit.core.internal.i.a.a(SourceFile:63)
at com.syntevo.svngitkit.core.internal.i.g.d(SourceFile:130)
at com.syntevo.svngitkit.core.internal.i.c.b.d(SourceFile:31)
at com.syntevo.svngitkit.core.c.l.a(SourceFile:1107)
at com.syntevo.svngitkit.core.c.l.a(SourceFile:663)
at com.syntevo.svngitkit.core.c.l.a(SourceFile:599)
at com.syntevo.svngitkit.core.c.l.a(SourceFile:248)
at com.syntevo.svngitkit.core.c.l.a(SourceFile:188)
at com.syntevo.svngitkit.core.c.O.c(SourceFile:43)
at org.tmatesoft.translator.j.b.b.a(SourceFile:382)
at org.tmatesoft.translator.j.b.b.a(SourceFile:295)
at org.tmatesoft.translator.j.b.b.a(SourceFile:179)
at org.tmatesoft.translator.j.F.a(SourceFile:369)
at com.syntevo.svngitkit.core.c.O.c(SourceFile:43)
at com.syntevo.svngitkit.core.c.O.b(SourceFile:36)
at org.tmatesoft.translator.k.aj.a(SourceFile:2222)
… 5 more
Caused by: java.io.IOException: com.syntevo.svngitkit.core.b.j: Process finished with non-zero exit code: 128
at com.syntevo.svngitkit.core.b.a(SourceFile:240)
at com.syntevo.svngitkit.core.b.read(SourceFile:167)
at java.security.DigestInputStream.read(DigestInputStream.java:124)
at com.syntevo.svngitkit.core.internal.g.a(SourceFile:61)
… 26 more
Caused by: com.syntevo.svngitkit.core.b.j: Process finished with non-zero exit code: 128
at com.syntevo.svngitkit.core.b.a(SourceFile:235)
… 29 more

how can we debug it ?

Hello Jose,
the problem happened while running

git cat-file blob <SHA-1>

command on some file that you’ve changed and pushed. SubGit uses this command to read content of the file. For some unknown reasons “git cat-file blob SHA1” has failed with 128 exit code.

As a quick work-around I can propose the following:

  1. Change core.gitPath option in subgit/config to a path of some command that is not a valid Git command. On UNIX “/bin/true” is a good choice.
  2. Run “subgit install GIT_REPO” to apply the change.

Since then SubGit will find out that the command specified in ‘gitPath’ is not a valid Git command and will fallback to its own internal Git objects reading code. So using an alternative implementation should solve the problem.

Usually native Git’s “git cat-file blob SHA1” command is faster than internal SubGit’s code, so by default (if ‘gitPath’ is not specified) SubGit detects presence of Git and uses it. But if it doesn’t find it or finds that it isn’t a valid Git executable, it switches to its internal implementation.

To address the original issue, one has to find out why “git cat-file blob SHA-1” command results into error 128 (generic error) on your system. If you want to do that, you can enable debug logging, run “subgit install GIT_REPO” to apply the change and retry to find out which file causes problem and what’s its SHA-1 (“git ls-tree -r COMMIT_ID” might help to list files for commit being pushed) and then to run “git cat-file blob SHA-1” and to see whether the command succeeds or fails and what’s the error message.