Subject: Re: bug#41234: 27.0.91; Synchronous network requests are failing with “Name or service not known”

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 20 Jul 2020 12:53:12 +0200

Dmitry Alexandrov <[email-masked]> writes:

> 	(make-network-process :name " *net-test*"
> 						  :buffer (get-buffer-create " *net-test*")
> 						  :host "gnu.org" :service 80
> 						  :nowait nil)
> 	;; Debugger entered--Lisp error: (error "gnu.org/80 Name or service not known")
>
> More specifically, a call to getaddrinfo() in ‘network_lookup_address_info_1’ returns EAI_NONAME.
>
> Could it be a problem in GNU Emacs, or have I broken my system somehow?

Dmitry Alexandrov <[email-masked]> writes:

> FWIW, strace suggests, that the problematic Emacs process is trying to
> connect to an outdated nameserver (from a LAN this machine was
> connected once):

[...]

> That is, that /etc/resolv.conf had not been reread (there is nothing
> about it in the skipped output above), while the instance that is
> working fine do check whether /etc/resolv.conf is updated:

Hm...   since the async lookups work, I guess this means that
getaddrinfo_a works, but getaddrinfo doesn't?  Which is very odd -- both
functions are supposed to update the name server etc in the same way, I
think?

So I'm not sure how this can be an Emacs bug -- as far as I know,
there's no way for libc clients to say "update all the DNS stuff now";
it's supposed to happen automatically when you call getaddrinfo.  (If
I'm wrong, somebody please correct me.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no