[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:
Backports
Depends
Related
related to SERVER-76851 remove unnecessary latch predicate in... Closed
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: SERVER-53661 re-enable disable index_commit_currentop_slow.js

This reverts commit beb176da79f83da393da9416b3552d00f4ff50c9.
Branch: master
https://github.com/mongodb/mongo/commit/f856bd9d8ea972ffa55e4762b8164fa2145e8bdb

Comment by Githook User [ 16/May/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-53661 fix latch name in index_commit_currentop_slow.js
Branch: master
https://github.com/mongodb/mongo/commit/ca69b62fe50e03922c96a75de509f3ad33fb4363

Comment by Githook User [ 15/May/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-53661 temporarily disable index_commit_currentop_slow.js
Branch: master
https://github.com/mongodb/mongo/commit/beb176da79f83da393da9416b3552d00f4ff50c9

Comment by Githook User [ 14/May/21 ]

Author:

{'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}

Message: SERVER-53661 SessionCatalog mutex is level 0 and is held while acquiring the FutureResolution mutex
Branch: master
https://github.com/mongodb/mongo/commit/4099baf59544e56922641fe10b5cc07d5a99e591

Generated at Thu Feb 08 05:31:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.