[SERVER-85628] Ensure that the client is removed from _clientByOperationId map before destruction Created: 23/Jan/24  Updated: 25/Jan/24  Resolved: 25/Jan/24

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 8.0.0-rc0, 7.3.0-rc2

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

Issue Links:
Backports
Depends
Problem/Incident
is caused by SERVER-79871 Simplify OperationId Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.3
Sprint: Service Arch 2024-02-05
Participants:
Linked BF Score: 135

 Description   

See the writeup in BF-31478 for more details-- right now, we remove the client from the _clientByOperationId map in the destructor of the ClientState decoration. However, if somebody tries to access the client in the small window between client destruction and the destruction of the ClientState object, they will encounter a segfault.



 Comments   
Comment by Githook User [ 25/Jan/24 ]

Author:

{'name': 'Erin McNulty', 'email': 'erin.mcnulty@mongodb.com', 'username': 'erin2722'}

Message: SERVER-85628: Ensure that the client is removed from _clientByOperationId map before destruction (#18301)

(cherry picked from commit d2bf10e048dea8691b29cc7ecb4e52ab8fc46790)

GitOrigin-RevId: 053e0ce80d351bc198f439e7ab6692f721aacc7d
Branch: v7.3
https://github.com/mongodb/mongo/commit/7b7f3f53a0dbd6ed7fc0cfb11ee1d12823560f7a

Comment by Githook User [ 25/Jan/24 ]

Author:

{'name': 'Erin McNulty', 'email': 'erin.mcnulty@mongodb.com', 'username': 'erin2722'}

Message: SERVER-85628: Ensure that the client is removed from _clientByOperationId map before destruction (#18301)

GitOrigin-RevId: d2bf10e048dea8691b29cc7ecb4e52ab8fc46790
Branch: master
https://github.com/mongodb/mongo/commit/8bff8776fd77f3b5412238b4ede0c0a4580fe798

Generated at Thu Feb 08 06:58:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.