[SERVER-48687] ReplicationCoordinatorMock is not thread safe and causes errors with tsan Created: 10/Jun/20 Updated: 29/Oct/23 Resolved: 18/Jun/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Marcos José Grillo Ramirez | Assignee: | Marcos José Grillo Ramirez |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | thread-sanitizer | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Sprint: | Sharding 2020-06-15, Sharding 2020-06-29 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 0 | ||||||||
| Description |
|
tsan is a data race detection tool that detects write/read races. When running db_s_collection_sharding_runtime_test binary, the ReplicationCoordinatorMock class reads and writes _myLastAppliedOpTime and _myLastAppliedWallTime without any synchronization mechanism, which causes this race. |
| Comments |
| Comment by Githook User [ 18/Jun/20 ] |
|
Author: {'name': 'Marcos José Grillo Ramírez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}Message: |
| Comment by Andrew Morrow (Inactive) [ 11/Jun/20 ] |
|
There are multiple TSAN unit tests that are failing because of this. Fixing it would move us much closer to a green unit test run with TSAN. |