GNU bug report logs - #58520
Persistent failure to DNS-lookup hostname

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Fri, 14 Oct 2022 16:22:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 58520 <at> debbugs.gnu.org, eggert <at> cs.ucla.edu, visuweshm <at> gmail.com
Subject: bug#58520: Persistent failure to DNS-lookup hostname
Date: Mon, 18 Dec 2023 13:26:59 -0500
>> IOW, `res_init` only affects the running program.
> I didn't know that, sorry.  (I didn't know DNS can affect a single
> program.)

Basically, when the libc library parses the `/etc/resolv.conf` file to
figure out the IP address of the DNS server, it stores the result in
a local variable so as to speed up later DNS requests.
`res_init` forces it to reset that var.

It used to be indispensable to call it "all the time", but nowadays
glibc normally detects on its own when it needs to re-read
`/etc/resolv.conf`.

Except that in some weird corner case that Visuwesh and I are bumping
into, the "normally" fails to apply.  It's presumably a bug somewhere in
libc or in Emacs (or in some other library we use).

> If we want something like that in Emacs, we should probably find a
> more portable way of doing it.

I only used it to confirm the diagnostic, as well as as a crutch to
workaround the problem until it gets fixed.  So far I have not
considered including it in Emacs proper.


        Stefan





This bug report was last modified 1 year and 181 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.