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

Deadlock in BalancerStatsRegistry while shutting down

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • CAR Team 2024-09-02, CAR Team 2024-09-16
    • 200

      When shutting down the server, BalancerStatsRegistry can deadlock. The shutdown thread waits for all threads to terminate here, while holding a mutex taken at this point. Meawhile, one of the threads it is waiting for can get stuck here waiting for the same mutex. In principle, this deadlock could also happen when stepping down It can't happen during stepdown, because _initializeAsync acquires the global lock here, which serializes with stepdown, the same is not true when shutting down.

            Assignee:
            aitor.esteve@mongodb.com Aitor Esteve Alvarado
            Reporter:
            aitor.esteve@mongodb.com Aitor Esteve Alvarado
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: