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

Segfault trying to take a resource locking in the kv catalog

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 2.7.8
    • Fix Version/s: 2.8.0-rc0
    • Component/s: Storage
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

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

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

      Description

      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)

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: