[SERVER-84468] Fix deadlock when running runTransactionOnShardingCatalog() Created: 02/Jan/24 Updated: 03/Jan/24 Resolved: 03/Jan/24 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 7.0.0, 7.3.0-rc0, 7.2.0 |
| Fix Version/s: | 7.2.1, 7.3.0-rc0, 7.0.6 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Silvia Surroca | Assignee: | Silvia Surroca |
| 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.2, v7.0
|
||||||||||||||||
| Sprint: | CAR Team 2024-01-08 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 26 | ||||||||||||||||
| Description |
|
The function runTransactionOnShardingCatalog() is called when a config server operation needs to execute an internal transaction. This function creates a new OperationContext under an AlternativeClientServer that is set as interruptible a few lines below its creation. If the OperationContext got killed by the stepdown thread right before setting it as interruptible, we would end up in a deadlock. This is the event sequence for a deadlock:
|
| Comments |
| Comment by Githook User [ 03/Jan/24 ] |
|
Author: {'name': 'Silvia Surroca', 'email': 'silvia.surroca@mongodb.com', 'username': 'silviasuhu'}Message: (cherry picked from commit 30410c6458fc965ae1277e78a2313e59a4e5d24f) GitOrigin-RevId: c5231702cf05da78b094eb351d9e2dff95538113 |
| Comment by Githook User [ 03/Jan/24 ] |
|
Author: {'name': 'Silvia Surroca', 'email': 'silvia.surroca@mongodb.com', 'username': 'silviasuhu'}Message: (cherry picked from commit 30410c6458fc965ae1277e78a2313e59a4e5d24f) |
| Comment by Githook User [ 02/Jan/24 ] |
|
Author: {'name': 'Silvia Surroca', 'email': 'silvia.surroca@mongodb.com', 'username': 'silviasuhu'}Message: GitOrigin-RevId: 30410c6458fc965ae1277e78a2313e59a4e5d24f |