[SERVER-64876] Cancel any ASIO asynchronous resolution as part of a TransportLayerASIO shutdown Created: 24/Mar/22  Updated: 06/Dec/22

Status: Open
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Daniel Morilha (Inactive) Assignee: Backlog - Service Architecture
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Assigned Teams:
Service Arch
Operating System: ALL
Participants:
Linked BF Score: 11

 Description   

BF-24699 reports a leak occurring in ASIO's async_resolver internals after the server shutdown. The library offers an API to explicitly cancel any ongoing asynchronous resolution, which should get called during a shutdown to prevent any resource leak.

A different approach would be to avoid async_resolver altogether as it relies on spawning a separate thread and calling the blocking getnameinfo.

In general, name resolution network optimizations should be seen as an OS concern and should be left out of most user space processes.

AC: add code which interrupts any ongoing future / async_resolution upon service termination or block termination until resolution is finished.



 Comments   
Comment by Daniel Morilha (Inactive) [ 05/Apr/22 ]

Asked the library creator for guidance https://github.com/chriskohlhoff/asio/issues/1033

Comment by Daniel Morilha (Inactive) [ 24/Mar/22 ]

bringing to the sprint

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