[SERVER-76157] ClusterServerParameterRefresher can result in dangling internal transactions on the config server Created: 14/Apr/23  Updated: 29/Oct/23  Resolved: 27/Apr/23

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

Type: Bug Priority: Major - P3
Reporter: Cheahuychou Mao Assignee: Gabriel Marks
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Problem/Incident
Related
related to SERVER-75863 Investigate the timeout issue for rea... Closed
related to SERVER-76360 mongod should implicitly abort any in... Closed
Assigned Teams:
Server Security
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.0
Sprint: Security 2023-05-01
Participants:
Linked BF Score: 164

 Description   

The ClusterServerParameterRefresher has a periodic job that runs internal transactions on the config server. The job currently isn't explicitly stopped on shutdown so a new transaction can start after mongos implicitly aborts transactions as part shutting down. The new transaction can get interrupted on mongos later during shutdown and that results in an open transaction on the config server. This can occur in sharding tests since ShardingTest.stop() shuts down the mongoses before the config server. When it occurs, it would get stuck trying shut down the config server because freezing a node involves doing fsync which requires taking the global S lock which cannot occur because the the IX lock is being held by the dangling transaction and in tests we use the transaction lifetime limit of 24 hours. 



 Comments   
Comment by Githook User [ 27/Apr/23 ]

Author:

{'name': 'Gabriel Marks', 'email': 'gabriel.marks@mongodb.com', 'username': 'marksg07'}

Message: SERVER-76157 Fix issues w/ retryable_write_error_labels.js and onShutdown
Branch: master
https://github.com/mongodb/mongo/commit/378df09aaa8768d59b4c8116f4a1d9829ce7faec

Comment by Githook User [ 21/Apr/23 ]

Author:

{'name': 'Gabriel Marks', 'email': 'gabriel.marks@mongodb.com', 'username': 'marksg07'}

Message: SERVER-76157 Shut down ClusterServerParameterRefresher correctly
Branch: master
https://github.com/mongodb/mongo/commit/9f18972310c713ea0adb8ec02510406670eb2a56

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