Possible double call of std::thread::join though Balancer::waitForBalancerToStop

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.3.3
    • Affects Version/s: 3.4.10, 3.5.9
    • Component/s: Sharding
    • Fully Compatible
    • ALL
    • Sharding 2017-07-10, Sharding 2017-07-31, Sharding 2017-10-23, Sharding 2017-11-13, Sharding 2019-12-16, Sharding 2019-12-30, Sharding 2020-01-13
    • 0
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      The sharding balancer shutdown process eventually calls Balancer::waitForBalancerToStop in order to wait for the balancer thread to terminate. This method is called both by replication promotion to primary and by the shutdown sequence.

      If a node being promoted to primary is shutdown at the same time, it is possible that two calls enter Balancer::waitForBalancerToStop concurrently which will both call std::thread::join, which is not allowed.

            Assignee:
            Alexander Taskov (Inactive)
            Reporter:
            Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: