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

dbCheck command causes server to crash if database for collection it is processing gets dropped

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.5.13
    • Storage
    • Fully Compatible
    • ALL
    • Hide

      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}));
          }
      })();
      

      Show
      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})); } })();
    • Storage 2017-09-11, Storage 2017-10-02
    • 0

    Description

      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;
      }
      

      Attachments

        Activity

          People

            louis.williams@mongodb.com Louis Williams
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: