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

Recipient should not do reads/writes while holding the instance mutex

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.9.0
    • None
    • None
    • Fully Compatible
    • ALL
    • Repl 2021-02-08, Repl 2021-02-22
    • 10

    Description

      Recipient updates state docs while holding onto the instance mutex, see this example. This is problematic because updateStateDoc needs to acquire RSTL in IX mode but stepDown would interrupt() the migration (as part of _performPostMemberStateUpdateAction) while holding RSTL in X mode. interrupt() needs to acquire the instance mutex. So this could introduce a deadlock - the updateStateDoc on the recipient thread waits on RSTL IX mode v.s. the interrupt() on stepDown thread is waiting on the instance mutex while holding RSTL in X mode.

      Attachments

        Activity

          People

            xuerui.fa@mongodb.com Xuerui Fa
            lingzhi.deng@mongodb.com Lingzhi Deng
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: