{"thread":{"id":"12235","subject":"Interrupted git-svn dcommit, now I get segmentation faults","startedAt":"2008-02-21T06:49:33Z","lastAt":"2008-03-05T09:00:44Z","messageCount":6,"participants":["Chris Ball","Sam Vilain","C. E. Ball"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"69461","messageId":"loom.20080221T062522-821@post.gmane.org","threadId":"12235","inReplyTo":null,"subject":"Interrupted git-svn dcommit, now I get segmentation faults","fromName":"Chris Ball","fromEmail":"ceball@users.sourceforge.net","sentAt":"2008-02-21T06:49:33Z","receivedAt":"2008-02-21T06:49:33Z","isPatch":false,"sender":{"key":"ceball@users.sourceforge.net","avatar":null},"body":"Hi,\n\nI mistakenly interrupted a git-svn dcommit, and now whenever I run\ngit-svn dcommit I get a segmentation fault, but the commit is\nsuccessful. I have just switched from Subversion to Git, so I'm not\nsure what to do (and probably using Git in a clumsy way).\n\nHow I caused the problem:\n\n$ git commit -m \"msg\" path/to/file\nCreated commit bee0414: msg\n 1 files changed, 6 insertions(+), 0 deletions(-)\n$ git-svn dcommit\nCommitting to https://svn/repository ...\n\tM\tpath/to/file\nCommitted r8041\n# ** Interruption with ctrl-c happened right at this point **\n\n\ngit diff still showed the change on my machine, so I ran git-svn dcommit\nagain:\n\n$ git-svn dcommit\nCommitting to https://svn/repository ...\nMerge conflict during commit: Your file or directory 'path/to/file' is\nprobably out-of-date: The version resource does not correspond to the\nresource within the transaction.  Either the requested version\nresource is out of date (needs to be updated), or the requested\nversion resource is newer than the transaction root (restart the\ncommit). at /usr/bin/git-svn line 420\n\n\nChecking the SVN repository itself, I found the commit was actually\nsuccessful (in that it appears as normal in the SVN respository). I\ndeleted my copy of the file, ran 'git-svn rebase', and then used 'git\ncheckout path/to/file. This gave me seemingly the correct version\n(i.e. with the updates).\n\nThis would all be ok, except that now, whenever I git-svn dcommit\nanything, this happens:\n\n$ git-svn dcommit\nCommitting to https://svn/repository ...\n\tM\tpath/to/different/file\nCommitted r8044\nSegmentation fault\n\nThe commit is successful (i.e. appears in the SVN repository).\n\nCan anyone suggest what I should do? I still have a full transcript\nof the session in case that will help. \n\nI'm using Ubuntu 6.06 LTS. My versions of git, git-svn, and svn (all\nfrom Ubuntu packages):\n\n$ git --version\ngit version 1.5.3.6\n$ git-svn --version\ngit-svn version 1.5.3.6 (svn 1.3.2)\n\n\nThanks very much for any help,\n\nChris\n"},{"id":"69503","messageId":"47BDD096.7040606@vilain.net","threadId":"12235","inReplyTo":"loom.20080221T062522-821@post.gmane.org","subject":"Re: Interrupted git-svn dcommit, now I get segmentation faults","fromName":"Sam Vilain","fromEmail":"sam@vilain.net","sentAt":"2008-02-21T19:27:18Z","receivedAt":"2008-02-21T19:27:18Z","isPatch":false,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"Chris Ball wrote:\n> Hi,\n> \n> I mistakenly interrupted a git-svn dcommit, and now whenever I run\n> git-svn dcommit I get a segmentation fault, but the commit is\n> successful. I have just switched from Subversion to Git, so I'm not\n [...]\n> git diff still showed the change on my machine, so I ran git-svn dcommit\n> again:\n> \n> $ git-svn dcommit\n> Committing to https://svn/repository ...\n> Merge conflict during commit: Your file or directory 'path/to/file' is\n> probably out-of-date: The version resource does not correspond to the\n> resource within the transaction.  Either the requested version\n> resource is out of date (needs to be updated), or the requested\n> version resource is newer than the transaction root (restart the\n> commit). at /usr/bin/git-svn line 420\n\nIf you get stuff like that you can move the git-svn state out of the\nway, and re-run git-svn fetch; it will rebuild the metadata.\n\n $ mv .git/svn .git/svn.bad\n $ git-svn fetch\n\nNot a fix I know, but might work for you ;)\n\nSam.\n"},{"id":"69563","messageId":"4e2a3a120802220113q4df473c0xcaad4760aea7f49b@mail.gmail.com","threadId":"12235","inReplyTo":"47BDD096.7040606@vilain.net","subject":"Re: Interrupted git-svn dcommit, now I get segmentation faults","fromName":"C. E. Ball","fromEmail":"ceball@users.sourceforge.net","sentAt":"2008-02-22T09:13:27Z","receivedAt":"2008-02-22T09:13:27Z","isPatch":false,"sender":{"key":"ceball@users.sourceforge.net","avatar":null},"body":">  If you get stuff like that you can move the git-svn state out of the\n>  way, and re-run git-svn fetch; it will rebuild the metadata.\n>\n>   $ mv .git/svn .git/svn.bad\n>   $ git-svn fetch\n>\n>  Not a fix I know, but might work for you ;)\n\nThank you very much, that did work for me!\n\nChris\n"},{"id":"69566","messageId":"4e2a3a120802220120s36fcdd31i9d0a18800d0a0349@mail.gmail.com","threadId":"12235","inReplyTo":"4e2a3a120802220113q4df473c0xcaad4760aea7f49b@mail.gmail.com","subject":"Re: Interrupted git-svn dcommit, now I get segmentation faults","fromName":"C. E. Ball","fromEmail":"ceball@users.sourceforge.net","sentAt":"2008-02-22T09:20:00Z","receivedAt":"2008-02-22T09:20:00Z","isPatch":false,"sender":{"key":"ceball@users.sourceforge.net","avatar":null},"body":"On Fri, Feb 22, 2008 at 5:13 PM, C. E. Ball\n<ceball@users.sourceforge.net> wrote:\n> >  If you get stuff like that you can move the git-svn state out of the\n>  >  way, and re-run git-svn fetch; it will rebuild the metadata.\n>  >\n>  >   $ mv .git/svn .git/svn.bad\n>  >   $ git-svn fetch\n>  >\n>  >  Not a fix I know, but might work for you ;)\n>\n>  Thank you very much, that did work for me!\n\nPlease ignore my previous email - I was in the wrong place on my\nfilesystem! Sorry about that.\n\nAfter following your suggestion on my broken repository, I still get\nthe same error (a segmentation fault just after the commit is\nsuccessfully sent to svn) when I 'git-svn dommit'.\n\nAny other suggestions?\n\nThanks,\nChris\n"},{"id":"69649","messageId":"47BF907E.2090904@vilain.net","threadId":"12235","inReplyTo":"4e2a3a120802220120s36fcdd31i9d0a18800d0a0349@mail.gmail.com","subject":"Re: Interrupted git-svn dcommit, now I get segmentation faults","fromName":"Sam Vilain","fromEmail":"sam@vilain.net","sentAt":"2008-02-23T03:18:22Z","receivedAt":"2008-02-23T03:18:22Z","isPatch":false,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"C. E. Ball wrote:\n> On Fri, Feb 22, 2008 at 5:13 PM, C. E. Ball\n> <ceball@users.sourceforge.net> wrote:\n>>>  If you get stuff like that you can move the git-svn state out of the\n>>  >  way, and re-run git-svn fetch; it will rebuild the metadata.\n>>  >\n>>  >   $ mv .git/svn .git/svn.bad\n>>  >   $ git-svn fetch\n>>  >\n>>  >  Not a fix I know, but might work for you ;)\n>>\n>>  Thank you very much, that did work for me!\n> \n> Please ignore my previous email - I was in the wrong place on my\n> filesystem! Sorry about that.\n> \n> After following your suggestion on my broken repository, I still get\n> the same error (a segmentation fault just after the commit is\n> successfully sent to svn) when I 'git-svn dommit'.\n> \n> Any other suggestions?\n\nWell this is where the fun starts.  Make sure you're on a new version of\ngit - latest stable or built from \"master\" if possible.  Start perl (or\neven debugperl if you have one built with debug symbols) with gdb, and\nget it to run git-svn and use \"bt\" to get a backtrace when you get the\nfault.\n\n  $ gdb /usr/bin/debugperl\n  ...\n  > run ~/bin/git-svn dcommit\n  ...\n  --- SEGV ---\n  > bt\n\nThat's the default place to start looking for clues.  Otherwise it's a\npretty much open-ended problem ... you would have to figure out (perhaps\nusing the perl debugger, perhaps using test cases) what triggers it,\nwhat's not passing the correct thing to the SVN API, whether it's a\nversion-specific SVN bug, etc.  It's certainly not very common which\nmakes me suspect the SVN::Core bindings and/or the stack beneath that\npart of it.  The SVN API is ... fragile, and the codebase is bulky and\npoorly thought out.  So, you get weird behaviour like the exception\nhandler has to die() or you get a segfault, etc.\n\nIf that seems too daunting, perhaps just respond with the versions of\neverything you are using (eg perl -MSVN::Core -le 'print\n$SVN::Core::VERSION', git --version etc) find out if it's specific to\nthe repository you're committing to, or (if you can) your system, etc,\nand perhaps someone else will have a better clue.\n\nGood luck,\nSam.\n"},{"id":"71054","messageId":"4e2a3a120803050100qc2902e3j6b2861f69b0d187f@mail.gmail.com","threadId":"12235","inReplyTo":"47BF907E.2090904@vilain.net","subject":"Re: Interrupted git-svn dcommit, now I get segmentation faults","fromName":"C. E. Ball","fromEmail":"ceball@users.sourceforge.net","sentAt":"2008-03-05T09:00:44Z","receivedAt":"2008-03-05T09:00:44Z","isPatch":false,"sender":{"key":"ceball@users.sourceforge.net","avatar":null},"body":"On Sat, Feb 23, 2008 at 11:18 AM, Sam Vilain <sam@vilain.net> wrote:\n>\n> C. E. Ball wrote:\n>  > On Fri, Feb 22, 2008 at 5:13 PM, C. E. Ball\n>  > <ceball@users.sourceforge.net> wrote:\n>  >>>  If you get stuff like that you can move the git-svn state out of the\n>  >>  >  way, and re-run git-svn fetch; it will rebuild the metadata.\n>  >>  >\n>  >>  >   $ mv .git/svn .git/svn.bad\n>  >>  >   $ git-svn fetch\n>  >>  >\n>  >>  >  Not a fix I know, but might work for you ;)\n>  >>\n>  >>  Thank you very much, that did work for me!\n>  >\n>  > Please ignore my previous email - I was in the wrong place on my\n>  > filesystem! Sorry about that.\n>  >\n>  > After following your suggestion on my broken repository, I still get\n>  > the same error (a segmentation fault just after the commit is\n>  > successfully sent to svn) when I 'git-svn dommit'.\n>  >\n>  > Any other suggestions?\n>\n>  Well this is where the fun starts.  Make sure you're on a new version of\n>  git - latest stable or built from \"master\" if possible.  Start perl (or\n>  even debugperl if you have one built with debug symbols) with gdb, and\n>  get it to run git-svn and use \"bt\" to get a backtrace when you get the\n>  fault.\n>\n>   $ gdb /usr/bin/debugperl\n>   ...\n>   > run ~/bin/git-svn dcommit\n>   ...\n>   --- SEGV ---\n>   > bt\n>\n>  That's the default place to start looking for clues.  Otherwise it's a\n>  pretty much open-ended problem ... you would have to figure out (perhaps\n>  using the perl debugger, perhaps using test cases) what triggers it,\n>  what's not passing the correct thing to the SVN API, whether it's a\n>  version-specific SVN bug, etc.  It's certainly not very common which\n>  makes me suspect the SVN::Core bindings and/or the stack beneath that\n>  part of it.  The SVN API is ... fragile, and the codebase is bulky and\n>  poorly thought out.  So, you get weird behaviour like the exception\n>  handler has to die() or you get a segfault, etc.\n>\n>  If that seems too daunting, perhaps just respond with the versions of\n>  everything you are using (eg perl -MSVN::Core -le 'print\n>  $SVN::Core::VERSION', git --version etc) find out if it's specific to\n>  the repository you're committing to, or (if you can) your system, etc,\n>  and perhaps someone else will have a better clue.\n\nThanks very much for taking the time to help with this. After\nbeginning to follow your suggestions, I decided it was too difficult\nfor me to debug the problem, so I started again with a new repository!\n\nI have no problems at all now. I've been using git (and git-svn) for\nabout two weeks now, and I'm really impressed. Previously I had tried\nto work with this particular svn repository using bzr and its svn\nplugin, but found it to be too slow (maybe because of some large\nbinary files, but I'm not sure). Apart from being fast, git also\ndoesn't seem to get in my way when I'm working.\n\nChris\n"}]}