[SERVER-62571] Serialize concurrent accesses to `Socket` in `ThrowOnNetworkErrorInEnsureSync` Created: 12/Jan/22  Updated: 20/Nov/23  Resolved: 13/Jan/22

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 5.3.0, 5.2.2

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:
Backports
Depends
Related
is related to SERVER-61107 Serialize concurrent accesses to `Soc... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.2, v5.0
Sprint: Service Arch 2022-1-24
Participants:
Linked BF Score: 69
Story Points: 1

 Description   

The main thread attempts to close the socket (here), while the connection thread is running setsockopt on the socket (here). We need to serialize accesses to the socket object to fix the data-race.

This is almost identical to the issue reported in SERVER-61107 and the same fix may apply here.



 Comments   
Comment by Githook User [ 01/Mar/22 ]

Author:

{'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}

Message: SERVER-62571 Serialize concurrent accesses to `Socket` in `ThrowOnNetworkErrorInEnsureSync`

(cherry picked from commit 1b71c67c9290af3db02d75471eeba894862e1a31)
Branch: v5.2
https://github.com/mongodb/mongo/commit/4e292434c65b4e4a23a502b35c8101a4c3cb5c20

Comment by Githook User [ 13/Jan/22 ]

Author:

{'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}

Message: SERVER-62571 Serialize concurrent accesses to `Socket` in `ThrowOnNetworkErrorInEnsureSync`
Branch: master
https://github.com/mongodb/mongo/commit/1b71c67c9290af3db02d75471eeba894862e1a31

Generated at Thu Feb 08 05:55:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.