From unknown Thu Jun 19 14:25:24 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#43682 <43682@debbugs.gnu.org> To: bug#43682 <43682@debbugs.gnu.org> Subject: Status: 28.0.50; Clean up nnimap server buffers? Reply-To: bug#43682 <43682@debbugs.gnu.org> Date: Thu, 19 Jun 2025 21:25:24 +0000 retitle 43682 28.0.50; Clean up nnimap server buffers? reassign 43682 emacs submitter 43682 Eric Abrahamsen severity 43682 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 28 19:37:29 2020 Received: (at submit) by debbugs.gnu.org; 28 Sep 2020 23:37:29 +0000 Received: from localhost ([127.0.0.1]:54335 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kN2i1-0008DT-Gh for submit@debbugs.gnu.org; Mon, 28 Sep 2020 19:37:29 -0400 Received: from lists.gnu.org ([209.51.188.17]:32898) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kN2hy-0008DL-VH for submit@debbugs.gnu.org; Mon, 28 Sep 2020 19:37:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45782) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kN2hy-0008Ss-ES for bug-gnu-emacs@gnu.org; Mon, 28 Sep 2020 19:37:26 -0400 Received: from ericabrahamsen.net ([52.70.2.18]:45092 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 1kN2hv-0000um-92 for bug-gnu-emacs@gnu.org; Mon, 28 Sep 2020 19:37:25 -0400 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 802E8FA5B6 for ; Mon, 28 Sep 2020 23:37:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1601336236; bh=jfVwvFeibR03Yn8azP9qz5FmI0kR5/872YqAiv2FXvM=; h=From:To:Subject:Date:From; b=LMc8VIM1WbCFe2abrYfHxN5z5OUhch87A70KcXGbQhAR4NbqRWK3s/QLrFIHKa3BU WP3kRFtnOCWeeynwL78OI/fwiVDxbJTX78t0MQprP0Ylbj8s7HW94OqUTo6dyFVYIb C8i/u3rGEJeHzZBMp/uyFQJmxqI29TfGugXGZyo4= From: Eric Abrahamsen To: bug-gnu-emacs@gnu.org Subject: 28.0.50; Clean up nnimap server buffers? Date: Mon, 28 Sep 2020 16:37:15 -0700 Message-ID: <87eemlh3ro.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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/09/28 19:37:17 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-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-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain Someone noted on gnus.general that their imap connections are frequently broken, and they end up with a lot of dead process buffers. I'm talking to them about maybe making the keepalive timeout configurable, but wouldn't also be tidy to clean up dead process buffers? How does the attached patch look? Eric --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=CleanupImapBuffers.diff diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index d797e893f5..7f2ebe279e 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -407,8 +407,15 @@ nnimap-keepalive (time-subtract now (nnimap-last-command-time nnimap-object)))) - (ignore-errors ;E.g. "buffer foo has no process". - (nnimap-send-command "NOOP")))))))) + (condition-case err + (process-send-string "NOOP") + (error + (if (string-search "has no process" (cdr err)) + (let ((buf (current-buffer))) + (setq nnimap-process-buffers + (delq buf nnimap-process-buffers)) + (kill-buffer buf)) + (signal (car err) (cdr err))))))))))) (defun nnimap-open-connection (buffer) ;; Be backwards-compatible -- the earlier value of nnimap-stream was @@ -1910,6 +1917,10 @@ nnimap-find-connection '(open run))) (get-buffer-process (cadr entry)) (setq nnimap-connection-alist (delq entry nnimap-connection-alist)) + (setq nnimap-process-buffers + (delq (cadr entry) nnimap-process-buffers)) + (when (buffer-live-p (cadr entry)) + (kill-buffer (cadr entry))) nil)))) ;; Leave room for `open-network-stream' to issue a couple of IMAP --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 29 03:42:14 2020 Received: (at 43682) by debbugs.gnu.org; 29 Sep 2020 07:42:14 +0000 Received: from localhost ([127.0.0.1]:54858 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNAH8-0003GV-A3 for submit@debbugs.gnu.org; Tue, 29 Sep 2020 03:42:14 -0400 Received: from mail-wr1-f45.google.com ([209.85.221.45]:40690) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNAH7-0003GH-Ce for 43682@debbugs.gnu.org; Tue, 29 Sep 2020 03:42:13 -0400 Received: by mail-wr1-f45.google.com with SMTP id j2so4159937wrx.7 for <43682@debbugs.gnu.org>; Tue, 29 Sep 2020 00:42:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=Ch9Xy8g2av8LJp7ST4l8/fa6Va+TTKAaiz1weyYj+cc=; b=QAYTw1p0d1CX5wR1pf22HsvowZk/kHf2oG8hOSR7tH69vjf8NC+55tSpTqGW7VbDmw csNAHd88bM11c3/wZftlomEAUxGEaaKTVHIBRyrNSUkFwSeufKOEPa8tLHismZRwWNI1 UVX84gZVljN9tdR9CmKyxK2byLKdsUQujct2QwTRUDda32+wSpzg6rNFtTdsf28hp0z+ q35rt9o5SbJyOLXMBqMkc5cBAgfk90kur+V55ohqCQ8WPw5MVboT1QeJ/xVO52Jx9WGu 5O/9sULd7gC+BnEIvJQUNq9it5uolgKf1NM3vTCxMvhGr8okhPEFXlKbII/JONTDWJbT mRug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=Ch9Xy8g2av8LJp7ST4l8/fa6Va+TTKAaiz1weyYj+cc=; b=nvVlEoQnWPvvjE5vmzLAzsxDHF+t6RBN0M9himKPBomroAsv4wpPYqdAKgLm7g/bCm wYrrP3RltD2GXCtcsMbXSrAVnkLyXOB3SU4QbZq0oLdx/WDShw3F78Ugd/8oWDXKLEis llPG3dJbW6zDKwYVf2tOgp9yvEt/DwRm5WHqDcJJMtBEsgCNFlFwQf85CDMLU5HjB/Nc vTivJ/9MTEdyDXZhnhQjJJaGlyYrMvS1sGurOd6kjM+dr4z2bkyNP1NGqitocvFtVhcu H/cKmjThInp3RdNd38/aBxKlchliNhFQ4lMkMnYALHdeubKtTc0xwDiGSkyzBmpCgTzs M/Mw== X-Gm-Message-State: AOAM533/NT9HGZ3yX6AbgY4VMjVBckN0MF7FUJ8Ixx8sxAsEFJSS5z9C eKJY0QgO4hFrvbsRxd59XeQ4Q3Ycs18= X-Google-Smtp-Source: ABdhPJxh0eGViNDzneyxJs2vxM6OjXPCh6dpVDvLxU93QHKuAF2libnEerR86gp3dI55dbtnj+HQ3g== X-Received: by 2002:adf:92c2:: with SMTP id 60mr2814498wrn.220.1601365326900; Tue, 29 Sep 2020 00:42:06 -0700 (PDT) Received: from rpluim-mac ([2a01:e34:ecfc:a860:ec55:f484:fbc:8e04]) by smtp.gmail.com with ESMTPSA id i15sm4857778wrb.91.2020.09.29.00.42.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Sep 2020 00:42:05 -0700 (PDT) From: Robert Pluim To: Eric Abrahamsen Subject: Re: bug#43682: 28.0.50; Clean up nnimap server buffers? References: <87eemlh3ro.fsf@ericabrahamsen.net> Date: Tue, 29 Sep 2020 09:42:05 +0200 In-Reply-To: <87eemlh3ro.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Mon, 28 Sep 2020 16:37:15 -0700") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: 43682 Cc: 43682@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.6 (-) >>>>> On Mon, 28 Sep 2020 16:37:15 -0700, Eric Abrahamsen said: Eric> Someone noted on gnus.general that their imap connections are fre= quently Eric> broken, and they end up with a lot of dead process buffers. Eric> I'm talking to them about maybe making the keepalive timeout Eric> configurable, but wouldn't also be tidy to clean up dead process Eric> buffers? How does the attached patch look? Eric> Eric Eric> diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el Eric> index d797e893f5..7f2ebe279e 100644 Eric> --- a/lisp/gnus/nnimap.el Eric> +++ b/lisp/gnus/nnimap.el Eric> @@ -407,8 +407,15 @@ nnimap-keepalive Eric> (time-subtract Eric> now Eric> (nnimap-last-command-time nnimap-object)))) Eric> - (ignore-errors ;E.g. "buffer foo has no= process". Eric> - (nnimap-send-command "NOOP")))))))) Eric> + (condition-case err Eric> + (process-send-string "NOOP") Eric> + (error Eric> + (if (string-search "has no process" (cdr err)) Eric> + (let ((buf (current-buffer))) Eric> + (setq nnimap-process-buffers Eric> + (delq buf nnimap-process-buffers)) Eric> + (kill-buffer buf)) Eric> + (signal (car err) (cdr err))))))))))) That=CA=BCs not how you call process-send-string, and the nnimap-send-command is there for a reason: it deals with imap sequence numbers. Also I don=CA=BCt think 'has no process' is the only error 'process-send-string' can signal. I see at least 'not running' and 'Output file descriptor.*is closed' Robert --=20 From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 29 10:51:51 2020 Received: (at 43682) by debbugs.gnu.org; 29 Sep 2020 14:51:51 +0000 Received: from localhost ([127.0.0.1]:56889 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNGyt-0008C8-DS for submit@debbugs.gnu.org; Tue, 29 Sep 2020 10:51:51 -0400 Received: from quimby.gnus.org ([95.216.78.240]:34750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNGys-0008Bs-4W for 43682@debbugs.gnu.org; Tue, 29 Sep 2020 10:51:50 -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=wl0dfgMm9xk0gJwj37uhT0hx/7GPiHiU5lwxo+nhMgw=; b=FdCU55gpK5b+XtXm74wnays4jD /RDGcVTP23PkYvy429CffzpOt/dM74ybtOez7awGiQ6K8KcN1lmpcG/EoS7KmR3UNwuzYhnCr8dR8 4wa4CF6SDJnpNv4WI4vZUNQ96gsLR/FiQnYOyzehhf1yv/2NFjxGW7IMlnfiubBj5jQQ=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNGyi-00081o-M8; Tue, 29 Sep 2020 16:51:43 +0200 From: Lars Ingebrigtsen To: Eric Abrahamsen Subject: Re: bug#43682: 28.0.50; Clean up nnimap server buffers? References: <87eemlh3ro.fsf@ericabrahamsen.net> X-Now-Playing: 23 Skidoo's _Seven Songs_: "Tearing Up the Plans Pt. 2" Date: Tue, 29 Sep 2020 16:51:39 +0200 In-Reply-To: <87eemlh3ro.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Mon, 28 Sep 2020 16:37:15 -0700") Message-ID: <87d024bpqc.fsf@gnus.org> 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: Eric Abrahamsen writes: > - (ignore-errors ;E.g. "buffer foo has no process". > - (nnimap-send-command "NOOP")))))))) > + (condition-case err > + (process-send-string "NOOP") > + (error 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.0 (/) X-Debbugs-Envelope-To: 43682 Cc: 43682@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eric Abrahamsen writes: > - (ignore-errors ;E.g. "buffer foo has no process". > - (nnimap-send-command "NOOP")))))))) > + (condition-case err > + (process-send-string "NOOP") > + (error As Robert notes, you can't do that; it'll mess up the machiner. > + (if (string-search "has no process" (cdr err)) > + (let ((buf (current-buffer))) > + (setq nnimap-process-buffers > + (delq buf nnimap-process-buffers)) > + (kill-buffer buf)) > + (signal (car err) (cdr err))))))))))) But why look for a string? You can just check whether the process is dead or not. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 29 14:25:18 2020 Received: (at 43682) by debbugs.gnu.org; 29 Sep 2020 18:25:18 +0000 Received: from localhost ([127.0.0.1]:57120 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNKJS-0002s4-3t for submit@debbugs.gnu.org; Tue, 29 Sep 2020 14:25:18 -0400 Received: from ericabrahamsen.net ([52.70.2.18]:54382 helo=mail.ericabrahamsen.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNKJP-0002rq-TN for 43682@debbugs.gnu.org; Tue, 29 Sep 2020 14:25:17 -0400 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 48820FA5B6; Tue, 29 Sep 2020 18:25:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1601403909; bh=yHNeYba5Ex5avgF6qNKOUVa09jlydhO2n5Xc4S+V+n0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=xC6IkWBafcWHi4/mAz1RUo8qfm2eGnxqe8qSXBTdoxUVFigTxo1KH3izIlU0YnGwm 7bSLvh3niAGzZa3LI3qaJ7DybVdRMiyi6ilD8PX1Bio5NXjXapsIwrSfxYh4nYqceb GBMpEMvtSJmLJwq8ZBQywRRHRy5pGGF9ijYRcPJo= From: Eric Abrahamsen To: Lars Ingebrigtsen Subject: Re: bug#43682: 28.0.50; Clean up nnimap server buffers? References: <87eemlh3ro.fsf@ericabrahamsen.net> <87d024bpqc.fsf@gnus.org> Date: Tue, 29 Sep 2020 11:25:07 -0700 In-Reply-To: <87d024bpqc.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 29 Sep 2020 16:51:39 +0200") Message-ID: <87mu18qw3g.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 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43682 Cc: 43682@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Lars Ingebrigtsen writes: > Eric Abrahamsen writes: > >> - (ignore-errors ;E.g. "buffer foo has no process". >> - (nnimap-send-command "NOOP")))))))) >> + (condition-case err >> + (process-send-string "NOOP") >> + (error > > As Robert notes, you can't do that; it'll mess up the machiner. That was a complete brain-o. I must have actually gone and typed that, and I don't know why. >> + (if (string-search "has no process" (cdr err)) >> + (let ((buf (current-buffer))) >> + (setq nnimap-process-buffers >> + (delq buf nnimap-process-buffers)) >> + (kill-buffer buf)) >> + (signal (car err) (cdr err))))))))))) > > But why look for a string? You can just check whether the process is > dead or not. Yes, I could have thought this through a little more... Do we need to manipulate `nnimap-connection-alist', as `nnimap-find-connection' does? I've never understood what that variable is actually for. It's a defvoo, so it has a separate value per-server, but each server's only got one active process buffer anyway. What does it tell us that we can't get from nnimap-process-buffers (and those buffers' local values of `nnimap-object')? Thanks to you both, Eric From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 29 21:19:08 2020 Received: (at 43682) by debbugs.gnu.org; 30 Sep 2020 01:19:08 +0000 Received: from localhost ([127.0.0.1]:57612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNQlw-0006My-6N for submit@debbugs.gnu.org; Tue, 29 Sep 2020 21:19:08 -0400 Received: from quimby.gnus.org ([95.216.78.240]:39030) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNQlr-0006MQ-TY for 43682@debbugs.gnu.org; Tue, 29 Sep 2020 21:19:06 -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=ggSWlDZ68DwnYIdBbVzq22kLwzW8z1wM/xMiUA59dnI=; b=HAA3IB8UHCU8AtHs0ny/yrvGcU gvUtphEbaAXe1cQGZ1wA0EL0PD1z4QjDZLUTcaH76CAmXgv/WLt5Ot0VUS3ZUuqgIHcVM3XUtO9vC gL2IilkkvO6DAQTF1XDCKHCgPv1bIjKV3JdXWoPAKrrJS996KvjwPfLnxyr5YbxPuePI=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNQlh-0004kj-3S; Wed, 30 Sep 2020 03:18:56 +0200 From: Lars Ingebrigtsen To: Eric Abrahamsen Subject: Re: bug#43682: 28.0.50; Clean up nnimap server buffers? References: <87eemlh3ro.fsf@ericabrahamsen.net> <87d024bpqc.fsf@gnus.org> <87mu18qw3g.fsf@ericabrahamsen.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAGFBMVEUtJyhdYlpkjZB6 hHZWRkCUYULZ3dn///8tA4SfAAAAAWJLR0QHFmGI6wAAAAd0SU1FB+QJHgERAK7M+M4AAAGQSURB VDjLbZRbbsMgEEWxxAJyyfBf0zb/aR7foOIFVA4rqOT9L6EDGAN2x5KlzJk7L3CEyAalruod8NGc A7JbWqMU1Du56Cbi9yoQLcAGZAXOr7ZXcDhdAdw6cCOuS2B2vm4AkoY7F86JHFWFp4EFHM7PQ+vV P7wpSzGcO+Jk9zAVcIIlGVv14DL6/C0sPwl4yjOAlfrloy8D4Utd7pacsDKlsnZNmiFC2aGoJrvJ N+t9sgWtwh4yHYFstyutt6K026+dWzfGXJZqa6roTnbpgD2NBagNSK5GFcAUMKTTBNSoRoxmLBIR 7xA+Ri4OfqEBSD9zAdaotXxsFCl211a8myrBLDJLA5DiVTfGItjN5887iPQwOS8qVVI7IF0s8XXB +ahgc0a6/4D31k/P5wa6Q5huyxGEaM8KQnBT0BphD16TDgFhcplUMLlzCPoVfojdugGeV5EvNNvM qX7LrtJRPB4xz9xky2tXn3PtrAWAznMcAbKzAy5Lwg5Q/JtwDZgLyI0Cpau52RWlj4t9dYfLHxo2 2p1QEW7+AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIwLTA5LTMwVDAxOjE3OjAwKzAwOjAwf4G9lwAA ACV0RVh0ZGF0ZTptb2RpZnkAMjAyMC0wOS0zMFQwMToxNzowMCswMDowMA7cBSsAAAAASUVORK5C YII= X-Now-Playing: Joni Mitchell's _Miles of Aisles_: "Carey" Date: Wed, 30 Sep 2020 03:18:51 +0200 In-Reply-To: <87mu18qw3g.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Tue, 29 Sep 2020 11:25:07 -0700") Message-ID: <87k0wc9i4k.fsf@gnus.org> 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: Eric Abrahamsen writes: > Do we need to manipulate `nnimap-connection-alist', as > `nnimap-find-connection' does? I've never understood what that variable > is actually for. It's a defvoo, so it has a separate value per-serv [...] 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.0 (/) X-Debbugs-Envelope-To: 43682 Cc: 43682@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eric Abrahamsen writes: > Do we need to manipulate `nnimap-connection-alist', as > `nnimap-find-connection' does? I've never understood what that variable > is actually for. It's a defvoo, so it has a separate value per-server, > but each server's only got one active process buffer anyway. They do? I thought async prefetching opened a second connection. Is that in nnimap only? And... was there something about sieve-mode having its own connection? I forget. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 29 21:21:47 2020 Received: (at 43682) by debbugs.gnu.org; 30 Sep 2020 01:21:47 +0000 Received: from localhost ([127.0.0.1]:57616 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNQoU-0006R2-L2 for submit@debbugs.gnu.org; Tue, 29 Sep 2020 21:21:47 -0400 Received: from quimby.gnus.org ([95.216.78.240]:39050) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNQoT-0006Qo-EE for 43682@debbugs.gnu.org; Tue, 29 Sep 2020 21:21:46 -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=2RBtO+/wJJfUdaT64CAHujI6RR/iI+cE317KllSCmnk=; b=QSr1+TWCSjbfirE8hpjSeAUgD/ K9bgxunaRYmeWX+8YJlkS1wVBkWBz54Cxkvp+a6Ko62qhg5SLr5FDNCVHfNHp7JIRRrsZN93LcVRq bb7zBtNMjvKqNhc7BOU0t21yWIxPV6hmVycBVVd5IE024d8jp3BGDrt64E4GwnlEOu1c=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNQoL-0004lM-4s; Wed, 30 Sep 2020 03:21:39 +0200 From: Lars Ingebrigtsen To: Eric Abrahamsen Subject: Re: bug#43682: 28.0.50; Clean up nnimap server buffers? References: <87eemlh3ro.fsf@ericabrahamsen.net> <87d024bpqc.fsf@gnus.org> <87mu18qw3g.fsf@ericabrahamsen.net> <87k0wc9i4k.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAGFBMVEUtJyhdYlpkjZB6 hHZWRkCUYULZ3dn///8tA4SfAAAAAWJLR0QHFmGI6wAAAAd0SU1FB+QJHgERAK7M+M4AAAGQSURB VDjLbZRbbsMgEEWxxAJyyfBf0zb/aR7foOIFVA4rqOT9L6EDGAN2x5KlzJk7L3CEyAalruod8NGc A7JbWqMU1Du56Cbi9yoQLcAGZAXOr7ZXcDhdAdw6cCOuS2B2vm4AkoY7F86JHFWFp4EFHM7PQ+vV P7wpSzGcO+Jk9zAVcIIlGVv14DL6/C0sPwl4yjOAlfrloy8D4Utd7pacsDKlsnZNmiFC2aGoJrvJ N+t9sgWtwh4yHYFstyutt6K026+dWzfGXJZqa6roTnbpgD2NBagNSK5GFcAUMKTTBNSoRoxmLBIR 7xA+Ri4OfqEBSD9zAdaotXxsFCl211a8myrBLDJLA5DiVTfGItjN5887iPQwOS8qVVI7IF0s8XXB +ahgc0a6/4D31k/P5wa6Q5huyxGEaM8KQnBT0BphD16TDgFhcplUMLlzCPoVfojdugGeV5EvNNvM qX7LrtJRPB4xz9xky2tXn3PtrAWAznMcAbKzAy5Lwg5Q/JtwDZgLyI0Cpau52RWlj4t9dYfLHxo2 2p1QEW7+AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIwLTA5LTMwVDAxOjE3OjAwKzAwOjAwf4G9lwAA ACV0RVh0ZGF0ZTptb2RpZnkAMjAyMC0wOS0zMFQwMToxNzowMCswMDowMA7cBSsAAAAASUVORK5C YII= X-Now-Playing: Joni Mitchell's _Miles of Aisles_: "The Last Time I Saw Richard" Date: Wed, 30 Sep 2020 03:21:35 +0200 In-Reply-To: <87k0wc9i4k.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 30 Sep 2020 03:18:51 +0200") Message-ID: <87ft709i00.fsf@gnus.org> 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 writes: > They do? I thought async prefetching opened a second connection. Is > that in nnimap only? Sorry; I meant "nntp only". 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.0 (/) X-Debbugs-Envelope-To: 43682 Cc: 43682@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > They do? I thought async prefetching opened a second connection. Is > that in nnimap only? Sorry; I meant "nntp only". -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 30 17:49:42 2020 Received: (at 43682) by debbugs.gnu.org; 30 Sep 2020 21:49:42 +0000 Received: from localhost ([127.0.0.1]:33328 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNjyo-0000Rg-4R for submit@debbugs.gnu.org; Wed, 30 Sep 2020 17:49:42 -0400 Received: from ericabrahamsen.net ([52.70.2.18]:33198 helo=mail.ericabrahamsen.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNjyl-0000RS-Gn for 43682@debbugs.gnu.org; Wed, 30 Sep 2020 17:49:41 -0400 Received: from localhost (75-172-112-137.tukw.qwest.net [75.172.112.137]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 33939FCE60; Wed, 30 Sep 2020 21:49:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1601502573; bh=9VfUC/zhQjrMjPwXfD08mC3MRaf7dq795eNaz/htMLY=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=r+MHsOZk0mMqp7TKIA0gygc14NMYXbGNs96rHlFw41jnjO5vrE/Pva434QRsZCDl8 zSwgz0T8rAU2t64s8BsbBcKHrpCOtecwQEMwo/1yCAtFpPbS4D7bots8bc/U8zaycA tbvIw/z4Pw3++cZbdbfK7FJV6WG+R4sB4/CtqGOE= From: Eric Abrahamsen To: Lars Ingebrigtsen Subject: Re: bug#43682: 28.0.50; Clean up nnimap server buffers? References: <87eemlh3ro.fsf@ericabrahamsen.net> <87d024bpqc.fsf@gnus.org> <87mu18qw3g.fsf@ericabrahamsen.net> <87k0wc9i4k.fsf@gnus.org> Date: Wed, 30 Sep 2020 14:49:32 -0700 In-Reply-To: <87k0wc9i4k.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 30 Sep 2020 03:18:51 +0200") Message-ID: <87tuvfc4ur.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 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43682 Cc: 43682@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 09/30/20 03:18 AM, Lars Ingebrigtsen wrote: > Eric Abrahamsen writes: > >> Do we need to manipulate `nnimap-connection-alist', as >> `nnimap-find-connection' does? I've never understood what that variable >> is actually for. It's a defvoo, so it has a separate value per-server, >> but each server's only got one active process buffer anyway. > > They do? I thought async prefetching opened a second connection. Is > that in nnimap only? So that's what it's for! That's a mystery solved. It appears that only nntp is asynchronous: at least, it's the only backend that implements `gnus-asynchronous-p'. nntp.el also contains `nntp-async-{wait,stop-trigger}', but as far as I can tell that has nothing to do with gnus-async.el stuff (?). That's the code that appears to make use of "extra processes per server", and nnimap doesn't have any of that. > And... was there something about sieve-mode having its own connection? > I forget. Not so far as I can tell. sieve.el and sieve-mode.el don't have anything to do with Gnus, and gnus-sieve.el is just about building sieve scripts from Gnus splitting rules. (Now that you mention it, it would be nice if there were a command to edit an IMAP server's sieve scripts from the *Server* buffer.) I went back through nnimap.el as carefully as I could. It's `nnimap-find-connection' and `nnimap-open-connection' that end up making use of `nnimap-connection-alist', but both of them only ever use `nntp-server-buffer' as the alist key. Unless that's been sneakily let-bound to something different someplace, the `nnimap-connection-alist' doesn't appear to do anything. Also, `nnimap-make-process-buffer' sets a buffer-local version of `after-change-functions' to nil -- this looks a bit like how nntp handles its async code, but it isn't used in nnimap. My guess is that someone set out to implement async for nnimap, but never quite finished it. I'm inclined to delete the alist altogether, but if we keep it at least I can give it a docstring. Eric From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 30 21:30:15 2020 Received: (at 43682) by debbugs.gnu.org; 1 Oct 2020 01:30:15 +0000 Received: from localhost ([127.0.0.1]:33454 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNnQF-0005ff-G9 for submit@debbugs.gnu.org; Wed, 30 Sep 2020 21:30:15 -0400 Received: from quimby.gnus.org ([95.216.78.240]:52076) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNnQD-0005fR-PO for 43682@debbugs.gnu.org; Wed, 30 Sep 2020 21:30:14 -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=xGQYffWB0Hpeez2pE65inHp0AFMqoqwi2drpmZzR/LY=; b=JDb6tFIZOIqhJsUFBFXOnjcQto mqIrHfvkH1u78rnOEv5VMmUI2oDMrF+Pg+HLizNV2mweuxoHcNDdvWsay32TNmSgbaGB8i0r9vm2Q clYC1fShV5dbcfBrSKrbKdS45EbqsgVAN8wBkN31DUfjfKZ9q9YQZfFY76OGakodYay4=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNnQ2-0000Ak-DB; Thu, 01 Oct 2020 03:30:08 +0200 From: Lars Ingebrigtsen To: Eric Abrahamsen Subject: Re: bug#43682: 28.0.50; Clean up nnimap server buffers? References: <87eemlh3ro.fsf@ericabrahamsen.net> <87d024bpqc.fsf@gnus.org> <87mu18qw3g.fsf@ericabrahamsen.net> <87k0wc9i4k.fsf@gnus.org> <87tuvfc4ur.fsf@ericabrahamsen.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEU0OUQnKjNCSlZr eIQYGiD///9of+7CAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+QKAQEVOzRx6fcAAAG+SURBVDjLbVSB jdwwDJODDiA+NECQjtAFToD2n6mk5Nzl0PqAQ2BaJEUrsQX4df3+s9d1ma3kphm07Nori6sBQI/1 M/sn7kUggaj0g9vnqnuZG9mC5VS6bACRGHxVRjMDC7X4DP6ZnRtIE1kGQZdGrhjSpMODZm3hEH+S cKjERQDSIKLNG4h8Gd0sCwL1AAppZ1QgSDtHK0fI7STTL1FtYEpWqpP/AEYAFVF+CMiMGAxUZg8Z fimOF7jfWboauA62d1gfqA6SFXDdwHITFVL7pOsWleX5QyBopfo8KLYBpzhzlDYhqEP0vQzVS8K6 tI7rAcwNMqjJ8egLNns4aioBl+zyTr0BmQ62yLE4TQCGPtU7AQ0BpIFuQqNSyhirZ4eLVnNXocad ctFN8sfz1OnWF1PBAG1rnE0Fx0iAksqW/wAqEUliT7CKsWV27TfgtoFwAW3Xa9vdTt8D1A7/BWhX wPIeUWUxGrI95zU+tyOpxP0Exv4APk9l9b0QUfc7uFd8n2DwfFUktio+kWwHndl6RqI3/66wd0EO cL65GIlFt4ueXvEoAV+MOTCTijuUx5fio/EE3t8dAeuJhKq48xdILZi4Di/3IgAAACV0RVh0ZGF0 ZTpjcmVhdGUAMjAyMC0xMC0wMVQwMToyMTo1OSswMDowMHDTjOgAAAAldEVYdGRhdGU6bW9kaWZ5 ADIwMjAtMTAtMDFUMDE6MjE6NTkrMDA6MDABjjRUAAAAAElFTkSuQmCC X-Now-Playing: The Breeders's _Off You_: "Little Fury" Date: Thu, 01 Oct 2020 03:30:01 +0200 In-Reply-To: <87tuvfc4ur.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Wed, 30 Sep 2020 14:49:32 -0700") Message-ID: <87d022wx5y.fsf@gnus.org> 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: Eric Abrahamsen writes: > So that's what it's for! That's a mystery solved. It appears that only > nntp is asynchronous: at least, it's the only backend that implements > `gnus-asynchronous-p'. 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.0 (/) X-Debbugs-Envelope-To: 43682 Cc: 43682@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eric Abrahamsen writes: > So that's what it's for! That's a mystery solved. It appears that only > nntp is asynchronous: at least, it's the only backend that implements > `gnus-asynchronous-p'. Aha. nnimap should, too. > nntp.el also contains `nntp-async-{wait,stop-trigger}', but as far as I > can tell that has nothing to do with gnus-async.el stuff (?). That's the > code that appears to make use of "extra processes per server", and > nnimap doesn't have any of that. Yes, that's a separate thing... > Not so far as I can tell. sieve.el and sieve-mode.el don't have anything > to do with Gnus, and gnus-sieve.el is just about building sieve scripts > from Gnus splitting rules. (Now that you mention it, it would be nice if > there were a command to edit an IMAP server's sieve scripts from the > *Server* buffer.) Right. I think there was once some talk about this stuff, but oy vey the years... > I'm inclined to delete the alist altogether, but if we keep it at least > I can give it a docstring. No, we should keep it and implement the stuff for gnus-asynchronous-p in nnimap, too. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 01 01:09:21 2020 Received: (at 43682) by debbugs.gnu.org; 1 Oct 2020 05:09:21 +0000 Received: from localhost ([127.0.0.1]:33818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNqqH-0000rI-JY for submit@debbugs.gnu.org; Thu, 01 Oct 2020 01:09:21 -0400 Received: from ericabrahamsen.net ([52.70.2.18]:48176 helo=mail.ericabrahamsen.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNqqF-0000r3-28 for 43682@debbugs.gnu.org; Thu, 01 Oct 2020 01:09:20 -0400 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 B0F6AFA5B6; Thu, 1 Oct 2020 05:09:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1601528952; bh=yqeGwFm7UjvwJDTlbpJI+bLXYb8vIoxiNW99RPEfrJA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=T0dCZeVW5ynqEbUZTiV+cF5YmBDrJxKo/Plgm4QEt5kqrac2dk0al4mO4orYpBRD4 mwsx2rhg0+9uQV2U3HMjbQ4v/l9Et0PmzeJzt63S6EUxrwUPHfzNb8L7roGI/mLHJz 4Shz923KBhqfbbboE9pbd44/lX3euvS62Q3f0Ghw= From: Eric Abrahamsen To: Lars Ingebrigtsen Subject: Re: bug#43682: 28.0.50; Clean up nnimap server buffers? 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> Date: Wed, 30 Sep 2020 22:09:11 -0700 In-Reply-To: <87d022wx5y.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 01 Oct 2020 03:30:01 +0200") Message-ID: <871rii7cso.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43682 Cc: 43682@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain On 10/01/20 03:30 AM, Lars Ingebrigtsen wrote: > Eric Abrahamsen writes: > >> So that's what it's for! That's a mystery solved. It appears that only >> nntp is asynchronous: at least, it's the only backend that implements >> `gnus-asynchronous-p'. > > Aha. nnimap should, too. > >> nntp.el also contains `nntp-async-{wait,stop-trigger}', but as far as I >> can tell that has nothing to do with gnus-async.el stuff (?). That's the >> code that appears to make use of "extra processes per server", and >> nnimap doesn't have any of that. > > Yes, that's a separate thing... > >> Not so far as I can tell. sieve.el and sieve-mode.el don't have anything >> to do with Gnus, and gnus-sieve.el is just about building sieve scripts >> from Gnus splitting rules. (Now that you mention it, it would be nice if >> there were a command to edit an IMAP server's sieve scripts from the >> *Server* buffer.) > > Right. I think there was once some talk about this stuff, but oy vey > the years... I'll add it to my own todo list, where it can likewise languish for years. >> I'm inclined to delete the alist altogether, but if we keep it at least >> I can give it a docstring. > > No, we should keep it and implement the stuff for gnus-asynchronous-p in > nnimap, too. 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'. 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... Eric --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=CleanupImapBuffers.diff diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index d797e893f5..bceba574ca 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -407,8 +407,19 @@ nnimap-keepalive (time-subtract now (nnimap-last-command-time nnimap-object)))) - (ignore-errors ;E.g. "buffer foo has no process". - (nnimap-send-command "NOOP")))))))) + (ignore-errors + (nnimap-send-command "NOOP")) + ;; If our connection has died in the meantime, clean it + ;; and its buffer up. + (unless (memq (process-status (get-buffer-process buffer)) + '(open run)) + (setq nnimap-process-buffers + (delq buffer nnimap-process-buffers)) + (setq nnimap-connection-alist + (seq-filter (lambda (elt) + (null (eq buffer (cdr elt))) + nnimap-connection-alist))) + (kill-buffer buffer)))))))) (defun nnimap-open-connection (buffer) ;; Be backwards-compatible -- the earlier value of nnimap-stream was @@ -1910,6 +1921,10 @@ nnimap-find-connection '(open run))) (get-buffer-process (cadr entry)) (setq nnimap-connection-alist (delq entry nnimap-connection-alist)) + (setq nnimap-process-buffers + (delq (cadr entry) nnimap-process-buffers)) + (when (buffer-live-p (cadr entry)) + (kill-buffer (cadr entry))) nil)))) ;; Leave room for `open-network-stream' to issue a couple of IMAP --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 01 12:01:30 2020 Received: (at 43682) by debbugs.gnu.org; 1 Oct 2020 16:01:31 +0000 Received: from localhost ([127.0.0.1]:38029 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kO11O-0005zz-L2 for submit@debbugs.gnu.org; Thu, 01 Oct 2020 12:01:30 -0400 Received: from quimby.gnus.org ([95.216.78.240]:60524) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kO11M-0005zk-86 for 43682@debbugs.gnu.org; Thu, 01 Oct 2020 12:01:28 -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=q92C8/5+wrRLz7GTOyvG0b9WZPhSsfFNIgZLIEb85+I=; b=B6u8tkH4uqMW41tXkj+xrv1TRo 6mPYggjzRsp3iBa90Usha0xXw9KKN5KvB/fxFNdc0ssTdiBbl3De4AS2mRx4d1+qYbAztrVLZb3c/ Du6toy4uqPqRIki8QdNlKoGI8YDRSvvumnYqo+YCjgBwGB6iFjbzO+O+mwyg3XiDfMHc=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kO11A-0000Co-Pl; Thu, 01 Oct 2020 18:01:21 +0200 From: Lars Ingebrigtsen To: Eric Abrahamsen Subject: Re: bug#43682: 28.0.50; Clean up nnimap server buffers? 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> X-Now-Playing: Boris's _NO_: "Kikinoue" Date: Thu, 01 Oct 2020 18:01:15 +0200 In-Reply-To: <871rii7cso.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Wed, 30 Sep 2020 22:09:11 -0700") Message-ID: <87o8lmq6k4.fsf@gnus.org> 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: 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-proc [...] 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.0 (/) X-Debbugs-Envelope-To: 43682 Cc: 43682@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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. > 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'. Otherwise looks fine to me (but I haven't tested the code). -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 01 13:25:11 2020 Received: (at 43682) by debbugs.gnu.org; 1 Oct 2020 17:25:12 +0000 Received: from localhost ([127.0.0.1]:38165 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kO2KN-0001ub-Nb for submit@debbugs.gnu.org; Thu, 01 Oct 2020 13:25:11 -0400 Received: from ericabrahamsen.net ([52.70.2.18]:44928 helo=mail.ericabrahamsen.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kO2KL-0001uJ-7u for 43682@debbugs.gnu.org; Thu, 01 Oct 2020 13:25:11 -0400 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 61D4CFA08E; Thu, 1 Oct 2020 17:25:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1601573102; bh=l7qRM+mkBMZiJ/t3GEu148YnVaFRGbwVv6N9oW6BtRw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Bh4fBcGW2hrYyOWbj5CMXE0D4B9MW1YurFx/SKRWw1ndjFkLByLAfmHu++U9cGqDS 19dFCWjjXIqRT//CUccXDZxlHleka0/+3uFWTQjp7LTMu+atBDI6kj/zRCVNxdh5gd 5RuzrEsIF9AwhCzW8XeBA3gG423vCHrGJZnM9p68= From: Eric Abrahamsen To: Lars Ingebrigtsen Subject: Re: bug#43682: 28.0.50; Clean up nnimap server buffers? 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> Date: Thu, 01 Oct 2020 10:25:00 -0700 In-Reply-To: <87o8lmq6k4.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 01 Oct 2020 18:01:15 +0200") Message-ID: <87sgax6eqb.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 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43682 Cc: 43682@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 11 08:53:36 2021 Received: (at 43682) by debbugs.gnu.org; 11 Oct 2021 12:53:36 +0000 Received: from localhost ([127.0.0.1]:57050 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZuoC-000155-9H for submit@debbugs.gnu.org; Mon, 11 Oct 2021 08:53:36 -0400 Received: from mail-pl1-f173.google.com ([209.85.214.173]:43819) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZuo9-00014X-0I for 43682@debbugs.gnu.org; Mon, 11 Oct 2021 08:53:33 -0400 Received: by mail-pl1-f173.google.com with SMTP id y1so11223293plk.10 for <43682@debbugs.gnu.org>; Mon, 11 Oct 2021 05:53:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=8YcX6MEYSjNwICgImANKnrxfRbMJHcbSGJ5jNwGyJOM=; b=jSIocXQRViK8kA/2wRSuDaP7PpfW+7cTQpigmsv8hrpKBaFplbcELyafBo+wZtbmMg H9XIr5p4TeET7FtzrhX+IT9rR7AJsgSxuAD6E1Ybyxq3sijYxcb86pPr6vxSSCL4ItEG Kytz3FKG2ps0cWFxqoATbgFUzkGn/g3UQR7qLuxpRRqtO6/9x+oglV+87A6u3Kb6jAw4 C5Q0K1o/TW69TcEQeJpOE49MeKOTgpjdRfKz7G1HoCDP0FmcOgXW9TAk6k/V1h/sH+es eLffHFN1zyxFi+saQ7+msiHRr6wUX1Ao/82Jfqbka75rz9yInz/eNMIQms4MfLpxNA9H yxuw== X-Gm-Message-State: AOAM531c6x8SJIqunFi6deILJQ4e+5Pu4FdcxycIwDVWnDFXbF8WKZwx RlVQpiA28nADZcUheNiAVmqAsPPeHzu9K8VJCW1pXVff X-Google-Smtp-Source: ABdhPJzjjcHWrDoQF3YjB7/5gtDjkynqWLzrvWZKT5g8R/eu0OcA2GzVHX+aihTjrXqqELmjlvOxAXgJOjTZJQ9iL68= X-Received: by 2002:a17:90a:5583:: with SMTP id c3mr29249919pji.133.1633956807350; Mon, 11 Oct 2021 05:53:27 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 11 Oct 2021 05:53:26 -0700 From: Stefan Kangas In-Reply-To: <87sgax6eqb.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Thu, 01 Oct 2020 10:25:00 -0700") 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> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) MIME-Version: 1.0 Date: Mon, 11 Oct 2021 05:53:26 -0700 Message-ID: Subject: Re: bug#43682: 28.0.50; Clean up nnimap server buffers? To: Eric Abrahamsen Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 43682 Cc: Lars Ingebrigtsen , 43682@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) 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? From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 11 10:42:03 2021 Received: (at 43682) by debbugs.gnu.org; 11 Oct 2021 14:42:03 +0000 Received: from localhost ([127.0.0.1]:60650 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZwV8-0007BK-8A for submit@debbugs.gnu.org; Mon, 11 Oct 2021 10:42:03 -0400 Received: from mail.ericabrahamsen.net ([52.70.2.18]:41834) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZwV1-0007Ac-T0 for 43682@debbugs.gnu.org; Mon, 11 Oct 2021 10:42:00 -0400 Received: from localhost (c-71-197-232-156.hsd1.wa.comcast.net [71.197.232.156]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 110F3FA644; Mon, 11 Oct 2021 14:41:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1633963309; bh=l13G8aQ/H940QdTmplU6E+iqDJhgP7urTCJC7J0/oDg=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=MvMJb3GkI291APhQ/D4B66ebFoxCudxKxHLJm7isd8APDfm7ZMpBhN0pLuQg6qK00 0Mt2jqwe5boKhOQotXSBZ/nuC0J0unn5uQaukYMZmRTSB8aRf44BsPdK71tHBeBOQA ogt4rIB86353PBdZcwHrKSzqXqCK+v/cnhNJs6zw= From: Eric Abrahamsen To: Stefan Kangas Subject: Re: bug#43682: 28.0.50; Clean up nnimap server buffers? 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> Date: Mon, 11 Oct 2021 07:41:47 -0700 In-Reply-To: (Stefan Kangas's message of "Mon, 11 Oct 2021 05:53:26 -0700") Message-ID: <87a6jflj2s.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43682 Cc: Lars Ingebrigtsen , 43682@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Stefan Kangas writes: > 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? Hmm, I found a couple of typos in it, then I ran it for a bit, then got distracted and backed it out in favor of something else, and then... I think it should be okay to push. I'll try a bit of explicit testing, then push later today. Thanks for the reminder! From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 12 16:50:28 2021 Received: (at 43682-done) by debbugs.gnu.org; 12 Oct 2021 20:50:28 +0000 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 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 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= From: Eric Abrahamsen To: Stefan Kangas Subject: Re: bug#43682: 28.0.50; Clean up nnimap server buffers? 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> Date: Tue, 12 Oct 2021 13:50:17 -0700 In-Reply-To: (Stefan Kangas's message of "Mon, 11 Oct 2021 05:53:26 -0700") Message-ID: <87wnmivugm.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43682-done Cc: Lars Ingebrigtsen , 43682-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 12 17:34:05 2021 Received: (at 43682-done) by debbugs.gnu.org; 12 Oct 2021 21:34:05 +0000 Received: from localhost ([127.0.0.1]:54884 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1maPPR-00030D-Mx for submit@debbugs.gnu.org; Tue, 12 Oct 2021 17:34:05 -0400 Received: from mail-pf1-f174.google.com ([209.85.210.174]:33477) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1maPPP-0002zN-Lj for 43682-done@debbugs.gnu.org; Tue, 12 Oct 2021 17:34:04 -0400 Received: by mail-pf1-f174.google.com with SMTP id h125so691246pfe.0 for <43682-done@debbugs.gnu.org>; Tue, 12 Oct 2021 14:34:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=DWNfyveJklHhMAKODhOCfgHVQ0RgtEoBVPLg1sLUs34=; b=xSyMcn9aUGitaKeadGtYN5d55siaAOoO7tVch4R9XDNyqShav29BipJbeDI0EfZKJ8 BqWJ/dwjwpgAoyz0WH79STfZf1ak58v837boEa78UuD4Tt0VSO+26yS+QLO1uvGLTTQ6 9+/Q8ikOVftNqovbrmu7cgPGFrMhcwcLA7JNAqtwbhlaK8fluez4Hjvn7ox/hSfcLleQ IsHeURXgd95BcuNjWZfMQ20ZFQaSawNMF6RP23CNaLrPcjvXEDHA2OkGmJp2oE4iNBov 3MWu1/OpjzyVsUT7R8GG1pceefhM2ruSjwotzE6QkB7gX96DqR5MPlUWpUreWHS48C2/ VF1g== X-Gm-Message-State: AOAM531ZfwEoZadK9+flF+kfvYHrCbYCRkU7DzAPodXbwXKzGiadL0VG hsmOXW4H35YZXl4JE48Rl6Oqm+VseFoDa6EFaLI= X-Google-Smtp-Source: ABdhPJw2LY7DRauaQ2ogTv8NGhnHFMRNyQJJaJgnwqSGPHz4vbLXhI7mN+uR2LDqK93pEVEllp35OixapDUaIDCoZVA= X-Received: by 2002:a63:4717:: with SMTP id u23mr24621530pga.359.1634074437873; Tue, 12 Oct 2021 14:33:57 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 12 Oct 2021 14:33:57 -0700 From: Stefan Kangas In-Reply-To: <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> <87wnmivugm.fsf@ericabrahamsen.net> MIME-Version: 1.0 Date: Tue, 12 Oct 2021 14:33:57 -0700 Message-ID: Subject: Re: bug#43682: 28.0.50; Clean up nnimap server buffers? To: Eric Abrahamsen Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 43682-done Cc: Lars Ingebrigtsen , 43682-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Eric Abrahamsen writes: > 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. Thanks! From unknown Thu Jun 19 14:25:24 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 10 Nov 2021 12:24:12 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator