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

Lock order inversion between the ShardRegistry::_mutex, ReplicaSetMonitorManager::_mutex, and ShardingTaskExecutorPoolController::_mute

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Networking & Observability
    • ALL
    • N&O Prioritized List

      There is specifically a cycle of STEP::_mutex --> ShardREgistry::_mutex --> RSMM::_mutex --> STEP::_mutex).

      An example manifestation would be:
      STEP mutex is taken while holding RSMM mutex via RSMM::removeMonitor --> StreamableRSM::drop --> STEP::REplicaSetChangeListener::onDroppedSet

      RSM mutex taken while holding ShardREgistry mutex via ShardingReplicaSetChangedLitener::onConfirmedSet --> ShardRegistry::updateReplSetHosts --> ShardFactory::createShard --> RSMM::getOrCreateMonitor

      SR mutex taken while holding STEP mutex via ConnectionPool::get --> STEP::addHost --> ShardRegistry::isConfigServer --> ShardRegistry::getConfigShard

            Assignee:
            Unassigned Unassigned
            Reporter:
            george.wangensteen@mongodb.com George Wangensteen
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: