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

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.6.6, 4.0.0-rc0
    • Replication
    • None
    • Fully Compatible
    • ALL
    • 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)} });
    • Repl 2018-05-21, Repl 2018-06-04, Repl 2018-06-18
    • 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

              matthew.russotto@mongodb.com Matthew Russotto
              judah.schvimer@mongodb.com Judah Schvimer
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: