I'm trying to convert an SVN repository to Git with "git-svn" and it dies 
with a seg fault.

# git svn --version
git-svn version 2.10.1 (svn 1.9.3)

I've narrowed the problem down to commit 18663 (and we have 22K revisions 
in the SVN repo).

# git svn clone -r 18663:18664  svn://myrepo.example.com/ 
--authors-file=authors.txt --no-metadata --trunk=myproject/trunk 
--tags=myproject/tags --branches=myproject/branches 

The error is:

Index mismatch: 314e2ca82dcac3fc7a31668974ec1bbfe2ba0904 != 
rereading 6edf00155e99771d6f8af9aeae5b2578a7f1db76
        A       file1
        A       file2
        A       file3
... [add a bunch more files]
Ignoring path
error: git-svn died of signal 11

Turn on GIT_TRACE:

22:37:17.322731 git.c:350               trace: built-in: git 'rev-list' 
'--pretty=raw' '--reverse' 
22:37:17.323466 git.c:350               trace: built-in: git 'config' 
'--get' 'svn-remote.svn.rewriteRoot'
22:37:17.325970 git.c:350               trace: built-in: git 'config' 
'--get' 'svn-remote.svn.rewriteUUID'
22:37:17.331451 git.c:350               trace: built-in: git 'config' 
'--get' 'svn-remote.svn.usesvmprops'
22:37:17.334047 git.c:350               trace: built-in: git 'config' 
'--get' 'svn-remote.svn.nometadata'
22:37:17.336422 git.c:350               trace: built-in: git 'config' 
'--bool' 'svn-remote.svn.nometadata'
22:37:17.339054 git.c:350               trace: built-in: git 'write-tree'
22:37:17.370642 git.c:350               trace: built-in: git 'cat-file' 
'commit' '6edf00155e99771d6f8af9aeae5b2578a7f1db76'
Index mismatch: 314e2ca82dcac3fc7a31668974ec1bbfe2ba0904 != 
rereading 6edf00155e99771d6f8af9aeae5b2578a7f1db76
22:37:17.374140 git.c:350               trace: built-in: git 'read-tree' 
22:37:17.448099 git.c:350               trace: built-in: git 'write-tree'
22:37:17.460106 git.c:350               trace: built-in: git 'config' 
'--get' 'svn-remote.svn.followparent'
22:37:17.462909 git.c:350               trace: built-in: git 'config' 
'--bool' '--get' 'svn.brokenSymlinkWorkaround'
22:37:17.465511 git.c:350               trace: built-in: git 'config' 
'--get' 'svn-remote.svn.ignore-paths'
22:37:17.467963 git.c:350               trace: built-in: git 'config' 
'--get' 'svn-remote.svn.include-paths'
22:37:17.470431 git.c:350               trace: built-in: git 'config' 
'--get' '--bool' 'svn-remote.svn.preserve-empty-dirs'
22:37:17.472916 git.c:350               trace: built-in: git 'config' 
'--get-all' 'svn-remote.svn.added-placeholder'
22:37:17.475974 git.c:350               trace: built-in: git 'update-index' 
'-z' '--index-info'
22:37:17.476806 git.c:350               trace: built-in: git 'config' 
'--get' 'svn.pathnameencoding'
22:37:17.479570 git.c:350               trace: built-in: git 'config' 
'svn-remote.svn.reposRoot' 'svn://myrepo.example.com'
22:37:17.506685 git.c:350               trace: built-in: git 'hash-object' 
'-w' '--stdin-paths' '--no-filters'
        A       file1
        A       file2
        A       file3

Again, the error was:

Index mismatch: 314e2ca82dcac3fc7a31668974ec1bbfe2ba0904 != 
rereading 6edf00155e99771d6f8af9aeae5b2578a7f1db76

6edf is a commit object:

# git cat-file -t 6edf00155e99771d6f8af9aeae5b2578a7f1db76

Its contents:

# git cat-file -p 6edf00155e99771d6f8af9aeae5b2578a7f1db76
tree 314e2ca82dcac3fc7a31668974ec1bbfe2ba0904
parent ba36a400db2acdc441b3665428870a2d0ef48da6
author [redacted]
committer [redacted]


Finally, the second object mentioned in the error does not exist:

# git cat-file -t 60995aa26b6d5fd5056d7c1c278ab9fac4f0fa72
fatal: git cat-file: could not get object info

Where did git get 6099?

It wasn't from 6edf or 314e...

# git cat-file -p 314e2ca82dcac3fc7a31668974ec1bbfe2ba0904
040000 tree de2e3c37d310176d37316e29fafcc524f432a61b    [redacted]
040000 tree c87e8141209f655a9b21b251bdc52b7a17ace55d    [redacted]
040000 tree bb9b918e1f91adcfc04512b7ff2d5647104f654b    [redacted]
040000 tree ad127b602af7ff6de4e10fa391305966f72e53a7    [redacted]
040000 tree 458c21da5d8900f06df895c8ae8218693729cf07    [redacted]
040000 tree 0343c9b99e9e5266c53704fc8a53ae645945896c    [redacted]

I tried adding -d switch to git-svn, and now it dies with SIGABRT rather 

Signal SEGV at /opt/git-2.10.1/share/perl/5.22.1/Git/SVN/Fetcher.pm line 
HASH(0x3d4bbb0), undef, _p_apr_pool_t=SCALAR(0x3d42bd8)) called at 
/usr/lib/x86_64-linux-gnu/perl5/5.22/SVN/Ra.pm line 623
SVN::Pool=REF(0x39021d0)) called at 
/opt/git-2.10.1/share/perl/5.22.1/Git/SVN/Ra.pm line 312
        Git::SVN::Ra::gs_do_update(Git::SVN::Ra=HASH(0x383f428), 7979, 
18664, Git::SVN=HASH(0x3884148), Git::SVN::Fetcher=HASH(0x38cfeb8)) called 
at /opt/git-2.10.1/share/perl/5.22.1/Git/SVN.pm line 1210
        Git::SVN::do_fetch(Git::SVN=HASH(0x3884148), HASH(0x38c91c0), 
18664) called at /opt/git-2.10.1/share/perl/5.22.1/Git/SVN/Ra.pm line 475
18663, 18664, ARRAY(0x2d78830), ARRAY(0x2d78848)) called at 
/opt/git-2.10.1/share/perl/5.22.1/Git/SVN.pm line 184
        Git::SVN::fetch_all("svn") called at 
/opt/git-2.10.1/libexec/git-core/git-svn line 525
"file:///home/aleksey/scratch/myproject/") called at 
/opt/git-2.10.1/libexec/git-core/git-svn line 386
        eval {...} called at /opt/git-2.10.1/libexec/git-core/git-svn line 
Ignoring path
error: git-svn died of signal 6

Line 368 of "/opt/git-2.10.1/share/perl/5.22.1/Git/SVN/Fetcher.pm" is:
        [ SVN::TxDelta::apply($base, $dup, undef, $fb->{path}, $fb->{pool}) 

I tried running "git gc" and "git svn gc" as one of the answers in 
suggested.  (I was getting "malformed index error" with git-2.9.2 before I 
updated to latest stable version of git.)

I also tried adding the conditional break point using the perl debugger, as 
suggested on the the same stackoverflow page.

I'm out of my depth and out of ideas...  any suggestions, please?

I should mention this SVN repository contains multiple project, and I'm 
just trying to convert one... (the main one).

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to