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

    • Bug
    • Status: Closed
    • Minor - P4
    • Resolution: Fixed
    • 2.7.8
    • 2.8.0-rc0
    • 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.

    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

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

            Dates

              Created:
              Updated:
              Resolved: