[SERVER-64411] ShardSplitDonorService heap-use-after-free detected Created: 10/Mar/22  Updated: 29/Oct/23  Resolved: 10/Mar/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Mathis Bessa Assignee: Mathis Bessa
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
Steps To Reproduce:

run asan build.

Sprint: Server Serverless 2022-03-21
Participants:
Linked BF Score: 171

 Description   

Added in SERVER-63090, when calling _cleanRecipientStateDoc we need to anchor the service to make sure it is not gone by the time we get out of scope when running on the asyncTry. This is due to the fact that the OpObserver will see that the state document gets deleted and will no longer run the service.
The solution is to add an anchor since it is missing.



 Comments   
Comment by Githook User [ 10/Mar/22 ]

Author:

{'name': 'mathisbessamdb', 'email': 'mathis.bessa@mongodb.com', 'username': 'mathisbessamdb'}

Message: SERVER-64411 Fixing head use after free by anchoring the local instance so it doesn't reach end of life prior to the task finishing
Branch: master
https://github.com/mongodb/mongo/commit/2cf358532bdfcd601aa70e5d541072e96806fa9a

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