[SERVER-16591] Deadlock due to KVDatabaseCatalogEntry doing blocking transactional operations under the _collectionsLock Created: 18/Dec/14 Updated: 15/Jan/15 Resolved: 05/Jan/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | None |
| Fix Version/s: | 2.8.0-rc5 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Kaloian Manassiev | Assignee: | Kaloian Manassiev |
| Resolution: | Done | Votes: | 0 |
| Labels: | 28qa | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Participants: |
| Description |
|
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. |
| Comments |
| Comment by Githook User [ 05/Jan/15 ] |
|
Author: {u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}Message: |
| Comment by Githook User [ 05/Jan/15 ] |
|
Author: {u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}Message: This lock is not needed anymore since any modifications to the set of |
| Comment by Githook User [ 05/Jan/15 ] |
|
Author: {u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}Message: |
| Comment by Scott Hernandez (Inactive) [ 18/Dec/14 ] |
|
As discussed should remove the mmapv1 _collectionsLock as well. |