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

ReplicationCoordinatorExternalStateImpl::shutdown() must not hold _threadMutex while waiting for _taskExecutor

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 3.6.8, 4.0.3, 4.1.3
    • 3.6.10, 4.0.5, 4.1.5
    • Replication, Storage
    • None
    • Fully Compatible
    • ALL
    • v4.0, v3.6
    • Repl 2018-09-24, Repl 2018-10-22, Repl 2018-11-05
    • 65

    Description

      ReplicationCoordinatorExternalStateImpl::shutdown() holds _threadMutex while waiting for _taskExecutor. This is problematic, since the _taskExecutor's function takes database locks, so we can wait for database locks while holding _threadMutex. This can lead to deadlock, since we can wait for _threadMutex while holding ReplicationCoordinatorImpl::_mutex, and we can wait for ReplicationCoordinatorImpl::_mutex while holding database locks.

      Attachments

        Issue Links

          Activity

            People

              tess.avitabile@mongodb.com Tess Avitabile (Inactive)
              tess.avitabile@mongodb.com Tess Avitabile (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: