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

Deadlock between shutdown and stepdown

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.4.5, 3.5.6
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Fully Compatible
    • ALL
    • Repl 2017-05-08
    • 0

      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.

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            spencer@mongodb.com Spencer Brody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: