Subject: Re: Interrupted git-svn dcommit, now I get segmentation faults

From: Sam Vilain <[email-masked]>
Date: Sat, 23 Feb 2008 16:18:22 +1300

C. E. Ball wrote:
> On Fri, Feb 22, 2008 at 5:13 PM, C. E. Ball
> <[email-masked]> wrote:
>>>  If you get stuff like that you can move the git-svn state out of the
>>  >  way, and re-run git-svn fetch; it will rebuild the metadata.
>>  >
>>  >   $ mv .git/svn .git/svn.bad
>>  >   $ git-svn fetch
>>  >
>>  >  Not a fix I know, but might work for you ;)
>>
>>  Thank you very much, that did work for me!
> 
> Please ignore my previous email - I was in the wrong place on my
> filesystem! Sorry about that.
> 
> After following your suggestion on my broken repository, I still get
> the same error (a segmentation fault just after the commit is
> successfully sent to svn) when I 'git-svn dommit'.
> 
> Any other suggestions?

Well this is where the fun starts.  Make sure you're on a new version of
git - latest stable or built from "master" if possible.  Start perl (or
even debugperl if you have one built with debug symbols) with gdb, and
get it to run git-svn and use "bt" to get a backtrace when you get the
fault.

  $ gdb /usr/bin/debugperl
  ...
  > run ~/bin/git-svn dcommit
  ...
  --- SEGV ---
  > bt

That's the default place to start looking for clues.  Otherwise it's a
pretty much open-ended problem ... you would have to figure out (perhaps
using the perl debugger, perhaps using test cases) what triggers it,
what's not passing the correct thing to the SVN API, whether it's a
version-specific SVN bug, etc.  It's certainly not very common which
makes me suspect the SVN::Core bindings and/or the stack beneath that
part of it.  The SVN API is ... fragile, and the codebase is bulky and
poorly thought out.  So, you get weird behaviour like the exception
handler has to die() or you get a segfault, etc.

If that seems too daunting, perhaps just respond with the versions of
everything you are using (eg perl -MSVN::Core -le 'print
$SVN::Core::VERSION', git --version etc) find out if it's specific to
the repository you're committing to, or (if you can) your system, etc,
and perhaps someone else will have a better clue.

Good luck,
Sam.