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

        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