[SERVER-34249] Oplog query on uninitiated replica set node can cause seg fault Created: 02/Apr/18  Updated: 29/Oct/23  Resolved: 04/Jun/18

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 3.6.6, 4.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Judah Schvimer Assignee: Matthew Russotto
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Duplicate
is duplicated by SERVER-32940 ReplicationCoordinator waitUntilOpTim... Closed
Problem/Incident
causes SERVER-70785 data race on the _rsConfigState field... Closed
Related
related to SERVER-35616 Oplog query on initial syncing node c... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

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
Participants:
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.



 Comments   
Comment by Githook User [ 19/Jun/18 ]

Author:

{'username': 'mtrussotto', 'name': 'Matthew Russotto', 'email': 'matthew.russotto@10gen.com'}

Message: SERVER-34249 Oplog query on uninitiated replica set node can cause seg fault.

(cherry picked from commit 79e63d3d49169fbac6f02f66742bc26a9342ba2c)
Branch: v3.6
https://github.com/mongodb/mongo/commit/4ecd16061458ed451af069af30c1a7281141569b

Comment by Spencer Brody (Inactive) [ 21/May/18 ]

Bumped up to 4.0.0 since it's blocking a BF that's failing pretty regularly.

Comment by Githook User [ 10/May/18 ]

Author:

{'name': 'Matthew Russotto', 'email': 'matthew.russotto@10gen.com', 'username': 'mtrussotto'}

Message: SERVER-34249 Oplog query on uninitiated replica set node can cause seg fault.
Branch: master
https://github.com/mongodb/mongo/commit/79e63d3d49169fbac6f02f66742bc26a9342ba2c

Generated at Thu Feb 08 04:36:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.