...
BugZero found this defect 2700 days ago.
DbCheckJob::_getCollectionMetadata() should check whether AutoGetDbForDbCheck::getDb() returns a null pointer in addition to checking whether Database::getCollection() returns a null pointer. auto collection = agd.getDb()->getCollection(opCtx, info.nss); if (!collection) { return false; }
ramon.fernandez commented on Fri, 8 Sep 2017 18:11:28 +0000: Author: {'username': u'louiswilliams', 'name': u'Louis Williams', 'email': u'louis.williams@mongodb.com'} Message:SERVER-30934 Check if DB is null before getting collection Branch:master https://github.com/mongodb/mongo/commit/d5babd4bf91055fa635deda2b9052cfa5ee2c2fc louis.williams commented on Fri, 8 Sep 2017 17:55:37 +0000: Github commit: https://github.com/mongodb/mongo/commit/d5babd4bf91055fa635deda2b9052cfa5ee2c2fc
python buildscripts/resmoke.py repro_server30934.js repro_server30934.js (function() { "use strict"; while (true) { assert.commandWorked(db.runCommand({create: "mycoll"})); assert.commandWorked(db.runCommand({dbCheck: "mycoll"})); assert.commandWorked(db.runCommand({dropDatabase: 1})); } })();