[SERVER-56560] Avoid thread scheduling deadlock in create collection coordinator Created: 02/May/21  Updated: 29/Oct/23  Resolved: 03/May/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: Backlog
Fix Version/s: 5.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Tommaso Tocci Assignee: Tommaso Tocci
Resolution: Fixed Votes: 0
Labels: PM-1965-Milestone-1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-56555 Enable drop_collection_sharded.js FSM... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

Increase the number of concurrent threads in drop_collection_sharded.js FSM workload in such a way to ensure that there will be at least 6 concurrent create collection coordinators running at the same time.

Sprint: Sharding EMEA 2021-05-03
Participants:

 Description   

The create collection coordinator is executed on the ShardingDDLCoordinator service thread pool that is capped to max 6 concurrent threads.

The problem is that this coordinator schedule a task on this threadpool and wait synchronously for its completion without releasing its current thread. If the threadpool doesn't have any available thread to execute the task the coordinator will hang forever.



 Comments   
Comment by Githook User [ 10/May/21 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: SERVER-56495 Remove TODO already addressed by SERVER-56560
Branch: master
https://github.com/mongodb/mongo/commit/691aa844de3827a0aae0978feb34a6e7c5298ad5

Comment by Githook User [ 03/May/21 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-56560 Avoid thread scheduling deadlock in create collection coordinator
Branch: master
https://github.com/mongodb/mongo/commit/85dad3bf26622966b7c144751e14d0d6983bc75d

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