[SERVER-82324] Fix data race when reading/writing the logical session id Created: 19/Oct/23 Updated: 30/Oct/23 Resolved: 23/Oct/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.1.1, 7.2.0-rc0, 7.0.4 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Pol Pinol | Assignee: | Pol Pinol |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v7.1, v7.0
|
||||||||
| Sprint: | Sharding EMEA 2023-10-30 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 119 | ||||||||
| Description |
|
The thread in kill_sessions_common.cpp acquires the client lock and reads the logical session id on opCtx, while the thread in sharding_ddl_util.cpp sets a new logical session id without the client lock. Consequently, we could end up with a data race at the logical session id from the opCtx. A possible solution could be to protect this write with the client lock. |
| Comments |
| Comment by Githook User [ 30/Oct/23 ] |
|
Author: {'name': 'Pol Pinol Castuera', 'email': 'pol.pinol@mongodb.com', 'username': 'PolPinol'}Message: (cherry picked from commit 2911056b7f0e849fc1f5ba7e816744bb54654398) |
| Comment by Githook User [ 24/Oct/23 ] |
|
Author: {'name': 'Pol Pinol Castuera', 'email': 'pol.pinol@mongodb.com', 'username': 'PolPinol'}Message: (cherry picked from commit 2911056b7f0e849fc1f5ba7e816744bb54654398) |
| Comment by Githook User [ 23/Oct/23 ] |
|
Author: {'name': 'Pol Pinol Castuera', 'email': 'pol.pinol@mongodb.com', 'username': 'PolPinol'}Message: |