From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#40748: 28.0.50; Switching wifi networks hangs dns lookups Date: Tue, 21 Apr 2020 10:10:54 -0700 Message-ID: <878sio3gtd.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="121772"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: 40748@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 21 19:12:18 2020 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 1jQwRV-000VZE-TO for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 21 Apr 2020 19:12:17 +0200 Original-Received: from localhost ([::1]:33584 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQwRU-0004rd-N3 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 21 Apr 2020 13:12:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34022) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQwRH-0004r5-KV for bug-gnu-emacs@gnu.org; Tue, 21 Apr 2020 13:12:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jQwRH-0002Nh-77 for bug-gnu-emacs@gnu.org; Tue, 21 Apr 2020 13:12:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39152) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jQwRG-0002Lk-Qu for bug-gnu-emacs@gnu.org; Tue, 21 Apr 2020 13:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jQwRG-0007US-KA for bug-gnu-emacs@gnu.org; Tue, 21 Apr 2020 13:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Apr 2020 17:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 40748 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.158748906828727 (code B ref -1); Tue, 21 Apr 2020 17:12:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Apr 2020 17:11:08 +0000 Original-Received: from localhost ([127.0.0.1]:50698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jQwQN-0007TG-BA for submit@debbugs.gnu.org; Tue, 21 Apr 2020 13:11:08 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:51537) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jQwQL-0007T9-J5 for submit@debbugs.gnu.org; Tue, 21 Apr 2020 13:11:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33896) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQwQL-0004gF-5q for bug-gnu-emacs@gnu.org; Tue, 21 Apr 2020 13:11:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jQwQK-00016M-HK for bug-gnu-emacs@gnu.org; Tue, 21 Apr 2020 13:11:04 -0400 Original-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 ) id 1jQwQK-00014W-5J for bug-gnu-emacs@gnu.org; Tue, 21 Apr 2020 13:11:04 -0400 Original-Received: from localhost (c-73-254-86-141.hsd1.wa.comcast.net [73.254.86.141]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 58908FA099 for ; Tue, 21 Apr 2020 17:10:56 +0000 (UTC) Received-SPF: pass client-ip=52.70.2.18; envelope-from=eric@ericabrahamsen.net; 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Received-From: 209.51.188.43 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" Xref: news.gmane.io gmane.emacs.bugs:178758 Archived-At: 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)))