[SERVER-40054] Destroying an AsyncWorkScheduler which has not been shut down can block forever Created: 08/Mar/19  Updated: 29/Oct/23  Resolved: 12/Mar/19

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 4.1.9

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:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2019-04-08
Participants:
Linked BF Score: 22

 Description   

The destructor of AsyncWorkScheduler waits for all the scheduled activity to complete. However, the condition variable indicating that is only signaled if shutdown has been called previously.

Because of this, if it so happens that at destruction time the last asynchronous activity of a successfully completed asynchronous work hadn't unregistered itself, the destructor can block forever, even though there are no active tasks.



 Comments   
Comment by Githook User [ 12/Mar/19 ]

Author:

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

Message: SERVER-40054 Always signal the AsyncWorkScheduler's `_allListsEmptyCV` condition variable
Branch: master
https://github.com/mongodb/mongo/commit/1f5420483a1a68a510d26a2bed0fd74e5dbfbbb0

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