Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git svn clone died of signal 11 on OSX

I'm trying to migrate a project from svn to git. I was using the osx svn package, but I also tried installing with homebrew. I keep getting this same error.

git svn clone http://myserver/myrepo
error: git-svn died of signal 11

Version information:

git --version
git version 2.2.1

svn --version
svn, version 1.7.17 (r1591372)
   compiled Sep 18 2014, 13:06:44

I'm running Yosemite.

like image 356
BarFooBar Avatar asked Jan 30 '15 01:01

BarFooBar


People also ask

How do I clone a SVN repository?

# Clone a repo with standard SVN directory layout (like git clone): git svn clone http://svn.example.com/project --stdlayout --prefix svn/ # Or, if the repo uses a non-standard directory layout: git svn clone http://svn.example.com/project -T tr -b branch -t tag --prefix svn/ # View all branches and tags you have ...

Is SVN better than Git?

SVN is better than Git for architecture performance, binary files, and usability. And it may be better for access control and auditability, based on your needs.

Can you use Git and SVN together?

git-svn is a specialized tool for Git users to interact with Git repositories. It works by providing a Git frontend to an SVN backend. With git-svn, you use Git commands on the local repository, so it's just like using normal Git. However, behind the scenes, the relevant SVN commands are sent to the server.

How long does git SVN clone take?

Beware that the conversion process can take a significant amount of time for larger repositories, even when cloning from a local SVN repository. As a benchmark, converting a 400MB repository with 33,000 commits on main took around 12 hours to complete.


1 Answers

First thing to do, is to debug git command to see on which component it fails by adding GIT_TRACE=1, e.g.

$ GIT_TRACE=1 git svn clone https://example.com/svn/foo/ foo
21:12:40.239238 git.c:557               trace: exec: 'git-svn' 'clone' 'https://example.com/svn/foo/ foo/' 'foo'
21:12:40.240158 run-command.c:347       trace: run_command: 'git-svn' 'clone' 'https://example.com/svn/foo/ foo/' 'foo'
error: git-svn died of signal 11

and re-run the last command in the corrupted repository which shows that the crash happened in git-svn binary.

In order to do that, you need to identify where you've git-svn binary, e.g.

$ which -a git-svn
$ locate git-svn | grep git-svn$
/Applications/GitHub.app/Contents/Resources/git/libexec/git-core/git-svn
/Applications/SourceTree.app/Contents/Resources/git_local/libexec/git-core/git-svn
/Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/git-svn
/Library/Developer/CommandLineTools/usr/libexec/git-core/git-svn
/usr/local/libexec/git-core/git-svn
/usr/local/Cellar/git/1.8.4.1/libexec/git-core/git-svn
/usr/local/Cellar/git/2.4.0/libexec/git-core/git-svn

If you've multiple git-svn binaries, to find out which one is used, run:

sudo fs_usage -f exec | grep git

in another terminal before running the failing git command again.

Once you've identified which git-svn you run, run it directly like:

/usr/local/libexec/git-core/git-svn ...
/usr/local/Cellar/git/2.4.0/libexec/git-core/git-svn 

and it's most likely that it'll crash no matter which parameter you will specify, otherwise specify as shown from trace output.

Sometimes it maybe a symbolic link, so check where it points to, e.g.:

$ stat /usr/local/libexec/git-core/git-svn
  File: ‘/usr/local/libexec/git-core/git-svn’ -> ‘/Applications/GitHub.app/Contents/Resources/git/libexec/git-core/git-svn’

If that's the case, change the symbolic link to the one which is not crashing, e.g.

$ ln -vfs /Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/git-svn /usr/local/libexec/git-core/git-svn 
‘/usr/local/libexec/git-core/git-svn’ -> ‘/Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/git-svn’

Alternatively identify to which package your git-svn belongs to and upgrade accordingly, e.g.

  • /Applications/Xcode.app -> upgrade Xcode,
  • /Applications/GitHub.app -> upgrade GitHub app
  • /usr/local/Cellar/git -> upgrade git via Homebrew, e.g.

    brew upgrade git
    

    If Homebrew will complain about the file conflicts, then run:

    brew link --overwrite git
    

If you still crashing after upgrade, use different version (as mentioned above) which doesn't crash, e.g.

/Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/git-svn clone https://example.com/svn/foo/ foo

If that works for you, add to your PATH and later on use git-svn command instead, or add an alias, e.g.:

alias git-svn='/Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/git-svn'

If you got any missing dependencies for the new git-svn, install Git::SVN by running:

sudo cpan install Git::SVN

Debugging

If above won't help, you may debug it further more. Here are some suggestions to run in separate terminal, then in run the failing command:

sudo dtruss -fn git

or:

sudo dtruss -fn git-svn

To identify which git-svn is called, you may try:

  • sudo /usr/bin/newproc.d
  • sudo fs_usage -f exec | grep git
like image 124
kenorb Avatar answered Sep 21 '22 17:09

kenorb