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

Segfault trying to take a resource locking in the kv catalog

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.8.0-rc0
    • Affects Version/s: 2.7.8
    • Component/s: Storage
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Hide

      Start up with a non mmapv1 storage engine with supportsDocLocking() == false.

      Show
      Start up with a non mmapv1 storage engine with supportsDocLocking() == false.

      In KVCatalog::_findEntry we have:

      boost::scoped_ptr<Lock::ResourceLock> rLk;
      if (!_isRsThreadSafe)
      rLk.reset(new Lock::ResourceLock(opCtx->lockState(), catalogRID));

      But during KVStorageEngine::finishInit(), opCtx->lockState() is null, so we crash.

      I think the right thing to do is not take a lock at all in this case because if we don't have a lock state we're probably in startup (or other inherently single-threaded block)

            Assignee:
            mathias@mongodb.com Mathias Stearn
            Reporter:
            john.esmet@gmail.com John Esmet
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: