Open tchaikov opened 6 months ago
It's worth noting that among the deprecated functions there is ares_fds
, which may crash the system (cf. https://c-ares.org/ares_fds.html#NOTES):
The select(2) call which takes the fd_set parameter has significant limitations which can impact modern systems. The limitations can vary from system to system, but in general if the file descriptor value itself is greater than 1024 (not the count but the actual value), this can lead to ares_fds writing out of bounds which will cause a system crash. In modern networking clients, it is not unusual to have file descriptor values above 1024, especially when a library is pulled in as a dependency into a larger project.
c-ares does not attempt to detect this condition to prevent crashes due to both implementation-defined behavior in the OS as well as integrator-controllable tunables which may impact the limits.
@tchaikov why does https://github.com/scylladb/seastar/commit/47bfd73e304fd02ed91d7edf6c60d720e767eac5 only Ref this issue rather than Fixes
it?
@bhalevy see the commit message of 47bfd73e304fd02ed91d7edf6c60d720e767eac5
in which, ares_fds() and ares_process() are not changed yet, because we need to change the way how to poll the events for name resolution. this would need more thoughts before moving forward.
these two APIs were deprecated. but we have not replaced them yet.
c-ares v1.28.1 deprecated a bunch of functions. for instance,
ares_gethostbyname()
is deprecated in favor ofares_getaddrinfo()