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

replSetGetStatus can deadlock with initialSyncer

    XMLWordPrintableJSON

Details

    • Fully Compatible
    • ALL
    • v4.0, v3.6, v3.4
    • Repl 2018-06-18
    • 0

    Description

      When called with initialSync:1, replSetGetStatus locks the ReplicationCoordinatorImpl mutex, then the InitialSyncer mutex.  The InitialSyncer in the course of normal operation will acquire the same locks in the opposite order.  Result: deadlock.

      I do not think it is necessary to hold the ReplicationCoordinatorImpl mutex while getting the initialSync status, so the fix may be as simple as getting the initialSync status before acquiring the mutex.

       

      Attachments

        Activity

          People

            suganthi.mani@mongodb.com Suganthi Mani
            matthew.russotto@mongodb.com Matthew Russotto
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: