Race in DBClientGRPCTest::ShutdownBehavior

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 7.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Service Arch 2023-11-13
    • 11
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      This test verifies that DBClientGRPCStream::shutdown properly closes the underlying gRPC stream. It does so by creating a DBClientGRPCStream, shutting it down, and then sending a ping command (implicitly reconnecting while doing so). It confirms this works as expected asserting that the first invocation of the server handler does not receive a ping command and that the second does. It guards which assertions to perform via the use of an atomic boolean flag that the handler marks as true after the first invocation. However, the reading and setting of this flag aren't performed atomically, so it is possible for the second invocation of the handler to also try to verify that no ping command has been received even though one will be, resulting in a failed test.

      One example failure: https://parsley.mongodb.com/resmoke/67d700a66b9c272f92abe76807a7103c/test/179194321692af2648a0deca6fd9b2a0?bookmarks=0,50&shareLine=27

              Assignee:
              Patrick Freed
              Reporter:
              Patrick Freed
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: