[SERVER-53993] Attach client strand before releasing the opCtx in AsyncCommandExecution tests Created: 22/Jan/21 Updated: 29/Oct/23 Resolved: 09/Feb/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 5.3.0, 5.2.1, 5.0.7 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Amirsaman Memaripour | Assignee: | Amirsaman Memaripour |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | servicearch-wfbf-day | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Requested: |
v5.2, v5.1, v5.0
|
||||||||||||||||
| Sprint: | Service Arch 2022-2-21 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 15 | ||||||||||||||||
| Story Points: | 3 | ||||||||||||||||
| Description |
|
The main thread in AsyncCommandExecution tests may attempt to release the opCtx owned by an instance of ExecutionContext (see here and here) while a worker thread is using the client strand to fulfill a promise. This would cause a data-race, as the thread that is releasing the opCtx does not have the client strand attached to it. We should reorganize the test so that the client strand is always attached to the thread that destroys the opCtx. |
| Comments |
| Comment by Githook User [ 11/Feb/22 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: (cherry picked from commit ce3f3d20ec70ee08b74dee8b3f698d1611495d63) |
| Comment by Githook User [ 11/Feb/22 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: (cherry picked from commit ce3f3d20ec70ee08b74dee8b3f698d1611495d63) |
| Comment by Githook User [ 09/Feb/22 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: |