[SERVER-70365] Fix data race in setting/getting the logical session ID Created: 07/Oct/22 Updated: 05/Dec/22 Resolved: 10/Oct/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Celina Tala | Assignee: | Backlog - Replication Team |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Assigned Teams: |
Replication
|
||||||||||||
| Operating System: | ALL | ||||||||||||
| Participants: | |||||||||||||
| Linked BF Score: | 11 | ||||||||||||
| Description |
|
The reading thread in kill_sessions_common.cpp does acquire the client lock to access the logical session id on opCtx, the writing thread in transaction_oplog_application does not. As a result, we may have a read after write data race while accessing the logical session id. A potential suggestion would be for the writing thread to also acquire the client lock before setting the logical session id. |
| Comments |
| Comment by Opal Hoyt [ 10/Oct/22 ] |
|
celina.tala@mongodb.com looks like this is a dupe of https://jira.mongodb.org/browse/SERVER-69152 that we assigned to Service Architecture |