[SERVER-71167] txn_index_catalog_changes.js session garbage collection can deadlock with fsync lock in consistency checks Created: 08/Nov/22  Updated: 29/Oct/23  Resolved: 08/Nov/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.1.1, 6.0.4, 6.2.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:
v6.1, v6.0
Sprint: Execution Team 2022-11-14
Participants:
Linked BF Score: 19

 Description   

txn_index_catalog_changes.js has a session object that goes out of scope before consistency checks are performed. When performing these consistency checks, we do an fsync lock. When the session object is garbage collected, it will try to run abortTransaction. If this occurs while the server is fsync locked, we can get stuck because the abortTransaction must wait for current optime to be majority committed before responding with NoSuchTransaction.



 Comments   
Comment by Githook User [ 15/Nov/22 ]

Author:

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

Message: SERVER-71167 Abort transactions in `txn_index_catalog_changes.js`

(cherry picked from commit 35c314ab1a215dc79fcec0a0874803086e220f88)
Branch: v6.0
https://github.com/mongodb/mongo/commit/53df6dcf7350177ab3b982492c7334f741fb3ba0

Comment by Githook User [ 15/Nov/22 ]

Author:

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

Message: SERVER-71167 Abort transactions in `txn_index_catalog_changes.js`

(cherry picked from commit 35c314ab1a215dc79fcec0a0874803086e220f88)
Branch: v6.1
https://github.com/mongodb/mongo/commit/340a08e400b8c72d0818986b01a316fd19a1b66e

Comment by Githook User [ 08/Nov/22 ]

Author:

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

Message: SERVER-71167 Abort transactions in `txn_index_catalog_changes.js`
Branch: master
https://github.com/mongodb/mongo/commit/35c314ab1a215dc79fcec0a0874803086e220f88

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