[SERVER-61804] Fix race in ConfirmSocketSetOptionOnResetConnections in transport_layer_asio_test.cpp Created: 30/Nov/21 Updated: 29/Oct/23 Resolved: 13/Dec/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.3.0-rc0, 5.0.7, 5.2.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Tyler Seip (Inactive) | Assignee: | Backlog - Service Architecture |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | bkp | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Service Arch
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v5.2, v5.0
|
||||||||
| Sprint: | Service Arch 2021-12-13, Service Arch 2022-1-10 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 34 | ||||||||
| Description |
|
ConfirmSocketSetOptionOnResetConnections may have a race in it wherein an ASIO socket's connect() call may not return by the time the ASIO acceptor on the server end returns from accept(). In ConfirmSocketSetOptionOnResetConnections, this allows the server side to close the connection before connect() finishes, which causes connect() to fail and throw, failing the test. Add a synchronization mechanism to ensure that the onAccept() callback associated with the acceptor doesn't run until connect() has fully completed. |
| Comments |
| Comment by Githook User [ 22/Mar/22 ] |
|
Author: {'name': 'Tyler Seip', 'email': 'Tyler.Seip@mongodb.com', 'username': 'tseip-mongo'}Message: (cherry picked from commit 0455be535f6d8149e86b828d9d75edb185c042e2) |
| Comment by Githook User [ 23/Feb/22 ] |
|
Author: {'name': 'Tyler Seip', 'email': 'Tyler.Seip@mongodb.com', 'username': 'tseip-mongo'}Message: (cherry picked from commit 0455be535f6d8149e86b828d9d75edb185c042e2) |
| Comment by Githook User [ 10/Dec/21 ] |
|
Author: {'name': 'Tyler Seip', 'email': 'Tyler.Seip@mongodb.com', 'username': 'tseip-mongo'}Message: |