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

From: Dmitry Alexandrov <[email-masked]>
Date: Fri, 15 May 2020 16:05:01 +0300

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

	…
	openat(AT_FDCWD, "/etc/hosts", O_RDONLY|O_CLOEXEC) = 12
	lseek(12, 0, SEEK_CUR)                  = 0
	fstat(12, {st_mode=S_IFREG|0644, st_size=184, ...}) = 0
	read(12, "127.0.0.1\tlocalhost\n127.0.1.1\tno"..., 4096) = 184
	lseek(12, 0, SEEK_CUR)                  = 184
	read(12, "", 4096)                      = 0
	close(12)                               = 0
	socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 12
	connect(12, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.1.1")}, 16) = 0
	gettimeofday({tv_sec=1589546464, tv_usec=72520}, NULL) = 0
	poll([{fd=12, events=POLLOUT}], 1, 0)   = 1 ([{fd=12, revents=POLLOUT}])
	sendto(12, "`\t\1\0\0\1\0\0\0\0\0\0\3gnu\3org\0\0\1\0\1", 25, MSG_NOSIGNAL, NULL, 0) = 25
	…

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:

	…
	stat("/etc/resolv.conf", {st_mode=S_IFREG|0644, st_size=56, ...}) = 0
	openat(AT_FDCWD, "/etc/hosts", O_RDONLY|O_CLOEXEC) = 11
	lseek(11, 0, SEEK_CUR)                  = 0
	fstat(11, {st_mode=S_IFREG|0644, st_size=184, ...}) = 0
	read(11, "127.0.0.1\tlocalhost\n127.0.1.1\tno"..., 4096) = 184
	lseek(11, 0, SEEK_CUR)                  = 184
	read(11, "", 4096)                      = 0
	close(11)                               = 0
	socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 11
	connect(11, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.43.223")}, 16) = 0
	gettimeofday({tv_sec=1589546877, tv_usec=860209}, NULL) = 0
	poll([{fd=11, events=POLLOUT}], 1, 0)   = 1 ([{fd=11, revents=POLLOUT}])
	sendmmsg(11, [{msg_hdr={msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\314\255\1\0\0\1\0\0\0\0\0\0\3gnu\3org\0\0\1\0\1", iov_len=25}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, msg_len=25}, {msg_hdr={msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\10\270\1\0\0\1\0\0\0\0\0\0\3gnu\3org\0\0\34\0\1", iov_len=25}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, msg_len=25}], 2, MSG_NOSIGNAL) = 2
	…

How should I interpret this?