From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#43682: 28.0.50; Clean up nnimap server buffers? Date: Tue, 12 Oct 2021 13:50:17 -0700 Message-ID: <87wnmivugm.fsf@ericabrahamsen.net> References: <87eemlh3ro.fsf@ericabrahamsen.net> <87d024bpqc.fsf@gnus.org> <87mu18qw3g.fsf@ericabrahamsen.net> <87k0wc9i4k.fsf@gnus.org> <87tuvfc4ur.fsf@ericabrahamsen.net> <87d022wx5y.fsf@gnus.org> <871rii7cso.fsf@ericabrahamsen.net> <87o8lmq6k4.fsf@gnus.org> <87sgax6eqb.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11436"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Lars Ingebrigtsen , 43682-done@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 12 22:51:18 2021 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 1maOk2-0002mY-Jg for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Oct 2021 22:51:18 +0200 Original-Received: from localhost ([::1]:41686 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maOk0-0002V9-Fz for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Oct 2021 16:51:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maOjn-0002Uj-4c for bug-gnu-emacs@gnu.org; Tue, 12 Oct 2021 16:51:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42931) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maOjm-0007zs-SO for bug-gnu-emacs@gnu.org; Tue, 12 Oct 2021 16:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1maOjm-0001Xc-RI for bug-gnu-emacs@gnu.org; Tue, 12 Oct 2021 16:51:02 -0400 Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Oct 2021 20:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 43682 X-GNU-PR-Package: emacs Mail-Followup-To: 43682@debbugs.gnu.org, eric@ericabrahamsen.net, eric@ericabrahamsen.net Original-Received: via spool by 43682-done@debbugs.gnu.org id=D43682.16340718285857 (code D ref 43682); Tue, 12 Oct 2021 20:51:02 +0000 Original-Received: (at 43682-done) by debbugs.gnu.org; 12 Oct 2021 20:50:28 +0000 Original-Received: from localhost ([127.0.0.1]:54472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1maOjE-0001WK-9X for submit@debbugs.gnu.org; Tue, 12 Oct 2021 16:50:28 -0400 Original-Received: from mail.ericabrahamsen.net ([52.70.2.18]:56546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1maOjC-0001Vr-0B for 43682-done@debbugs.gnu.org; Tue, 12 Oct 2021 16:50:27 -0400 Original-Received: from localhost (75-172-126-110.tukw.qwest.net [75.172.126.110]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id C0ABBFA059; Tue, 12 Oct 2021 20:50:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1634071819; bh=9Sr46bSQg1iiJ7mLHfiB6MampNucIGoN/+o6fol5VPk=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=wpYipCzlWxXuL5yUMDc3JuOlMro90x3G6M1dUAcG9TgSkUZYYlwZvt9S7YY+UVsCD nJpHLg/huAxQW5J9bYoD6Zh9SUIc53X6eVeCopIlsNZZaDXN5z82OrMxhqoDwb5cq5 oEUpEQKPhoNdAa7JCmYB5hIMzqdJ0Ly4o8lDY8jA= In-Reply-To: (Stefan Kangas's message of "Mon, 11 Oct 2021 05:53:26 -0700") 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" Xref: news.gmane.io gmane.emacs.bugs:217074 Archived-At: On 10/11/21 05:53 AM, Stefan Kangas wrote: > Eric Abrahamsen writes: > >> On 10/01/20 18:01 PM, Lars Ingebrigtsen wrote: >>> Eric Abrahamsen writes: >>> >>>> It's possible (I'm not claiming to understand all the code) that all we >>>> would need to do is fix `gnus-async-wait-for-article' to replace its >>>> calls to `nntp-find-connection' and `nntp-accept-process-output' with >>>> something generalized. Those two functions deal with directly with >>>> `nntp-connection-alist', so we'd need something that would do the >>>> equivalent with `nnimap-connection-alist'. >>> >>> Yup. >> >> This is something I wouldn't want to tackle until we have generic >> functions. >> >>>> Anyway, in the interest of completing this far less ambitious patch: if >>>> the nnimap connection has timed out, we should remove this connection >>>> from `nnimap-connection-alist', so this version of the patch does that. >>>> If async has opened a second connection, I guess we should leave that >>>> alone, though I don't have too much confidence that the whole process >>>> will recover gracefully from the main connection dying... >>> >>> Well, the connections are separate, and there's all kinds of reasons for >>> the server to close a connection, so... >>> >>>> + (unless (memq (process-status (get-buffer-process buffer)) >>>> + '(open run)) >>> >>> Aka `process-live-p'. >> >> I forgot we have that! >> >>> Otherwise looks fine to me (but I haven't tested the code). >> >> Okay, I'll run this for a bit, as well. > > Any news here? Should the fix be installed? Okay, I've pushed a commit that fixes nearly all of the issue. There are still some mysterious circumstances under which a single dead imap connection buffer remains in `nnimap-process-buffers', and I don't know how it gets there. But it's better than 50+ dead connection buffers, so I'm going to close this for now.