[SERVER-57038] Fix stack-use-after-scope of TransactionParticipant in write_ops_exec::performAtomicTimeseriesWrites Created: 18/May/21  Updated: 29/Oct/23  Resolved: 19/May/21

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

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

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.0
Sprint: Execution Team 2021-05-31
Participants:
Linked BF Score: 168

 Description   

We currently use a reference to a TransactionParticipant that is on the stack inside of a storage transaction rollback handler. However, due to C++ destruction ordering, when we leave the frame this variable goes out of scope before the WriteUnitOfWork whose destructor causes the handler to run.



 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 [ 20/May/21 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-57038 Fix stack-use-after-scope of TransactionParticipant in write_ops_exec::performAtomicTimeseriesWrites

(cherry picked from commit fdb2110862484c887faac3e03d53927fdc0ad216)
Branch: v5.0
https://github.com/mongodb/mongo/commit/497bb2a2968b4b0ba952609d4a443cbfc314230b

Comment by Githook User [ 19/May/21 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-57038 Fix stack-use-after-scope of TransactionParticipant in write_ops_exec::performAtomicTimeseriesWrites
Branch: master
https://github.com/mongodb/mongo/commit/fdb2110862484c887faac3e03d53927fdc0ad216

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