From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#58520: Persistent failure to DNS-lookup hostname Date: Mon, 18 Dec 2023 13:26:59 -0500 Message-ID: References: <875y2j9sm6.fsf@gmail.com> <87r0l6fzdv.fsf@gmail.com> <87edh6fdvo.fsf@gmail.com> <87fs09uf7z.fsf@gmail.com> <83v88vifju.fsf@gnu.org> <83r0jjiedz.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25613"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 58520@debbugs.gnu.org, eggert@cs.ucla.edu, visuweshm@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 18 19:28:14 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rFILd-0006Ph-Vz for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 18 Dec 2023 19:28:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rFILR-0008Jb-HX; Mon, 18 Dec 2023 13:28:01 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rFILP-0008JB-Uf for bug-gnu-emacs@gnu.org; Mon, 18 Dec 2023 13:27:59 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rFILP-00048b-Lq for bug-gnu-emacs@gnu.org; Mon, 18 Dec 2023 13:27:59 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rFILR-0004vs-Lt for bug-gnu-emacs@gnu.org; Mon, 18 Dec 2023 13:28:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Dec 2023 18:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58520 X-GNU-PR-Package: emacs Original-Received: via spool by 58520-submit@debbugs.gnu.org id=B58520.170292403318836 (code B ref 58520); Mon, 18 Dec 2023 18:28:01 +0000 Original-Received: (at 58520) by debbugs.gnu.org; 18 Dec 2023 18:27:13 +0000 Original-Received: from localhost ([127.0.0.1]:33577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFIKe-0004tk-Pi for submit@debbugs.gnu.org; Mon, 18 Dec 2023 13:27:13 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:27092) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFIKb-0004tJ-20 for 58520@debbugs.gnu.org; Mon, 18 Dec 2023 13:27:11 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 40C11444E42; Mon, 18 Dec 2023 13:27:01 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1702924020; bh=BWHlzyXB60I+zmlO5RbMxcZPMDhRedSe3vgY7UkAcqY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Mn1scBMKO1estoZFjIJD+X3UhwDKGIxk347JBy81f3SZmoiqH/dVjZaArazHaOCCJ QVNZb4QC3n4YgslbK2DVRrqeferuOtYv03FNLb5WCTS4XiElppQNfUm7p7APbfdsIA 5LndFdJz7jj3WwTz3LJgrxymbrY5YsvmLnoCnv3zmd/DTt2F/6aFpV7oFF0DoR1fi6 DsyuoueQSHg3W4xNg8g8eyMe85ptmHa7vS677yqAw7o35Tu+kWJuR6MvFIys3E9UQ4 9g0NpeVjbf3jSN4+nRmN0WgoUiE/LDMamww6d2IQiDaORnAWySB6r6pg9L82wqo+49 FGWlZSn0lqeEw== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 0442A444E39; Mon, 18 Dec 2023 13:27:00 -0500 (EST) Original-Received: from pastel (65-110-221-238.cpe.pppoe.ca [65.110.221.238]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C8969120DC3; Mon, 18 Dec 2023 13:26:59 -0500 (EST) In-Reply-To: <83r0jjiedz.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 18 Dec 2023 19:55:52 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:276475 Archived-At: >> 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