[SERVER-84738] Fix Data Race in ReshardingCollectionCloner Created: 10/Jan/24  Updated: 16/Jan/24  Resolved: 11/Jan/24

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 7.1.0, 7.3.0-rc0, 7.2.0
Fix Version/s: 7.2.1, 7.3.0-rc0

Type: Bug Priority: Major - P3
Reporter: Brett Nawrocki Assignee: Brett Nawrocki
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-77636 Create cursors and handle resuming fo... Closed
Assigned Teams:
Cluster Scalability
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.2
Sprint: Cluster Scalability 2024-1-22
Participants:
Linked BF Score: 135

 Description   

Similar to SERVER-82324, the thread in kill_sessions_common.cpp acquires the client lock and reads the logical session id on opCtx, while the thread in resharding_collection_cloner.cpp sets a new logical session id without the client lock.

See this comment for full context.

It didn't reproduce locally or in a patch, but it seems like we are pretty confident in the problem and solution based on the stack trace and similar issues in the past.



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

Author:

{'name': 'Brett Nawrocki', 'email': 'brett.nawrocki@mongodb.com', 'username': 'brettnawrocki'}

Message: SERVER-84738 Fix Data Race in ReshardingCollectionCloner

(cherry picked from commit 3c0ca3e82de5364d031d1bdd9b9c52be0e1f3743)
Branch: v7.2
https://github.com/mongodb/mongo/commit/021318eaa1e58eee965c29315e1d569d702feadd

Comment by Githook User [ 11/Jan/24 ]

Author:

{'name': 'Brett Nawrocki', 'email': 'brett.nawrocki@mongodb.com', 'username': 'brettnawrocki'}

Message: SERVER-84738 Fix Data Race in ReshardingCollectionCloner

GitOrigin-RevId: 3c0ca3e82de5364d031d1bdd9b9c52be0e1f3743
Branch: master
https://github.com/mongodb/mongo/commit/b399b9c296a7fb27769ebcce6306424451b41544

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