[SERVER-80978] Fix potential deadlock between TTLMonitor::onStepUp and prepared transaction Created: 12/Sep/23 Updated: 24/Jan/24 Resolved: 09/Jan/24 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.3.0-rc0, 7.0.6, 5.0.25, 6.0.14 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Dan Larkin-York | Assignee: | Daotang Yang |
| 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, v6.0, v5.0
|
||||||||||||||||||||
| Sprint: | Execution NAMR Team 2023-09-18, Execution Team 2023-12-11, Execution Team 2023-12-25, Execution Team 2024-01-08, Execution Team 2024-01-22 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Linked BF Score: | 3 | ||||||||||||||||||||
| Description |
|
The mechanism introduced in A prepared transaction which has a write to a collection "foo" will reacquire an IX lock on "foo" prior to running the index onStepUp method, where the TTLMonitor will attempt to acquire an X lock on a collection "foo" if it decides it needs to normalize its index spec. We cannot safely reverse the order of the operations. As of this time we have not observed this deadlock in practice in any released builds, so we believe it to be extremely rare, and will be addressing it out of an abundance of caution. |
| Comments |
| Comment by Githook User [ 24/Jan/24 ] |
|
Author: {'name': 'mongodt', 'email': '146988481+mongodt@users.noreply.github.com', 'username': 'mongodt'}Message: (cherry picked from commit 662c63e868af3fe388ad4d81b14c479b2f5be7f9) GitOrigin-RevId: 4b5d21e1ada5db5ac9eb662707a98cc4df17ecad |
| Comment by Githook User [ 18/Jan/24 ] |
|
Author: {'name': 'mongodt', 'email': '146988481+mongodt@users.noreply.github.com', 'username': 'mongodt'}Message: (cherry picked from commit 662c63e868af3fe388ad4d81b14c479b2f5be7f9) GitOrigin-RevId: 7a2d8a34790a82eafc406047efe0985fe0064e44 |
| Comment by Githook User [ 17/Jan/24 ] |
|
Author: {'name': 'mongodt', 'email': '146988481+mongodt@users.noreply.github.com', 'username': 'mongodt'}Message: (cherry picked from commit 662c63e868af3fe388ad4d81b14c479b2f5be7f9) GitOrigin-RevId: 3f108e717fbe7d00caeb67993f695efbf3f95093 |
| Comment by Githook User [ 09/Jan/24 ] |
|
Author: {'name': 'mongodt', 'email': '146988481+mongodt@users.noreply.github.com', 'username': 'mongodt'}Message: GitOrigin-RevId: 662c63e868af3fe388ad4d81b14c479b2f5be7f9 |