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

Oplog query on uninitiated replica set node can cause seg fault

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6.6, 4.0.0-rc0
    • Affects Version/s: None
    • Component/s: 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

      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.

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

              Created:
              Updated:
              Resolved: