unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Persistent failure to lookup hostname
@ 2022-10-03 23:44 Stefan Monnier
  2022-10-03 23:58 ` Lars Ingebrigtsen
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Stefan Monnier @ 2022-10-03 23:44 UTC (permalink / raw)
  To: emacs-devel

Hi,

My Gnus session occasionally gets into a state where it insists that my
mail server's DNS name isn't found.  I haven't yet managed to get close
to the source of the problem, in large part because I don't know how to
reproduce it.  It seems to be associated with network failures (or
captive portals, which are basically purposefully broken networks).

That a DNS lookup would fail while the network is having problem is of
course normal, but the problem is that the failure seems to persist "for
ever", or more specifically until I restart Emacs.  E.g. the old Gnus
sessions will keep giving me a hostname error while at the very same
time all other processes on the system (Firefox, `host`, a fresh new
Emacs, you name it) have no problem finding the IP address of (and even
connecting to) the very same host.

The last two times this occurred I tried to look a bit more into it, but
I realized that I don't know enough about how this works to know where
to look.

The error itself is signaled by `make-network-process` and I suspect the
error is actually raised by the following piece of code (tho I couldn't
confirm it because I somehow ended up killing the process while trying to
attach GDB to it):

      msg = network_lookup_address_info_1 (host, portstring, &hints, &res);
      if (!EQ (msg, Qt))
	error ("%s", SSDATA (msg));

Looking at `network_lookup_address_info_1` it seems it doesn't do much
more than call `getaddrinfo` (I couldn't copy&paste the actual error
message but it basically contains my host name plus some error message
in French, which seems consistent with an error message taken straight
from `gai_strerror`).

Does anyone here have an idea why `getaddrinfo` might return an outdated
error, or whether it could come from elsewhere?  Or how/where I might
find a kind of DNS cache that would be process-local rather
than systemwide?

Or any other hint?


        Stefan




^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2022-10-14 15:53 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-03 23:44 Persistent failure to lookup hostname Stefan Monnier
2022-10-03 23:58 ` Lars Ingebrigtsen
2022-10-04  0:15   ` Stefan Monnier
2022-10-04  7:37     ` Robert Pluim
2022-10-04  8:05       ` tomas
2022-10-04  9:30         ` Robert Pluim
2022-10-04  9:40           ` tomas
2022-10-04 13:27       ` Stefan Monnier
2022-10-04 14:41         ` Robert Pluim
2022-10-04 15:07           ` Stefan Monnier
2022-10-04  3:40 ` Madhu
2022-10-04 13:20   ` Stefan Monnier
2022-10-06 19:56     ` Stefan Monnier
2022-10-14 15:53       ` Stefan Monnier
2022-10-04  6:51 ` Eli Zaretskii
2022-10-04 13:24   ` Stefan Monnier
2022-10-04 13:53     ` Eli Zaretskii
2022-10-04 14:00       ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).