From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Persistent failure to lookup hostname Date: Mon, 03 Oct 2022 19:44:29 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33456"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 04 01:46:06 2022 Return-path: Envelope-to: ged-emacs-devel@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 1ofV8O-0008UN-52 for ged-emacs-devel@m.gmane-mx.org; Tue, 04 Oct 2022 01:46:04 +0200 Original-Received: from localhost ([::1]:55904 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ofV8M-0003EF-Eg for ged-emacs-devel@m.gmane-mx.org; Mon, 03 Oct 2022 19:46:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42596) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofV6z-0002Pz-58 for emacs-devel@gnu.org; Mon, 03 Oct 2022 19:44:37 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:58508) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofV6w-0002kV-EN for emacs-devel@gnu.org; Mon, 03 Oct 2022 19:44:36 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 3A2054421C5; Mon, 3 Oct 2022 19:44:32 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id AB8B04421A1; Mon, 3 Oct 2022 19:44:30 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1664840670; bh=LzyYmEdch3HpgL24A8ixQ+mrZQ9xe0gzkJqvQAxA+aU=; h=From:To:Subject:Date:From; b=ep2B93T5IVemq2vvAHUZ7ysUSjX8F+fhXvJcjT5Egqjvg1JCfPnv3oKWwaRBamhcQ z3Yc2MEI5kf7G/3CYRhmhjgXTDiKh4TrOsAQzomnd4+N/pMRkrxJ9fz4jX3tjaahqn 8dkSnzgqAR8KHAhgek8/b45TP6099yCcMz5hMBi7HHbDKaXtNJSyIpLamO5tY0X/EG mgWiGAGycAjL7NKezG8Ka+HN9yw9IZgcDhCS25p+ViCS2SMNmk4iQKbabiLdKJDxWY w/lqO+Qe2onPfP8c0LBqL2Hn+r+mfKn/vQ00zofVks9QvpQV3BjEZKA1Oq4qxM9jYo oKD0/OoldvNVQ== Original-Received: from alfajor (65-110-220-202.cpe.pppoe.ca [65.110.220.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 5FA48120BC6; Mon, 3 Oct 2022 19:44:30 -0400 (EDT) Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:296814 Archived-At: 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