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

Race in ReplSetTest.stopSet can cause hang because all nodes are frozen

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Replication
    • Fully Compatible
    • ALL
    • Repl 2024-09-16, Repl 2024-09-30, Repl 2024-10-14
    • 0

      There is a race condition in ReplSet.stopSet() while doing some data consistency checks where we determine the set of secondaries, then we get the primary, then we freeze all the secondaries. The race comes in when all nodes say they are secondaries because we are in the middle of an election (the new primary hasn't won yet, but the old primary has stepped down at this point). Then we wait for a new node to be elected primary, then end up freezing all nodes in the set (even the newly elected one, which has to step down), which means we block them from running for election the rest of the test. Later on in the test when we wait to have a primary, none ever gets elected so the test times out.

            Assignee:
            pavithra.vetriselvan@mongodb.com Pavithra Vetriselvan
            Reporter:
            samy.lanka@mongodb.com Samyukta Lanka
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: