[SERVER-25519] repl::checkForCappedOplog will segfault if the local database doesn't exist Created: 09/Aug/16  Updated: 08/Feb/17  Resolved: 31/Aug/16

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 3.3.8
Fix Version/s: 3.2.13, 3.3.14

Type: Bug Priority: Major - P3
Reporter: Mathias Stearn Assignee: Benety Goh
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
is related to SERVER-22030 Abort if oplog is uncapped when start... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Sprint: Repl 2016-09-19
Participants:

 Description   

It dereferences the db without checking for null. This is especially a problem because it is called in the loop repairDatabasesAndCheckVersion for every database. It should be either moved out of the loop or only done when dbName == "local".



 Comments   
Comment by Githook User [ 08/Feb/17 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-25519 move static functions in db.cpp into anonymous namespace

(cherry picked from commit 7b126b0eb8fc8bdab7e5c12c28d0ed58a48505bb)
Branch: v3.2
https://github.com/mongodb/mongo/commit/75835e9ec5c88a60bf2d8855c0fde1177845414c

Comment by Githook User [ 08/Feb/17 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-25519 moved checkForCappedOplog from oplog.cpp to db.cpp

(cherry picked from commit 3a7690d1ab8894c919b5a2f845a4e54aad5b6ae7)
Branch: v3.2
https://github.com/mongodb/mongo/commit/29b5d361ac95f2c0938f023274e1cb594388314d

Comment by Githook User [ 08/Feb/17 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-25519 repl::checkForCappedOplog accepts db pointer to local database

(cherry picked from commit d740809efc076f6c48cc904a0d68aa0115ba3ab5)
Branch: v3.2
https://github.com/mongodb/mongo/commit/3d56ecc5637be7b017289b91904bef323196bdcf

Comment by Githook User [ 31/Aug/16 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-25519 move static functions in db.cpp into anonymous namespace
Branch: master
https://github.com/mongodb/mongo/commit/7b126b0eb8fc8bdab7e5c12c28d0ed58a48505bb

Comment by Githook User [ 31/Aug/16 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-25519 moved checkForCappedOplog from oplog.cpp to db.cpp
Branch: master
https://github.com/mongodb/mongo/commit/3a7690d1ab8894c919b5a2f845a4e54aad5b6ae7

Comment by Githook User [ 31/Aug/16 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-25519 repl::checkForCappedOplog accepts db pointer to local database
Branch: master
https://github.com/mongodb/mongo/commit/d740809efc076f6c48cc904a0d68aa0115ba3ab5

Comment by Githook User [ 31/Aug/16 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: Revert "SERVER-25519 repl::checkForCappedOplog accepts db pointer to local database"

This reverts commit b046947969597fa69000914ae839675b3655313b.
Branch: master
https://github.com/mongodb/mongo/commit/30bb947cdb9b5e3f576b31855b8fba58a6d89c1a

Comment by Githook User [ 31/Aug/16 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: Revert "SERVER-25519 moved checkForCappedOplog from oplog.cpp to db.cpp"

This reverts commit 6db35dc5b10f7c0cf4b1c34f52c8dc4c4b6faca3.
Branch: master
https://github.com/mongodb/mongo/commit/309b27dad4cafbdf33fa625aee6005e26a64629b

Comment by Githook User [ 31/Aug/16 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-25519 moved checkForCappedOplog from oplog.cpp to db.cpp
Branch: master
https://github.com/mongodb/mongo/commit/6db35dc5b10f7c0cf4b1c34f52c8dc4c4b6faca3

Comment by Githook User [ 31/Aug/16 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-25519 repl::checkForCappedOplog accepts db pointer to local database
Branch: master
https://github.com/mongodb/mongo/commit/b046947969597fa69000914ae839675b3655313b

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