[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: |
|
||||
| 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: |