[SERVER-41869] Reverse mutex acquisition order in CatalogCache::_scheduleCollectionRefresh Created: 21/Jun/19 Updated: 29/Oct/23 Resolved: 03/Jul/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 3.6.13, 4.0.10 |
| Fix Version/s: | 3.6.14, 4.0.11 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Randolph Tan | Assignee: | Kaloian Manassiev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v3.6
|
||||||||
| Sprint: | Sharding 2019-07-15 | ||||||||
| Participants: | |||||||||
| Case: | (copied to CRM) | ||||||||
| Description |
|
CatalogCache::_scheduleCollectionRefresh holds CatalogCache::_mutex while calling ShardServerCatalogCacheLoader::getsChunkSince, which will try to grab ShardServerCCL::_mutex at the beginning: Inside async task, tries to run callback while holding ShardServerCLL::_mutex: and the callback tries to grab the CatalogCache::_mutex: |
| Comments |
| Comment by Githook User [ 03/Jul/19 ] |
|
Author: {'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com', 'username': 'kaloianm'}Message: As part of this change also backports the following cleanup:
(cherry picked from commit cb0393248d26e21e69efde15d9d3965293ead29b) |
| Comment by Githook User [ 03/Jul/19 ] |
|
Author: {'name': 'Kaloian Manassiev', 'username': 'kaloianm', 'email': 'kaloian.manassiev@mongodb.com'}Message: ... to follow naming conventions (cherry picked from commit b919fb48eb611b3c8cbba9d7f03f6df1d25d4cd5) |
| Comment by Githook User [ 03/Jul/19 ] |
|
Author: {'name': 'Kaloian Manassiev', 'username': 'kaloianm', 'email': 'kaloian.manassiev@mongodb.com'}Message: As part of this change also backports the following cleanup:
(cherry picked from commit cb0393248d26e21e69efde15d9d3965293ead29b) |
| Comment by Randolph Tan [ 21/Jun/19 ] |
|
Note: this deadlock no longer exists in v4.2 due to the changes made in this commit: https://github.com/mongodb/mongo/commit/cb0393248d26e21e69efde15d9d3965293ead29b |