[SERVER-84241] AsioTransportLayer::stopAcceptingSessions can deadlock if called before listener thread started listening Created: 15/Dec/23 Updated: 18/Jan/24 Resolved: 20/Dec/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.2.1, 7.3.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Patrick Freed | Assignee: | Patrick Freed |
| 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
|
||||||||
| Sprint: | Service Arch 2023-12-25 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 105 | ||||||||
| Description |
|
In the event that stopAcceptingSessions is invoked after the asio listener thread has started but before it has actually begun listening, stopAcceptingSessions will block forever while trying to join the listener thread. This is because the listener thread's state only transitions to kShuttingDown if its prior state was kActive, not also kNew. This situation is pretty rare. An example trigger would be killing a new mongos/d process very quickly after starting it up. |
| Comments |
| Comment by Githook User [ 18/Jan/24 ] |
|
Author: {'name': 'Patrick Freed', 'email': 'patrick.freed@mongodb.com', 'username': 'patrickfreed'}Message: |
| Comment by Githook User [ 20/Dec/23 ] |
|
Author: {'name': 'Patrick Freed', 'email': 'patrick.freed@mongodb.com', 'username': 'patrickfreed'}Message: GitOrigin-RevId: c726e01e0c5759f1cfbe311102548538330d26e2 |