[SERVER-59852] Data race in the BalancerCommandsScheduler destructor may cause an exception Created: 09/Sep/21  Updated: 29/Oct/23  Resolved: 13/Sep/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 5.1 Required
Fix Version/s: 5.1.0-rc0

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

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding EMEA 2021-09-20
Participants:
Linked BF Score: 68

 Description   

The destructor of the BalancerCommandsScheduler includes logic to end an internal thread, which is then detached.
This situation may lead to segmentation faults when the internal thread outlives the parent object and tries to access already deleted resources.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 13/Sep/21 ]

Author:

{'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}

Message: SERVER-59852 Fix BalancerCommandsScheduler start and stop
Branch: master
https://github.com/mongodb/mongo/commit/51286ec91d99ce2db6dd98867c00ba4f5f7157a3

Generated at Thu Feb 08 05:48:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.