Uploaded image for project: 'Sourcetree for Windows'
  1. Sourcetree for Windows
  2. SRCTREEWIN-6791

Complex interactive-rebases fail due to index.lock w/ possible data loss

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Highest
    • None
    • 1.9.10.0
    • Git
    • None
    • Win 7 64-bit, JDK 1.8.0u111 64-bit

    • Severity 1 - Critical

    Description

      When performing a complex rebase deep into a tree, the operation will occasionally fail due to "index.lock" being present, with a message about another git process in operation.  If the abort-rebase also fails, the repository can be left in an inconsistent state with possible data loss.

      I suspect there is a background process in Sourcetree that is using a git command that monitors for changes/etc that remains active during the rebase process, and there is a race condition where sometimes it manages to grab the lock and causes the rebase to fail.  The fix is probably to suspend this process during the rebase and resume afterwards.

      To reproduce, select a commit ~15 commits behind the current branch, and select "rebase children of DEADBEEF interactively".  Then squash some of the commits at the bottom, or edit some messages, etc to cause everything above it to be rebased onto the changed commit.

      It does not occur every time, but farther back is more likely to cause it to reproduce, so try going farther back if you can't get it to reproduce.

      Strangely, the bug does not seem to occur when running a command-line interactive rebase, even if SourceTree is still open (tested once or twice but not thoroughly confirmed)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              36df62297cd8 jamie goodwin
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: