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

Reverse mutex acquisition order in CatalogCache::_scheduleCollectionRefresh

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 3.6.13, 4.0.10
    • 3.6.14, 4.0.11
    • Sharding
    • None
    • Fully Compatible
    • ALL
    • v3.6
    • Sharding 2019-07-15

    Description

      CatalogCache::_scheduleCollectionRefresh holds CatalogCache::_mutex while calling ShardServerCatalogCacheLoader::getsChunkSince, which will try to grab ShardServerCCL::_mutex at the beginning:
      https://github.com/mongodb/mongo/blob/r4.0.10/src/mongo/s/catalog_cache.cpp#L603

      Inside async task, tries to run callback while holding ShardServerCLL::_mutex:
      https://github.com/mongodb/mongo/blob/r4.0.10/src/mongo/db/s/shard_server_catalog_cache_loader.cpp#L416

      and the callback tries to grab the CatalogCache::_mutex:
      https://github.com/mongodb/mongo/blob/r4.0.10/src/mongo/s/catalog_cache.cpp#L577

      Attachments

        Activity

          People

            kaloian.manassiev@mongodb.com Kaloian Manassiev
            randolph@mongodb.com Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: