Since #9229 we no longer can break out of a DNS lookup midway through, and have to wait for libc to time out. In most places we check for interrupt immediately before/after, so this is not a huge deal, except in the dnsseed lookup thread. In that thread, we loop over all dnsseeds and will have to wait for each to timeout. This appears to be the cause of the long wait in #10210.
Until upstream glibc fixes the issue (https://sourceware.org/bugzilla/show_bug.cgi?id=20874) with getaddrinfo_a or we move to libevent’s DNS lookup library, the best we can do is insert more agressive checks between lookups, which we do here.