[SERVER-15057] RocksStorage: deadlock when dropping database with indexes Created: 27/Aug/14  Updated: 28/Apr/15  Resolved: 05/Sep/14

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 2.7.7

Type: Bug Priority: Minor - P4
Reporter: Siying Dong Assignee: Kaloian Manassiev
Resolution: Done Votes: 0
Labels: community-team, pull-request
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-15085 rocks storage fails when restarting Closed
related to SERVER-15161 RocksCursor::_reverseLocate() Should ... Closed
related to SERVER-15271 rocks engine doesn't return capped in... Closed
related to SERVER-15232 Rocks Storage Engine to support Index... Closed
is related to SERVER-15055 rocks: unit testjstests/core/apitest_... Closed
is related to SERVER-14352 prototype and implement rocksdb stora... Closed
is related to SERVER-13635 Clean up the storage abstraction layer Closed
Tested
Operating System: ALL
Steps To Reproduce:

run unit test jstests/core/dbcase.js with RocksDB experiment engine.

Participants:

 Description   

I saw rocks storage deadlock when trying to acquire RocksEngine::_entryMapMutex twice. Here is the call stack
...
#7 mongo::RocksEngine::getIndexColumnFamily at src/mongo/db/storage/rocks/rocks_engine.cpp:224
#8 mongo::RocksCollectionCatalogEntry::removeIndex at src/mongo/db/storage/rocks/rocks_collection_catalog_entry.cpp:121
#9 mongo::RocksEngine::_dropCollection_inlock at src/mongo/db/storage/rocks/rocks_engine.cpp:348
#10 mongo::RocksEngine::dropDatabase at src/mongo/db/storage/rocks/rocks_engine.cpp:188
...
In dropDatabase(), _entryMapMutex is already acquired but in getIndexColumnFamily() it tries to acquire _entryMapMutex agin.



 Comments   
Comment by Githook User [ 05/Sep/14 ]

Author:

{u'username': u'siying', u'name': u'sdong', u'email': u'siying.d@fb.com'}

Message: SERVER-15057 fix one potential deadlock in rocks storage when dropping database

Closes #760

Signed-off-by: Benety Goh <benety@mongodb.com>
Branch: master
https://github.com/mongodb/mongo/commit/3e3732abb5306c881fd6d210e0e7d3c55bdb9c1d

Generated at Thu Feb 08 03:36:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.