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

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.5.13
    • Component/s: Storage
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Steps To Reproduce:
      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})); } })();
    • Sprint:
      Storage 2017-09-11, Storage 2017-10-02
    • Linked BF Score:
      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

            Assignee:
            louis.williams Louis Williams
            Reporter:
            max.hirschhorn Max Hirschhorn
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: