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

Server crashes if "find" command receives UUID for namespace that doesn't exist

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6.0-rc0
    • Affects Version/s: None
    • Component/s: Querying, Storage
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Hide
      python buildscripts/resmoke.py repro_server30933.js
      
      repro_server30933.js
      assert.commandWorked(db.runCommand({find: UUID("c52a81a9-93fb-4cb7-a2a6-63d1517f2c4a")}));
      
      Show
      python buildscripts/resmoke.py repro_server30933.js repro_server30933.js assert.commandWorked(db.runCommand({find: UUID( "c52a81a9-93fb-4cb7-a2a6-63d1517f2c4a" )}));
    • Storage 2017-10-02
    • 0

      The changes from 4970898 as part of SERVER-29839 made it so the QueryRequest updates its _nss member by resolving the UUID to a NamespaceString using the UUIDCatalog. It additionally introduced an invariant() that the UUID would be found in the UUIDCatalog; however, given that the UUID is user-supplied data we should probably be using uassert() here instead.

      void QueryRequest::refreshNSS(OperationContext* opCtx) {
          UUIDCatalog& catalog = UUIDCatalog::get(opCtx);
          if (_uuid) {
              invariant(catalog.lookupCollectionByUUID(_uuid.get()));
              _nss = catalog.lookupNSSByUUID(_uuid.get());
          }
          invariant(!_nss.isEmpty());
      }
      

            Assignee:
            maria.vankeulen@mongodb.com Maria van Keulen
            Reporter:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: