[SERVER-46106] Keep read-modify accesses to NetworkInterfaceMock::_alarms in one CS Created: 12/Feb/20  Updated: 29/Oct/23  Resolved: 12/Feb/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.3.4

Type: Bug Priority: Major - P3
Reporter: Amirsaman Memaripour Assignee: Amirsaman Memaripour
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

Due to the nature of the bug, it's very hard to reproduce it. An example could be found here: #BF-15258

Sprint: Service Arch 2020-02-24
Participants:
Linked BF Score: 0

 Description   

Both getting the top of `_alarms` and removing it must be in the same critical-section to avoid potential data races.

https://github.com/mongodb/mongo/blob/7eda962b63ab11427889b13dc3fbbe6df0fd02fb/src/mongo/executor/network_interface_mock.cpp#L593-L605



 Comments   
Comment by Githook User [ 12/Feb/20 ]

Author:

{'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@10gen.com'}

Message: SERVER-46106 Keep read-modify accesses to NetworkInterfaceMock::_alarms in one CS
Branch: master
https://github.com/mongodb/mongo/commit/e65f85577a2d4fa0b8aa428dc141a68977983479

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