Deadlock due to KVDatabaseCatalogEntry doing blocking transactional operations under the _collectionsLock

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.8.0-rc5
    • Affects Version/s: None
    • Component/s: Storage
    • Fully Compatible
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      See the attached stack dump file.

      KVDatabaseCatalogEntry::sizeOnDisk is called under the KVDatabaseCatalogEntry::_collectionsLock in thread #16, but we are under a WT transaction there (i.e. snapshot is being held).

      The code which already holds the _collectionsLock (threads #13 or #15) is stuck on eviction. Eviction cannot proceed because of the transaction started by thread #16, but thread #16 cannot make progress because it's stuck on the _collectionsLock.

      The solution would be to not call WT methods under this mutex.

      I believe the list of collections should be stable, because we are under the DB IX lock and adding a collection requires DB X lock, so we can completely get rid of this mutex.

            Assignee:
            Kaloian Manassiev
            Reporter:
            Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: