{"thread":{"id":"42724","subject":"Segfault during a big messy rebase","startedAt":"2016-06-27T14:40:18Z","lastAt":"2016-06-27T16:30:57Z","messageCount":2,"participants":["Greg Werbin","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"290235","messageId":"loom.20160627T084323-107@post.gmane.org","threadId":"42724","inReplyTo":null,"subject":"Segfault during a big messy rebase","fromName":"Greg Werbin","fromEmail":"ourobourbon@gmail.com","sentAt":"2016-06-27T06:51:26Z","receivedAt":"2016-06-27T14:40:18Z","isPatch":false,"sender":{"key":"ourobourbon@gmail.com","avatar":null},"body":"I was in the middle of a big messy rebase when the following\nhappened:\n\n$ git rebase --continue\n/usr/local/Cellar/git/2.9.0/libexec/git-core/git-rebase--interactive:\nline 238: 60305 \nSegmentation fault: 11  \"$@\"\nCould not commit staged changes.\n\nAnd then I tried:\n\n$ git rebase --abort\nfatal: Unable to create '/Users/greg/my-project/.git/MERGE_RR.lock':\nFile exists.\n\nAnother git process seems to be running in this repository, e.g.\nan editor opened by 'git commit'. Please make sure all processes\nare terminated then try again. If it still fails, a git process\nmay have crashed in this repository earlier:\nremove the file manually to continue.\n\nThen I ran:\n\n$ rm .git/MERGE_RR.lock\n$ git rebase --abort\nNo rebase in progress?\n\nWhich left the branch in a kind of half-rebased limbo, and my only option\nwas to put it out of its misery and delete it. Fortunately I had backed up\nmy work to a different branch, so recovery was not a problem.\n\nI don't know where to look inside Git for diagnostic logs; let me know if there's\nanything I can add to help track down the issue.\n\n"},{"id":"290251","messageId":"20160627163029.GB4430@sigill.intra.peff.net","threadId":"42724","inReplyTo":"loom.20160627T084323-107@post.gmane.org","subject":"Re: Segfault during a big messy rebase","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2016-06-27T16:30:29Z","receivedAt":"2016-06-27T16:30:57Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Jun 27, 2016 at 06:51:26AM +0000, Greg Werbin wrote:\n\n> I was in the middle of a big messy rebase when the following\n> happened:\n> \n> $ git rebase --continue\n> /usr/local/Cellar/git/2.9.0/libexec/git-core/git-rebase--interactive:\n> line 238: 60305 \n> Segmentation fault: 11  \"$@\"\n> Could not commit staged changes.\n\nCan you reproduce this segfault if you run the rebase again?\n\nIt's hard to tell what command even had a problem (one can guess \"git\ncommit\" from the message). Running it with GIT_TRACE=1 would show more\ndetails.\n\nThe simplest way to debug a segfault is generally to get a core file and\nask gdb for the backtrace. On Linux, that is generally:\n\n  # turn on cores; most modern distros turn them off by default\n  ulimit -c unlimited\n\n  # run your command\n  git rebase ...\n\n  # now find the core file; it's dumped in the cwd of the command\n  # that segfaulted, which is probably either .git or the top of the\n  # worktree\n  core=$(find . -name core)\n\n  # and then ask gdb for the backtrace\n  gdb -ex backtrace git $(core)\n\nI see you have /usr/local/Cellar, which IIRC is a homebrew thing. Some\nof those commands may need adjusting on OS X.\n\n-Peff\n"}]}