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

Deadlock between shutdown and stepdown

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.4.5, 3.5.6
    • Component/s: Replication
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Completed:
    • Sprint:
      Repl 2017-05-08
    • Linked BF Score:
      0

      Description

      Stepdown calls ReplicationCoordinatorExternalStateImpl::startProducerIfStopped, which takes _threadMutex while holding the global exclusive lock. Shutdown calls ReplicationCoordinatorExternalStateImpl::shutdown which takes _threadMutex and then does a database read by calling _storageInterface->getAppliedThrough.

      We should probably be doing the database reads/writes in ReplicationCoordinatorExternalStateImpl::shutdown after releasing _threadMutex.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              benety.goh Benety Goh
              Reporter:
              spencer Spencer Brody
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: