Potential race condition in asio_transport_layer_test.cpp

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Networking & Observability
    • Fully Compatible
    • ALL
    • N&O 2025-07-21
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      There is a potential subtle race condition in asio_transport_layer_test.cpp I found when investigating BF-37873.

      We should add a small sleep before turning off the fail point (https://github.com/10gen/mongo/blob/master/src/mongo/transport/asio/asio_transport_layer_test.cpp#L307) to hopefully avoid this issue and also swap the order of asserts at the end of the test to ensure that we actually see two sessions when running into this issue (confirming this is actually a race condition and not an issue with the code logic).

            Assignee:
            Cole Harbeck
            Reporter:
            Cole Harbeck
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: