Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-81226

Deadlock between _commitSplitPreparedTxnOnPrimary and stepDown

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.2.0-rc0, 7.0.3
    • Affects Version/s: None
    • Component/s: None
    • None
    • Replication
    • Fully Compatible
    • ALL
    • v7.0
    • Repl 2023-10-02, Repl 2023-10-16
    • 120

      When we loop through all split sessions, it is possible that some splitOpCtx may successfully acquire the RSTL while others are blocked behind stepDown (e.g. when stepDown happens in the middle of this loop). SERVER-79950 added UninterruptibleLockGuard to all splitOpCtx and so _commitSplitPreparedTxnOnPrimary is not interruptible by stepDown. In the case mentioned above, if some but not all of the splitOpCtx in _commitSplitPreparedTxnOnPrimary already hold RSTL in IX mode, it will block stepDown while not being able to make progress. Thus, we have a deadlock.

            Assignee:
            wenbin.zhu@mongodb.com Wenbin Zhu
            Reporter:
            lingzhi.deng@mongodb.com Lingzhi Deng
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: