Race condition between FaultManager::_init and FaultManager::appendDescription

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Networking & Observability
    • Fully Compatible
    • ALL
    • N&O 2025-09-29, N&O 2025-10-13
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The mutex locking scheme in FaultManager was recently revised in SERVER-109338.

      Those changes introduced a bug. runMongosServer can indirectly call FaultManager::_init() concurrently with the previously started FTDC thread indirectly calling FaultManager::appendDescription(...). These two functions contend for the data member std::vector<std::unique_ptr<HealthObserver>> FaultManager::_observers.

      This race was identified in code review, but then the commit that addressed the review comment did not actually fix the race condition.

            Assignee:
            David Goffredo
            Reporter:
            David Goffredo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: