emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Persistent failure to lookup hostname


From: Stefan Monnier
Subject: Persistent failure to lookup hostname
Date: Mon, 03 Oct 2022 19:44:29 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]