all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#58520: Persistent failure to DNS-lookup hostname
@ 2022-10-14 16:20 Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-10-14 16:55 ` Paul Eggert
  2023-09-05 17:06 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 2 replies; 15+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-10-14 16:20 UTC (permalink / raw)
  To: 58520; +Cc: Paul Eggert

Package: Emacs


[ I see that my original email was sent to emacs-devel, but I think
  bug-gnu-emacs is a better place for that.  ]

My Gnus session (a separate Emacs session I use specifically to run
Gnus) occasionally gets into a state where it insists that my mail
server's DNS name isn't found.  All(?) other processes on the machine
keep happily resolving hostname, so the problem is specific to
this process.

The problem just reappeared today and thanks to the help I got last time
I managed to diagnose it a bit better:

- Lars asked if it only affect IMAP: nope, it affects more than just
  IMAP.  Simple tests suggest it affects all DNS lookups performed by
  that Emacs process.
- Madhu suggested the problem was related to commit 93bf7d52841c60ff and
  might be linked to a lack of call to `res_init`.  For some stupid
  reason I wasn't able to add an ELisp primitive that lets me call
  `res_init` manually to verify this hypothesis, but I now figured what
  was my mistake, so I should be able to try `M-: (res-init) RET` next time
  to confirm that it works around the problem.
- Robert's suggestion to use `tcpdump` showed that the reason this Emacs
  process gets DNS lookup failures is simply that it queries the DNS
  server at 192.168.1.1 which is the server I was using yesterday (and
  to which I currently don't have access) rather than the one I'm using
  now.  IOW, it strongly suggests that the problem would be solved by
  calling `res_init`.

[Glibc bug 984](https://sourceware.org/bugzilla/show_bug.cgi?id=984)
seems relevant.  According to this, calling `res_init` should not be
necessary any more.  Indeed, if I start Emacs, use
`make-network-process`, then change `/etc/resolv.conf`, then call
`make-network-process` again, tcpdump shows clearly that the Emacs
session has noticed the change in `/etc/resolv.conf`.  I tried this same
test from a fresh new Gnus session, and that also works fine.

So it's still a mystery why my Gnus session sometimes gets into a state
where it apparently stops paying attention to changes in
`/etc/resolv.conf`.  The above bug 984 mentions that glibc's "auto
reload" of `/etc/resolv.conf` is prevented in case the application has
modified `_res` manually, but I can't see any place where we do that.
Could it be that some of the libraries we link with can sometimes
manually modify `_res`?


        Stefan






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

end of thread, other threads:[~2023-12-18 18:26 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-14 16:20 bug#58520: Persistent failure to DNS-lookup hostname Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-14 16:55 ` Paul Eggert
2022-10-14 17:17   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-05 17:06 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-03  7:57   ` Visuwesh
2023-11-03 16:38     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-03 18:46       ` Visuwesh
2023-11-03 21:54         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-04  2:31           ` Visuwesh
2023-12-11 11:54             ` Visuwesh
2023-12-17 23:27               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-18 17:30                 ` Eli Zaretskii
2023-12-18 17:41                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-18 17:55                     ` Eli Zaretskii
2023-12-18 18:26                       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.