[SERVER-76652] createRandomCursorExecutor holds the CSSLock while potentially executing a TrialStage Created: 28/Apr/23 Updated: 29/Oct/23 Resolved: 29/Apr/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.1.0-rc0, 7.0.0-rc1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jordi Serra Torrens | Assignee: | Jordi Serra Torrens |
| 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: |
v7.0
|
||||||||||||||||
| Sprint: | Sharding EMEA 2023-05-01 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 119 | ||||||||||||||||
| Description |
|
PipelineD::createRandomCursorExecutor takes a ScopedCollectionShardingState, which holds the CSS RESOURCE_MUTEX, and still holds it when it constructs the PlanExecutor. The PlanExecutor constructor may actually execute a TrialStage, during which it can yield/restore the locks. RESOURCE_MUTEXes are not yielded, so on restore a lock inversion can happen. |
| Comments |
| Comment by Githook User [ 02/May/23 ] |
|
Author: {'name': 'Jordi Serra Torrens', 'email': 'jordi.serra-torrens@mongodb.com', 'username': 'jordist'}Message: (cherry picked from commit 1ef91934ee3d8ae22b3b8b51d21a7182b83c13ac) |
| Comment by Githook User [ 28/Apr/23 ] |
|
Author: {'name': 'Jordi Serra Torrens', 'email': 'jordi.serra-torrens@mongodb.com', 'username': 'jordist'}Message: |