Segfault trying to take a resource locking in the kv catalog

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • 2.8.0-rc0
    • Affects Version/s: 2.7.8
    • Component/s: Storage
    • 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.
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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 Stearn
            Reporter:
            John Esmet
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: