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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.6.8, 4.0.3, 4.1.3
    • Fix Version/s: 3.6.10, 4.0.5, 4.1.5
    • Component/s: Replication, Storage
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.0, v3.6
    • Sprint:
      Repl 2018-09-24, Repl 2018-10-22, Repl 2018-11-05
    • Linked BF Score:
      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

              Assignee:
              tess.avitabile Tess Avitabile
              Reporter:
              tess.avitabile Tess Avitabile
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: