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

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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 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

      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:
            alex.taskov@mongodb.com Alexander Taskov (Inactive)
            Reporter:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: