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

replSetGetStatus can deadlock with initialSyncer

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.0, v3.6, v3.4
    • Sprint:
      Repl 2018-06-18
    • Linked BF Score:
      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

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: