[SERVER-53661] SessionCatalog mutex is level 0 and is held while acquiring the FutureResolution mutex Created: 08/Jan/21 Updated: 29/Oct/23 Resolved: 20/May/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 5.0.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Matthew Saltz (Inactive) | Assignee: | Luis Osta (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | servicearch-wfbf-day, sharding-csrs-stepdown-also | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Requested: |
v4.9
|
||||||||||||||||
| Sprint: | Service Arch 2021-05-17 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 162 | ||||||||||||||||
| Story Points: | 1 | ||||||||||||||||
| Description |
|
The FutureResolution mutex is marked level 0. So is the SessionCatalog mutex. This is a problem because while the SessionCatalog mutex is held, we call OperationContext::markKilled, which then resolves a future which requires acquiring the FutureResolution mutex. This is only a problem in tests since there's no actual risk for deadlock - it's just reported as a level violation by the latch analyzer. To fix it we need to either make the SessionCatalog mutex level 1, or make the FutureResolution into a std::mutex with no leveling since it's such a low level component.
Acceptance criteria: Remove the hierarchy number from the FutureResolution mutex |
| Comments |
| Comment by Githook User [ 16/May/21 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: This reverts commit beb176da79f83da393da9416b3552d00f4ff50c9. |
| Comment by Githook User [ 16/May/21 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: |
| Comment by Githook User [ 15/May/21 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: |
| Comment by Githook User [ 14/May/21 ] |
|
Author: {'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}Message: |