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

replSetGetStatus can deadlock with initialSyncer

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

      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.

       

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

              Created:
              Updated:
              Resolved: