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

Latch analyzer complains theoretical deadlock with SingleServerDiscoveryMonitor

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • Sharding NYC
    • ALL

      This and this place holds SingleServerDiscoveryMonitor::mutex lock with HierarchicalAcquisitionLevel(4), and runs SingleServerDiscoveryMonitor::_onHelloFailure() which in-turn acquires TopologyEventsPublisher::_eventQueueMutex HierarchicalAcquisitionLevel(6). This triggers latch analyzer to throw the following message in my local testing.

      "Theoretical deadlock found on use of latch","attr":{"reason":"Latch acquired after other latch of lower level","latch":{"name":"TopologyEventsPublisher::_eventQueueMutex","latchId":11027,"level":6,"file":"src/mongo/client/sdam/topology_listener.h","line":149},"latchesHeld":[{"name":"SingleServerDiscoveryMonitor::mutex","latchId":11030,"level":4,"file":"src/mongo/client/server_discovery_monitor.h","line":103}]}}
      

      It seems like a false alarm. But just passing to sharding team to do formal evaluation if that's a false alarm and can be ignored (Or) need some sort of fix.

            Assignee:
            backlog-server-sharding-nyc [DO NOT USE] Backlog - Sharding NYC
            Reporter:
            suganthi.mani@mongodb.com Suganthi Mani
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: