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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • High
    • None
    • 3.1.0-beta-2973
    • Bitbucket
    • 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

        1. 1Z0-1000.pdf
          275 kB
        2. 1Z0-1001.pdf
          275 kB
        3. 1Z0-1002.pdf
          275 kB
        4. 1Z0-1004.pdf
          275 kB
        5. 1Z0-1005.pdf
          275 kB
        6. 1Z0-1006.pdf
          275 kB
        7. 1Z0-1007.pdf
          275 kB
        8. 1Z0-1008.pdf
          275 kB
        9. 1Z0-1009.pdf
          275 kB
        10. 1Z0-1010.pdf
          275 kB
        11. 1Z0-1011.pdf
          275 kB
        12. 1Z0-1012.pdf
          275 kB
        13. 1Z0-1013.pdf
          275 kB
        14. 1Z0-1014.pdf
          275 kB
        15. 1Z0-1015.pdf
          275 kB
        16. 1Z0-1016.pdf
          275 kB
        17. 1Z0-1017.pdf
          275 kB
        18. 1Z0-1018.pdf
          275 kB
        19. 1Z0-1019.pdf
          275 kB
        20. 1Z0-1021.pdf
          276 kB
        21. 1Z0-1023.pdf
          276 kB
        22. 1Z0-1024.pdf
          275 kB
        23. 1Z0-1026.pdf
          275 kB
        24. 1Z0-1028.pdf
          275 kB
        25. 1Z0-968.pdf
          276 kB
        26. 1Z0-969.pdf
          275 kB
        27. 1Z0-970.pdf
          275 kB
        28. 1Z0-971.pdf
          275 kB
        29. 1Z0-973.pdf
          276 kB
        30. 1Z0-974.pdf
          275 kB
        31. 1Z0-975.pdf
          275 kB
        32. 1Z0-976.pdf
          275 kB
        33. 1Z0-978.pdf
          275 kB
        34. 1Z0-980.pdf
          276 kB
        35. 1Z0-982.pdf
          275 kB
        36. 1Z0-983.pdf
          275 kB
        37. 1Z0-985.pdf
          276 kB
        38. 1Z0-986.pdf
          275 kB
        39. 1Z0-987.pdf
          275 kB
        40. 1Z0-988.pdf
          275 kB
        41. 1Z0-992.pdf
          275 kB
        42. 2V0-51.18.pdf
          276 kB
        43. 2V0-602.pdf
          275 kB
        44. 2V0-620.pdf
          275 kB
        45. 2V0-621.pdf
          275 kB
        46. 2V0-621D.pdf
          275 kB
        47. 2V0-622.pdf
          275 kB
        48. 2V0-622D.pdf
          275 kB
        49. 2V0-642.pdf
          275 kB
        50. 2V0-731.pdf
          276 kB
        51. 2V0-751.pdf
          276 kB

        Activity

          People

            Unassigned Unassigned
            03a82fca8d51 stevestone
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 120h
                120h
                Remaining:
                Remaining Estimate - 120h
                120h
                Logged:
                Time Spent - Not Specified
                Not Specified