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

Oplog query on uninitiated replica set node can cause seg fault

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.6, 4.0.0-rc0
    • Component/s: Replication
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      let rst = new ReplSetTest({nodes: 1});
      rst.startSet();
      let db = rst.nodes[0].getDB('local');
      assert.commandWorked(db.runCommand({
          isMaster: 1,
          "$clusterTime": {
              "clusterTime": Timestamp(1, 1),
              "signature":
                  {"hash": BinData(0, "AAAAAAAAAAAAAAAAAAAAAAAAAAA="), "keyId": NumberLong(0)}
          }
      }));
      db.runCommand({
          find: "oplog.rs",
          filter: {ts: {$gte: Timestamp(1520004466, 2)}},
          tailable: true,
          oplogReplay: true,
          awaitData: true,
          maxTimeMS: 60000,
          batchSize: 13981010,
          term: 1,
          readConcern: {afterClusterTime: Timestamp(1, 1)}
      });
      

      Show
      let rst = new ReplSetTest({nodes: 1}); rst.startSet(); let db = rst.nodes[0].getDB('local'); assert.commandWorked(db.runCommand({ isMaster: 1, "$clusterTime": { "clusterTime": Timestamp(1, 1), "signature": {"hash": BinData(0, "AAAAAAAAAAAAAAAAAAAAAAAAAAA="), "keyId": NumberLong(0)} } })); db.runCommand({ find: "oplog.rs", filter: {ts: {$gte: Timestamp(1520004466, 2)}}, tailable: true, oplogReplay: true, awaitData: true, maxTimeMS: 60000, batchSize: 13981010, term: 1, readConcern: {afterClusterTime: Timestamp(1, 1)} });
    • Sprint:
      Repl 2018-05-21, Repl 2018-06-04, Repl 2018-06-18
    • Linked BF Score:
      60

      Description

      We do not check if the node has a config before trying to satisfy the read concern, so we fail trying to wait for oplog visibility.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              matthew.russotto Matthew Russotto
              Reporter:
              judah.schvimer Judah Schvimer
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: