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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Networking & Observability
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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
              Reporter:
              George Wangensteen (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: