[SERVER-34586] Possible double mutex acquisition in ShardServerCatalogCacheLoader Created: 20/Apr/18  Updated: 29/Oct/23  Resolved: 20/Apr/18

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.6.4, 3.7.5
Fix Version/s: 3.6.5, 3.7.6

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

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.6
Sprint: Sharding 2018-04-23, Sharding 2018-05-07
Participants:

 Description   

With the mutex already acquired during collection metadata refresh here, if scheduling the worker thread fails for any reason (most likely only on shutdown), the mutex will be recursively acquired, which is not allowed.

Same problem exists for the database refresh logic here.



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

Author:

{'email': 'kaloian.manassiev@mongodb.com', 'username': 'kaloianm', 'name': 'Kaloian Manassiev'}

Message: SERVER-34586 Avoid possible double mutex acquisition in ShardServerCatalogCacheLoader

(cherry picked from commit 7b1ac75a303433b18377493a8378fecad8446d59)
Branch: v3.6
https://github.com/mongodb/mongo/commit/40eb78612eaadd35d30d80990fbe3783a8216e33

Comment by Githook User [ 20/Apr/18 ]

Author:

{'email': 'kaloian.manassiev@mongodb.com', 'username': 'kaloianm', 'name': 'Kaloian Manassiev'}

Message: SERVER-34586 Avoid possible double mutex acquisition in ShardServerCatalogCacheLoader
Branch: master
https://github.com/mongodb/mongo/commit/7b1ac75a303433b18377493a8378fecad8446d59

Generated at Thu Feb 08 04:37:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.