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

Hitting unexpected invariant failure, causing server shutdown

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Critical - P2 Critical - P2
    • 4.9.0, 4.2.15, 4.4.7
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v4.4, v4.2
    • Service arch 2020-12-28
    • 175

      Testing latest server release, we are hitting an unexpected invariant:

      ClientMetadata was previously set, it should be set precisely once","file":"src/mongo/rpc/metadata/client_metadata.cpp","line":545"
      

      It's happening due to a combination of factors:

      1. We are testing against a server with requireApiVersion parameter set to true, which causes the isMaster handshake command to fail.
      2. For unrelated reasons, we are using a version of PyMongo with a bug that exposes the invariant (PYTHON-1434) by retrying the ismaster on the same connection.  It will be difficult to upgrade PyMongo in the short term.

      What we expect to happen is that the server uasserts and perhaps closes the connection. What actually happens is that we hit the invariant and the server shuts down.

      This behavior seems to have been introduced relatively recently, in scope of SERVER-49336. I discussed it briefly with the author of that commit, and it doesn't appear that this behavior is intended. Instead, we should first be hitting this uassert, but it seems that we are not.

      Server logs are available here.

            Assignee:
            ben.caimano@mongodb.com Benjamin Caimano (Inactive)
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: