GNU bug report logs - #40748
28.0.50; Switching wifi networks hangs dns lookups

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Eric Abrahamsen <eric@HIDDEN>; merged with #41234; dated Tue, 21 Apr 2020 17:12:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 40748 <at> debbugs.gnu.org:


Received: (at 40748) by debbugs.gnu.org; 14 Jun 2021 14:02:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 14 10:02:17 2021
Received: from localhost ([127.0.0.1]:47280 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lsnAP-0003Bg-Es
	for submit <at> debbugs.gnu.org; Mon, 14 Jun 2021 10:02:17 -0400
Received: from quimby.gnus.org ([95.216.78.240]:38196)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>)
 id 1lsnAN-00035r-AL; Mon, 14 Jun 2021 10:02:15 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=Ae7QFlPgP/fUAiQpJF9JU2XL1hxK0pEin51ewVWrGF8=; b=PGIB7m6aZDLfSwGBM9sEKAgk4M
 B5FJmJ7svC1e68TRtqh0N7MfAjPKFSAz3NY9obJSwUvmclY91zt9vG5gK00OpVOqRQyyje7CxnsS8
 68jiz2FbNQCCPqyn11Elx1WmzXKkJoFqc0j1fNSi0058spuuaDCSHwrVnfLCnPGZi7Qo=;
Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1lsnAB-0001Vf-FQ; Mon, 14 Jun 2021 16:02:09 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Dmitry Alexandrov <dag@HIDDEN>
Subject: Re: bug#40748: 28.0.50; Switching wifi networks hangs dns lookups
References: <1rnogg6b.dag@HIDDEN> <87y2neh2zr.fsf@HIDDEN>
X-Now-Playing: 75 Dollar Bill's _I Was Real_: "I Was Real"
Date: Mon, 14 Jun 2021 16:02:02 +0200
In-Reply-To: <87y2neh2zr.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Mon,
 20 Jul 2020 12:53:12 +0200")
Message-ID: <87wnqwy279.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Lars Ingebrigtsen <larsi@HIDDEN> writes: > So I'm not sure
 how this can be an Emacs bug -- as far as I know, > there's no way for libc
 clients to say "update all the DNS stuff now"; > it's supposed to happen
 automatically when you call getad [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40748
Cc: 40748 <at> debbugs.gnu.org, 41234 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Lars Ingebrigtsen <larsi@HIDDEN> writes:

> So I'm not sure how this can be an Emacs bug -- as far as I know,
> there's no way for libc clients to say "update all the DNS stuff now";
> it's supposed to happen automatically when you call getaddrinfo.  (If
> I'm wrong, somebody please correct me.)

This was almost a year ago -- does anybody have any further input here?
If not, I'm not sure there's anything we can do from the Emacs side
here...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40748; Package emacs. Full text available.
Forcibly Merged 40748 41234. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 40748 <at> debbugs.gnu.org:


Received: (at 40748) by debbugs.gnu.org; 3 Jul 2020 04:11:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 03 00:11:54 2020
Received: from localhost ([127.0.0.1]:56069 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jrD3K-0005yT-90
	for submit <at> debbugs.gnu.org; Fri, 03 Jul 2020 00:11:54 -0400
Received: from relay-1.mailobj.net ([213.182.54.6]:54519)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dag@HIDDEN>) id 1jrD3E-0005yB-GT
 for 40748 <at> debbugs.gnu.org; Fri, 03 Jul 2020 00:11:52 -0400
Received: from v-1c.localdomain (unknown [192.168.90.161])
 by relay-1.mailobj.net (Postfix) with SMTP id 42A4012BA;
 Fri,  3 Jul 2020 06:11:42 +0200 (CEST)
Received: by mail-1.net-c.com [213.182.54.15] with ESMTP
 Fri,  3 Jul 2020 06:11:42 +0200 (CEST)
X-EA-Auth: S8J+bgzO5c8HkdV2KdVSuIQPvoad2WeARIBgL2tKP5g28czkgbNWUqIZVAkNhszOGGV2fUPxAamNz3afgSDzH/gDx0LzXDLX
From: Dmitry Alexandrov <dag@HIDDEN>
To: Eric Abrahamsen <eric@HIDDEN>
Subject: Re: bug#40748: 28.0.50; Switching wifi networks hangs dns lookups
In-Reply-To: <878sio3gtd.fsf@HIDDEN> (Eric Abrahamsen's message of
 "Tue, 21 Apr 2020 10:10:54 -0700")
References: <878sio3gtd.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
Date: Fri, 03 Jul 2020 07:11:39 +0300
Message-ID: <h7up9r0k.dag@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 40748
Cc: 40748 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

> I often have trouble reconnecting Gnus' nntp servers after sleeping the l=
aptop in one location, and waking it up in another, connecting to a new wif=
i network

> I edebugged `nntp-open-connection', and realized that the error =E2=80=B9=
=E2=80=A6=E2=80=BA is actually a dns error:

Looks familiar!

> Here's the code that opens the connection; in my case it's nntp-open-netw=
ork-stream/network.

Could not it actually be an even deeper issue I outlined in bug#41234: 27.0=
.91; Synchronous network requests are failing with =E2=80=9CName or service=
 not known=E2=80=9D [1]?

[1] <mid:1rnogg6b.dag@HIDDEN>
    <https://bugs.gnu.org/41234>

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iIMEARYIACsWIQRSX35grYEsI2F1K7TIsPhUjufz5wUCXv6v+w0cZGFnQGdudWku
b3JnAAoJEMiw+FSO5/PnoPUA/RB/Q5NxfG1LPAqIKQ0I44oth5n7QcE2stbw41wP
tNkAAP0b8ZjVjQLZVIKxoCvXWOFqgfhyBsOJw8w9ctQ7gET0Aw==
=aEoX
-----END PGP SIGNATURE-----
--=-=-=--





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#40748; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 21 Apr 2020 17:11:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 21 13:11:08 2020
Received: from localhost ([127.0.0.1]:50698 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jQwQN-0007TG-BA
	for submit <at> debbugs.gnu.org; Tue, 21 Apr 2020 13:11:08 -0400
Received: from lists.gnu.org ([209.51.188.17]:51537)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eric@HIDDEN>) id 1jQwQL-0007T9-J5
 for submit <at> debbugs.gnu.org; Tue, 21 Apr 2020 13:11:06 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:33896)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eric@HIDDEN>) id 1jQwQL-0004gF-5q
 for bug-gnu-emacs@HIDDEN; Tue, 21 Apr 2020 13:11:05 -0400
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED,
 SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no
 version=3.4.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1)
 (envelope-from <eric@HIDDEN>) id 1jQwQK-00016M-HK
 for bug-gnu-emacs@HIDDEN; Tue, 21 Apr 2020 13:11:04 -0400
Received: from ericabrahamsen.net ([52.70.2.18]:47484
 helo=mail.ericabrahamsen.net)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eric@HIDDEN>)
 id 1jQwQK-00014W-5J
 for bug-gnu-emacs@HIDDEN; Tue, 21 Apr 2020 13:11:04 -0400
Received: from localhost (c-73-254-86-141.hsd1.wa.comcast.net [73.254.86.141])
 (Authenticated sender: eric@HIDDEN)
 by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 58908FA099
 for <bug-gnu-emacs@HIDDEN>; Tue, 21 Apr 2020 17:10:56 +0000 (UTC)
From: Eric Abrahamsen <eric@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 28.0.50; Switching wifi networks hangs dns lookups
Date: Tue, 21 Apr 2020 10:10:54 -0700
Message-ID: <878sio3gtd.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=52.70.2.18; envelope-from=eric@HIDDEN;
 helo=mail.ericabrahamsen.net
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/21 13:10:56
X-ACL-Warn: Detected OS   = Linux 2.2.x-3.x [generic]
X-Received-From: 52.70.2.18
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.8 (/)


I'm on Emacs master, but this behavior has been evident for quite some
time, a year or two I think.

I often have trouble reconnecting Gnus' nntp servers after sleeping the
laptop in one location, and waking it up in another, connecting to a new
wifi network (I'm using Arch linux, if it matters).

I edebugged `nntp-open-connection', and realized that the error (which
is getting handled by `nnheader-report', that's why I didn't notice it)
is actually a dns error:

(error "news.gmane.io/nntp Temporary failure in name resol...")

Other Emacs network connections behave as normal. But this error for
this particular server persists until I restart Emacs.

Are DNS lookups cached? Cached per connection? Is there anything we can
do to flush whatever's "stuck"?

Here's the code that opens the connection; in my case it's
nntp-open-network-stream/network.

Happy to help with further debugging!

(let ((coding-system-for-read 'binary)
      (coding-system-for-write 'binary)
      (map '((nntp-open-network-stream network)
	     (network-only plain)	; compat
	     (nntp-open-plain-stream plain)
	     (nntp-open-ssl-stream tls)
	     (nntp-open-tls-stream tls))))
  (if (assoc nntp-open-connection-function map)
      (open-network-stream
       "nntpd" pbuffer nntp-address nntp-port-number
       :type (cadr (assoc nntp-open-connection-function map))
       :end-of-command "^\\([2345]\\|[.]\\).*\n"
       :capability-command "HELP\r\n"
       :success "^3"
       :starttls-function
       (lambda (capabilities)
	 (if (not (string-match "STARTTLS" capabilities))
	     nil
	   "STARTTLS\r\n")))
    (funcall nntp-open-connection-function pbuffer)))




Acknowledgement sent to Eric Abrahamsen <eric@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#40748; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 14 Jun 2021 14:15:01 UTC

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