From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.2 Received: (qmail 17308 invoked from network); 4 May 2020 15:38:43 -0000 Received: from lists1.math.uh.edu (129.7.128.208) by inbox.vuxu.org with ESMTPUTF8; 4 May 2020 15:38:43 -0000 Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.92.3) (envelope-from ) id 1jVdAf-0006jK-Aj; Mon, 04 May 2020 10:38:17 -0500 Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1jVdAb-0006ga-Vr for ding@lists.math.uh.edu; Mon, 04 May 2020 10:38:14 -0500 Received: from quimby.gnus.org ([95.216.78.240]) by mx2.math.uh.edu with esmtps (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1jVdAa-0006Td-EF for ding@lists.math.uh.edu; Mon, 04 May 2020 10:38:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: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=7pkgQTN87mAOMisNAcHjqeDX4oLk65CVubVwC9iAtP4=; b=lI0o8aWotug/q2ncnXqj823EVc EkvPzmdJ2E+O8M1A9x8IrbpRfuIvJsem8sOfztw6xiLby/eQO7NLT9FO+dCV9nKrsGnOuN/KlsC0A cTfk/GHYoTkAaYLe316no70XAqGLMMSlJLpkT39GE9IPvLu2XgoxV7vDfEh/oeS3BCGg=; Received: from ericabrahamsen.net ([52.70.2.18] helo=mail.ericabrahamsen.net) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jVdAT-0001Q2-7S; Mon, 04 May 2020 17:38:08 +0200 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 56E62FA08E; Mon, 4 May 2020 15:38:02 +0000 (UTC) From: Eric Abrahamsen To: Robert Pluim Cc: Lars Ingebrigtsen , Christian Barthel , ding@gnus.org Subject: Re: new wifi connection = nntp timeout = Emacs restart? References: <87sgh3coxn.fsf@ericabrahamsen.net> <87o8rogew7.fsf@barthel.ch> <87zhb7mlf0.fsf@ericabrahamsen.net> <87a72t35ng.fsf@gnus.org> <87wo5wev3m.fsf@ericabrahamsen.net> <878sic1w65.fsf@gnus.org> <87y2qcbp45.fsf@ericabrahamsen.net> Date: Mon, 04 May 2020 08:38:00 -0700 In-Reply-To: (Robert Pluim's message of "Mon, 04 May 2020 14:53:11 +0200") Message-ID: <87bln3ogmf.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-ID: Precedence: bulk Robert Pluim writes: >>>>>> On Thu, 30 Apr 2020 15:11:38 -0700, Eric Abrahamsen > said: > > >> A DNS lookup failing should never make Gnus hang, so that's pretty > >> surprising. > > Eric> This error comes in `nntp-open-connection', as the > Eric> condition-case error > Eric> caught from `open-network-stream'. I only just realized that's = a lisp > Eric> function, but looking at it we should be using > Eric> `make-network-process'. > > I=CA=BCd rather you didn=CA=BCt move in that direction. 'make-network-pro= cess' > is low-level plumbing, 'open-network-stream' is what user code should > be using. What feature is 'open-network-stream' missing for you? Sorry, that was a very poorly-written sentence. What I meant was that `open-network-stream' *does* use `make-network-process' internally, and the hang is happening inside C code, not Lisp code. That was all I was trying to say. > Eric> The DNS lookup isn't hanging (or hanging Gnus) so much as it > Eric> is taking a > Eric> long time to fail, and then _continuing to fail until Emacs is > Eric> restarted_. > > Eric> So I'm hoping this is unrelated to Gnus, and actually a problem= with > Eric> Emacs caching the DNS server it's trying to use, which is later > Eric> unavailable on a new network. (But then why would I only see > Eric> this with > Eric> Gnus nntp connections? On the other hand, all my nnimap > Eric> connections are > Eric> localhost, nntp is my only non-local Gnus network connection.) > > Emacs doesn=CA=BCt directly address the DNS server, it uses getaddrinfo or > getaddrinfo_a, which means any caching going on is in the IP > stack. Although given that this is being seen on GNU/Linux and macOS, > it may well be emacs at fault. > > Also, I see this when coming out of sleep and connecting to the same > wifi network, with the same IP, and the same DNS server, which I guess > implicates Emacs more. I really don't know very much about networking, unfortunately. I'm just trying to provide debugging data, possibly leads, baseless speculation, and red herrings. Eric