[SERVER-73350] SessionKiller should release mutex before creating opctx Created: 26/Jan/23  Updated: 29/Oct/23  Resolved: 06/Feb/23

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

Type: Bug Priority: Major - P3
Reporter: Matthew Russotto Assignee: Matthew Russotto
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: Repl 2023-02-06, Repl 2023-02-20
Participants:
Linked BF Score: 110

 Description   

The SessionKiller runs in a loop and re-creates an operation context each loop. Since it does this under its internal mutex, and in other calls an operation context is accepted and then the internal mutex is taken, this can result in a deadlock involving the operation context creation spinlock.

We can simply release the mutex while creating the operation context (ensuring we check _shutdown after obtaining the mutex)



 Comments   
Comment by Githook User [ 06/Feb/23 ]

Author:

{'name': 'Matthew Russotto', 'email': 'matthew.russotto@mongodb.com', 'username': 'mtrussotto'}

Message: SERVER-73350 SessionKiller should release mutex before creating opctx
Branch: master
https://github.com/mongodb/mongo/commit/9c65140283c3f72330a94e58bd9ac2c5bd090ced

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