Received: (at 62044) by debbugs.gnu.org; 27 Dec 2024 23:46:49 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 27 18:46:49 2024 Received: from localhost ([127.0.0.1]:48011 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tRK2b-0007QX-3l for submit <at> debbugs.gnu.org; Fri, 27 Dec 2024 18:46:49 -0500 Received: from mail-108-mta8.mxroute.com ([136.175.108.8]:40463) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <jp@HIDDEN>) id 1tRK2Z-0007QM-4O for 62044 <at> debbugs.gnu.org; Fri, 27 Dec 2024 18:46:48 -0500 Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta8.mxroute.com (ZoneMTA) with ESMTPSA id 1940a83e8da000310e.001 for <62044 <at> debbugs.gnu.org> (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 27 Dec 2024 23:46:44 +0000 X-Zone-Loop: a8d5e042057e5be68aa82b26d49c64f8f12d5af06ee2 X-Originating-IP: [136.175.111.3] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=neverwas.me ; s=x; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To: 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=hC9Vx+VFdD8pfxVj4prrt9SQwvvdF7QvDMH3+9MCenU=; b=ik3kkogRLhUA055GFPMgmUD/Ak 3YSLaPcH6aY8K8on+Fpd3NkHkesOED4n5Porm83B+ePCmVABnVsEcBj/GxhlnS0R7lJlYNveDpx/P PlyKCCJ5Y9WA/Wdf5LAF5RkoSqGBwJHldOKhNIdQk37rNI+79Sq/7pnykzSsVGe75qe+dwnwlCyVN iq+ELK6MLMPfB5ac57bs+w/E1NBiD9UaIukMnY6WcQnpSDBfLpOZi+Lgnk8i0ZVOnZhz8QHAj5czc RarM05S0BZZ4KsUERJfBBLMhwPthHADvGfnK1heSeTyZZ3j5bS43qY6gjzF8roaxODzG+iSDNrF7I kPmnJnNA==; From: "J.P." <jp@HIDDEN> To: 62044 <at> debbugs.gnu.org Subject: Re: bug#62044: 30.0.50; ERC 5.5: Auto-reconnect is broken In-Reply-To: <87r05z7b1z.fsf@HIDDEN> (J. P.'s message of "Sun, 22 Dec 2024 11:49:28 -0800") References: <87wn3rg49m.fsf@HIDDEN> <871pyqd9qo.fsf@HIDDEN> <87r05z7b1z.fsf@HIDDEN> Date: Fri, 27 Dec 2024 15:46:41 -0800 Message-ID: <87v7v41yfy.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Authenticated-Id: masked@HIDDEN X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 62044 Cc: emacs-erc@HIDDEN, xoddf2 <woddfellow2@HIDDEN> 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 (-) "J.P." <jp@HIDDEN> writes: > "J.P." <jp@HIDDEN> writes: > >> A stop-gap solution for this issue was introduced in ERC 5.6 as >> `erc-server-delayed-check-reconnect', a new function value for the >> option `erc-server-reconnect-function'. There's since been some >> criticism regarding its lack of discoverability, despite it featuring in >> the Sample Configuration of ERC's manual. It's therefore been suggested >> we favor the behavior it enables whenever possible by detecting >> compatible values of `erc-server-connect-function'. Any false negatives >> will hopefully only affect advanced users with nonstandard connectors. >> The following patch tries to implement this. Feedback welcome. > > I ended up installing this (perhaps only temporarily) as > > https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=1c960bda > > At the end of the day, I still question the soundness of resorting to a > protocol exchange to prove that the underlying transport is functioning > properly. However, if no one complains in the next week or two, I'll > close this with the release of 5.6.1. I updated the behavior of `erc-server-delayed-check-reconnect' slightly so it works without :nowait and reuses the probe connection if possible: https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=f5ebe47b One potential problem with the latter approach might be a possible server-enforced timeout if modules take too long to initialize. In any case, if anyone finds these changes unsatisfactory, please say so. Thanks.
bug-gnu-emacs@HIDDEN
:bug#62044
; Package emacs
.
Full text available.Received: (at 62044) by debbugs.gnu.org; 22 Dec 2024 19:49:38 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 22 14:49:38 2024 Received: from localhost ([127.0.0.1]:51998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tPRxK-0006DK-Cz for submit <at> debbugs.gnu.org; Sun, 22 Dec 2024 14:49:38 -0500 Received: from mail-108-mta112.mxroute.com ([136.175.108.112]:41615) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <jp@HIDDEN>) id 1tPRxH-0006DB-Q4 for 62044 <at> debbugs.gnu.org; Sun, 22 Dec 2024 14:49:36 -0500 Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta112.mxroute.com (ZoneMTA) with ESMTPSA id 193efeaf087000310e.001 for <62044 <at> debbugs.gnu.org> (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Sun, 22 Dec 2024 19:49:31 +0000 X-Zone-Loop: 9fcbb8db7f02f62490ec0febd0e94b26f806a7b2ab2e X-Originating-IP: [136.175.111.3] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=neverwas.me ; s=x; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To: 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=BEGLCGPpaLEmkEpHHaeI6hVHUxsxipEExRuMU92SoCI=; b=NJ+4gKGS4odBJVIwU4TB5t7aq7 faAncxCSEBow7lhloqq+4rQPFnIRYWs37wk8ZJDlL5fX+AGd7FVRcCeVauEeQGtihvRNCXO2cDgMw kd6mayy4J6TCbH1t+cEcK9hJtvTSJk7OQ1rq56H66HmYiStmqnfHOY69DeYg/0nJGhmZnLf8Az6uQ NFKucOFMlzH0JV/Aij95UUrXAdqYegwX4x6gljhMd3EYdvSNj7wPnGskraQWBvgGB1FB8GEef0+1E 95c9Qa+IL/PNXQHXXAiPyhuQEY7pG9CUHn2KzQWZDyy2z9QktACnsOTEkq1n9JES7SsqvO8i4b5x5 GKekboWA==; From: "J.P." <jp@HIDDEN> To: 62044 <at> debbugs.gnu.org Subject: Re: bug#62044: 30.0.50; ERC 5.5: Auto-reconnect is broken In-Reply-To: <871pyqd9qo.fsf@HIDDEN> (J. P.'s message of "Sun, 01 Dec 2024 19:50:07 -0800") References: <87wn3rg49m.fsf@HIDDEN> <871pyqd9qo.fsf@HIDDEN> Date: Sun, 22 Dec 2024 11:49:28 -0800 Message-ID: <87r05z7b1z.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Authenticated-Id: masked@HIDDEN X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 62044 Cc: emacs-erc@HIDDEN, xoddf2 <woddfellow2@HIDDEN> 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 (-) "J.P." <jp@HIDDEN> writes: > A stop-gap solution for this issue was introduced in ERC 5.6 as > `erc-server-delayed-check-reconnect', a new function value for the > option `erc-server-reconnect-function'. There's since been some > criticism regarding its lack of discoverability, despite it featuring in > the Sample Configuration of ERC's manual. It's therefore been suggested > we favor the behavior it enables whenever possible by detecting > compatible values of `erc-server-connect-function'. Any false negatives > will hopefully only affect advanced users with nonstandard connectors. > The following patch tries to implement this. Feedback welcome. I ended up installing this (perhaps only temporarily) as https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=1c960bda At the end of the day, I still question the soundness of resorting to a protocol exchange to prove that the underlying transport is functioning properly. However, if no one complains in the next week or two, I'll close this with the release of 5.6.1. Thanks.
bug-gnu-emacs@HIDDEN
:bug#62044
; Package emacs
.
Full text available.Received: (at 62044) by debbugs.gnu.org; 2 Dec 2024 03:50:20 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 01 22:50:20 2024 Received: from localhost ([127.0.0.1]:53776 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tHxRz-0003qT-MX for submit <at> debbugs.gnu.org; Sun, 01 Dec 2024 22:50:20 -0500 Received: from mail-108-mta226.mxroute.com ([136.175.108.226]:34123) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <jp@HIDDEN>) id 1tHxRv-0003n9-DX for 62044 <at> debbugs.gnu.org; Sun, 01 Dec 2024 22:50:18 -0500 Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta226.mxroute.com (ZoneMTA) with ESMTPSA id 193857d70330003e01.001 for <62044 <at> debbugs.gnu.org> (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Mon, 02 Dec 2024 03:50:10 +0000 X-Zone-Loop: 031bc4e0bf1ebd9122e73c5a4ad44eaa01702ac06ab3 X-Originating-IP: [136.175.111.3] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=neverwas.me ; s=x; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To: 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=/vm+V6u8jcr65PjWJ527po1JUy1gKZ7PaIvAo/0U36w=; b=Wy4cIYsHwmtsSceJpPT5bC8oWN jjkpZ/H6tdGeAwwjrVfLz17QMNSwidHSriKdqlWI/h2bf3ZQQS4VFN6rg2pFSKPjYBERZi86Cot9D WsFVDzNVlST1pjyY/pW5Lj1/bEok1lH3wbZghob4c7IROq+OkMacmBrUHbpznwuLu4YX3T/NBFkDD xkkzbnERrxIlTLhC+MAAwhqX4Jih3DGaSBSPybbOm4j8b7aeHMqo6fMtASKqBzr3ycFYKP1WGP3bb nFLOBqqHLCzYF0I45gWf5MTbR6+c0wO2RV0R21LmgRDMMGFMUO0HKGfwT/CROTsZTRLRsDoD5Hjmb Nv4WyoHA==; From: "J.P." <jp@HIDDEN> To: 62044 <at> debbugs.gnu.org Subject: Re: bug#62044: 30.0.50; ERC 5.5: Auto-reconnect is broken In-Reply-To: <87wn3rg49m.fsf@HIDDEN> (xoddf2's message of "Tue, 07 Mar 2023 22:12:53 -0800") References: <87wn3rg49m.fsf@HIDDEN> Date: Sun, 01 Dec 2024 19:50:07 -0800 Message-ID: <871pyqd9qo.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Authenticated-Id: masked@HIDDEN X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 62044 Cc: emacs-erc@HIDDEN, xoddf2 <woddfellow2@HIDDEN> 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 A stop-gap solution for this issue was introduced in ERC 5.6 as `erc-server-delayed-check-reconnect', a new function value for the option `erc-server-reconnect-function'. There's since been some criticism regarding its lack of discoverability, despite it featuring in the Sample Configuration of ERC's manual. It's therefore been suggested we favor the behavior it enables whenever possible by detecting compatible values of `erc-server-connect-function'. Any false negatives will hopefully only affect advanced users with nonstandard connectors. The following patch tries to implement this. Feedback welcome. Thanks. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-5.6.1-Add-smarter-default-for-erc-server-reconnect-f.patch From 8383193362db77d814747d9f2074fe514359e76c Mon Sep 17 00:00:00 2001 From: "F. Jason Park" <jp@HIDDEN> Date: Fri, 29 Nov 2024 15:56:47 -0800 Subject: [PATCH] [5.6.1] Add smarter default for erc-server-reconnect-function * doc/misc/erc.texi (Sample Configuration): Remove customization in `use-package' declaration for `erc-server-reconnect-function' as well as related language in the customization walk-through. Do this because the new default incorporates `erc-server-delayed-check-reconnect'. * etc/ERC-NEWS: Announce new default for `erc-server-reconnect-function'. * lisp/erc/erc-backend.el (erc-server-reconnect-function): Change default to `erc-server-prefer-check-reconnect'. (erc-server-delayed-check-reconnect): Use `process-send-string' instead of `send-string'. (erc-server-known-check-aware-connectors): New variable. (erc-server-prefer-check-reconnect): New function. * test/lisp/erc/erc-scenarios-base-auto-recon.el (erc-scenarios-base-auto-recon-unavailable) (erc-scenarios-base-auto-recon-no-proto): Remove unnecessary `erc-server-reconnect-function' binding because the new default still incorporates the behavior under test that's exhibited by `erc-server-delayed-check-reconnect'. * test/lisp/erc/erc-scenarios-base-buffer-display.el (erc-scenarios-base-buffer-display--reconnect-common): * test/lisp/erc/erc-scenarios-base-compat-rename-bouncer.el (erc-scenarios-common--base-compat-no-rename-bouncer): * test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-base.el (erc-scenarios-base-netid-bouncer--recon-base): * test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-both.el (erc-scenarios-base-netid-bouncer--recon-both): * test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-id.el (erc-scenarios-base-netid-bouncer--reconnect-id-foo) (erc-scenarios-base-netid-bouncer--reconnect-id-bar): * test/lisp/erc/erc-scenarios-base-reconnect.el (erc-scenarios-base-reconnect-timer) (erc-scenarios-base-cancel-reconnect): * test/lisp/erc/erc-scenarios-services-misc.el (erc-scenarios-services-misc--reconnect-retry-nick): * test/lisp/erc/erc-scenarios-stamp.el (erc-scenarios-stamp--date-mode/reconnect): Explicitly bind `erc-server-reconnect-function' to `erc-server-delayed-reconnect', the former default. (Bug#62044) --- doc/misc/erc.texi | 37 ++++++------------- etc/ERC-NEWS | 6 +++ lisp/erc/erc-backend.el | 21 +++++++++-- .../lisp/erc/erc-scenarios-base-auto-recon.el | 8 ++-- .../erc/erc-scenarios-base-buffer-display.el | 1 + ...rc-scenarios-base-compat-rename-bouncer.el | 1 + ...scenarios-base-netid-bouncer-recon-base.el | 3 +- ...scenarios-base-netid-bouncer-recon-both.el | 4 +- ...c-scenarios-base-netid-bouncer-recon-id.el | 6 ++- test/lisp/erc/erc-scenarios-base-reconnect.el | 2 + test/lisp/erc/erc-scenarios-services-misc.el | 1 + test/lisp/erc/erc-scenarios-stamp.el | 1 + 12 files changed, 56 insertions(+), 35 deletions(-) diff --git a/doc/misc/erc.texi b/doc/misc/erc.texi index 0f6b6b8c5be..d7791c04357 100644 --- a/doc/misc/erc.texi +++ b/doc/misc/erc.texi @@ -1340,8 +1340,7 @@ Sample Configuration ;; Scroll all windows to prompt when submitting input. (erc-scrolltobottom-all t) - ;; Reconnect automatically using a fancy strategy. - (erc-server-reconnect-function #'erc-server-delayed-check-reconnect) + ;; Wait a bit longer between automatic reconnect attempts. (erc-server-reconnect-timeout 30) ;; Show new buffers in the current window instead of a split. @@ -1444,30 +1443,18 @@ Sample Configuration finished, hit @kbd{C-x C-s} or click @samp{[Apply and Save]} atop the buffer. -Now do the same for another couple options, this time having to do -with automatic reconnection. But instead of searching for their print -names, try running @kbd{M-x customize-option @key{RET} @samp{<option>} -@key{RET}}, replacing @samp{<option>} with: +Now do the same for another option, this time having to do with +automatic reconnection. But instead of searching for its print name, +try running @kbd{M-x customize-option @key{RET} +@samp{erc-server-reconnect-timeout} @key{RET}}. (If it helps, hit +@key{TAB} for completion.) As you may have noticed, when customizing +options individually, each buffer displays but a single option's widget. +For @code{erc-server-reconnect-timeout}, you'll encounter a text field +(instead of a button), which works like those in a typical web form. +Enter @samp{30} and either hit @kbd{C-x C-s} to save or @key{TAB} over +to @samp{[State]} and hit @key{RET} followed by @kbd{1} to persists your +changes. -@itemize @bullet -@item @code{erc-server-reconnect-function}, a function -@item @code{erc-server-reconnect-timeout}, a number -@end itemize - -@noindent -(If it helps, hit @key{TAB} for completion.) As you may have noticed, -when customizing options individually, each buffer displays but a -single option's widget. When you get to the buffer for ``Erc Server -Reconnect Function'', you'll see that @samp{[Toggle]} has been -replaced with @samp{[Value Menu]} and that clicking it reveals three -choices in a pop-up window. Enter @kbd{1} to select -@code{erc-server-delayed-check-reconnect} before @key{TAB}'ing over to -@samp{[State]} and hitting @key{RET}. Enter @kbd{1} again, this time -to persists your changes. - -For the final option, @code{erc-server-reconnect-timeout}, you'll -encounter a text field (instead of a button), which works like those -in a typical web form. Enter @samp{30} and hit @kbd{C-x C-s} to save. Just for fun, click the group link for @samp{Erc Server} at the bottom of the buffer. You could just as well have set the last two options from this ``custom group'' buffer alone, which very much resembles the diff --git a/etc/ERC-NEWS b/etc/ERC-NEWS index f3c8645f02d..b7b49956d06 100644 --- a/etc/ERC-NEWS +++ b/etc/ERC-NEWS @@ -62,6 +62,12 @@ of concerns and the newer module's "experimental" status, the migration was deemed worth any potential disruption, despite this being a point release. ERC appreciates your understanding in this matter. +** Option 'erc-server-reconnect-function' has a new default. +ERC 5.6 added 'erc-server-delayed-check-reconnect', whose "probing" +strategy worked better for most users. While compatibility concerns +prevented it from becoming the new 'erc-server-reconnect-function' +outright, a new solution has emerged that defers to it when sensible. + ** Entry-point command 'erc-tls' once again considers option 'erc-port'. In its zeal to enforce a preference for TLS connections, ERC 5.5 went a bit far in disregarding the useful user option 'erc-port'. When called diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index e72fa036f17..0d39f3949f9 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -429,15 +429,16 @@ erc-server-reconnect-timeout means of handling this situation on some servers." :type 'number) -(defcustom erc-server-reconnect-function 'erc-server-delayed-reconnect +(defcustom erc-server-reconnect-function 'erc-server-prefer-check-reconnect "Function called by the reconnect timer to create a new connection. Called with a server buffer as its only argument. Potential uses include exponential backoff and probing for connectivity prior to dialing. Use `erc-schedule-reconnect' to instead try again later and optionally alter the attempts tally." - :package-version '(ERC . "5.5") + :package-version '(ERC . "5.6.1") :type '(choice (function-item erc-server-delayed-reconnect) (function-item erc-server-delayed-check-reconnect) + (function-item erc-server-prefer-check-reconnect) function)) (defcustom erc-split-line-length 440 @@ -879,7 +880,7 @@ erc-server-delayed-check-reconnect (sentinel (lambda (proc event) (pcase event ("open\n" - (run-at-time nil nil #'send-string proc + (run-at-time nil nil #'process-send-string proc (format "PING %d\r\n" (time-convert nil 'integer)))) ((or "connection broken by remote peer\n" @@ -901,6 +902,20 @@ erc-server-delayed-check-reconnect (set-process-sentinel proc sentinel)) (file-error (funcall reschedule nil))))))) +(defvar erc-server-known-check-aware-connectors + '(erc-open-tls-stream erc-open-network-stream) + "Functions compatible with `erc-server-delayed-check-reconnect'.") + +(defun erc-server-prefer-check-reconnect (buffer) + "Defer to another reconnector based on BUFFER's `erc-session-connector'. +When it's a member of `erc-server-known-check-aware-connectors', prefer +`erc-server-delayed-check-reconnect'. Otherwise, use +`erc-server-delayed-reconnect'." + (if (memq (buffer-local-value 'erc-session-connector buffer) + erc-server-known-check-aware-connectors) + (erc-server-delayed-check-reconnect buffer) + (erc-server-delayed-reconnect buffer))) + (defun erc-server-filter-function (process string) "The process filter for the ERC server." (with-current-buffer (process-buffer process) diff --git a/test/lisp/erc/erc-scenarios-base-auto-recon.el b/test/lisp/erc/erc-scenarios-base-auto-recon.el index 808b1d8c4d4..d6a114147b3 100644 --- a/test/lisp/erc/erc-scenarios-base-auto-recon.el +++ b/test/lisp/erc/erc-scenarios-base-auto-recon.el @@ -24,6 +24,10 @@ (let ((load-path (cons (ert-resource-directory) load-path))) (require 'erc-scenarios-common))) +;; This tests `erc-server-delayed-check-reconnect', which is called by +;; `erc-server-prefer-check-reconnect' (the default value of +;; `erc-server-reconnect-function' as of ERC 5.6.1). + (defun erc-scenarios-base-auto-recon--get-unused-port () (let ((server (make-network-process :name "*erc-scenarios-base-auto-recon*" :host "localhost" @@ -42,7 +46,6 @@ erc-scenarios-base-auto-recon-unavailable (port (erc-scenarios-base-auto-recon--get-unused-port)) (erc--server-reconnect-timeout-scale-function (lambda (_) 1)) (erc-server-auto-reconnect t) - (erc-server-reconnect-function #'erc-server-delayed-check-reconnect) (expect (erc-d-t-make-expecter)) (erc-scenarios-common-dialog "base/reconnect") (dumb-server nil)) @@ -89,7 +92,7 @@ erc-scenarios-base-auto-recon-unavailable (erc-cmd-RECONNECT "cancel") (funcall expect 10 "canceled"))))) -;; In this test, a listener accepts but doesn't respond to any messages. +;; Here, a listener accepts but doesn't respond to any messages. (ert-deftest erc-scenarios-base-auto-recon-no-proto () :tags '(:expensive-test) @@ -102,7 +105,6 @@ erc-scenarios-base-auto-recon-no-proto (erc--server-reconnect-timeout-scale-function (lambda (_) 1)) (erc--server-reconnect-timeout-check 0.5) (erc-server-auto-reconnect t) - (erc-server-reconnect-function #'erc-server-delayed-check-reconnect) (expect (erc-d-t-make-expecter))) (ert-info ("Session succeeds but cut short") diff --git a/test/lisp/erc/erc-scenarios-base-buffer-display.el b/test/lisp/erc/erc-scenarios-base-buffer-display.el index 5c3c526f86d..137db955db5 100644 --- a/test/lisp/erc/erc-scenarios-base-buffer-display.el +++ b/test/lisp/erc/erc-scenarios-base-buffer-display.el @@ -40,6 +40,7 @@ erc-scenarios-base-buffer-display--reconnect-common (port (process-contact dumb-server :service)) (expect (erc-d-t-make-expecter)) (erc-server-flood-penalty 0.1) + (erc-server-reconnect-function #'erc-server-delayed-reconnect) (erc-server-auto-reconnect t) erc-autojoin-channels-alist) diff --git a/test/lisp/erc/erc-scenarios-base-compat-rename-bouncer.el b/test/lisp/erc/erc-scenarios-base-compat-rename-bouncer.el index d1124269e0a..0bba0446ce6 100644 --- a/test/lisp/erc/erc-scenarios-base-compat-rename-bouncer.el +++ b/test/lisp/erc/erc-scenarios-base-compat-rename-bouncer.el @@ -43,6 +43,7 @@ erc-scenarios-common--base-compat-no-rename-bouncer (chan-buf-foo (format "#chan@HIDDEN:%d" port)) (chan-buf-bar (format "#chan@HIDDEN:%d<2>" port)) (expect (erc-d-t-make-expecter)) + (erc-server-reconnect-function #'erc-server-delayed-reconnect) (erc-server-auto-reconnect auto) erc-server-buffer-foo erc-server-process-foo erc-server-buffer-bar erc-server-process-bar) diff --git a/test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-base.el b/test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-base.el index e5453c40e56..04ccb86643b 100644 --- a/test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-base.el +++ b/test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-base.el @@ -26,6 +26,7 @@ (ert-deftest erc-scenarios-base-netid-bouncer--recon-base () :tags '(:expensive-test) - (erc-scenarios-common--base-network-id-bouncer--reconnect nil nil)) + (let ((erc-server-reconnect-function #'erc-server-delayed-reconnect)) + (erc-scenarios-common--base-network-id-bouncer--reconnect nil nil))) ;;; erc-scenarios-base-netid-bouncer-recon-base.el ends here diff --git a/test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-both.el b/test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-both.el index 09ddcef5fa3..f0939d6204a 100644 --- a/test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-both.el +++ b/test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-both.el @@ -27,6 +27,8 @@ (ert-deftest erc-scenarios-base-netid-bouncer--recon-both () :tags '(:expensive-test) - (erc-scenarios-common--base-network-id-bouncer--reconnect 'foo-id 'bar-id)) + (let ((erc-server-reconnect-function #'erc-server-delayed-reconnect)) + (erc-scenarios-common--base-network-id-bouncer--reconnect 'foo-id + 'bar-id))) ;;; erc-scenarios-base-netid-bouncer-recon-both.el ends here diff --git a/test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-id.el b/test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-id.el index 253ab4f72c9..d77a4287976 100644 --- a/test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-id.el +++ b/test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-id.el @@ -26,11 +26,13 @@ (ert-deftest erc-scenarios-base-netid-bouncer--reconnect-id-foo () :tags '(:expensive-test) - (erc-scenarios-common--base-network-id-bouncer--reconnect 'foo-id nil)) + (let ((erc-server-reconnect-function #'erc-server-delayed-reconnect)) + (erc-scenarios-common--base-network-id-bouncer--reconnect 'foo-id nil))) (ert-deftest erc-scenarios-base-netid-bouncer--reconnect-id-bar () :tags '(:expensive-test) - (erc-scenarios-common--base-network-id-bouncer--reconnect nil 'bar-id)) + (let ((erc-server-reconnect-function #'erc-server-delayed-reconnect)) + (erc-scenarios-common--base-network-id-bouncer--reconnect nil 'bar-id))) ;;; erc-scenarios-base-netid-bouncer-recon-id.el ends here diff --git a/test/lisp/erc/erc-scenarios-base-reconnect.el b/test/lisp/erc/erc-scenarios-base-reconnect.el index 6f968b9fcbc..2dc34362fbf 100644 --- a/test/lisp/erc/erc-scenarios-base-reconnect.el +++ b/test/lisp/erc/erc-scenarios-base-reconnect.el @@ -37,6 +37,7 @@ erc-scenarios-base-reconnect-timer (dumb-server (erc-d-run "localhost" t 'timer 'timer 'timer-last)) (port (process-contact dumb-server :service)) (expect (erc-d-t-make-expecter)) + (erc-server-reconnect-function #'erc-server-delayed-reconnect) (erc-server-auto-reconnect t) erc-autojoin-channels-alist erc-server-buffer) @@ -144,6 +145,7 @@ erc-scenarios-base-cancel-reconnect (dumb-server (erc-d-run "localhost" t 'timer 'timer 'timer-last)) (port (process-contact dumb-server :service)) (expect (erc-d-t-make-expecter)) + (erc-server-reconnect-function #'erc-server-delayed-reconnect) (erc-server-auto-reconnect t) erc-autojoin-channels-alist erc-server-buffer) diff --git a/test/lisp/erc/erc-scenarios-services-misc.el b/test/lisp/erc/erc-scenarios-services-misc.el index 47d0bcff41a..ee35e8b93db 100644 --- a/test/lisp/erc/erc-scenarios-services-misc.el +++ b/test/lisp/erc/erc-scenarios-services-misc.el @@ -155,6 +155,7 @@ erc-scenarios-services-misc--reconnect-retry-nick (dumb-server (erc-d-run "localhost" t 'reconnect-retry 'reconnect-retry-again)) (port (process-contact dumb-server :service)) + (erc-server-reconnect-function #'erc-server-delayed-reconnect) (erc-server-auto-reconnect t) (erc-modules `(services-regain sasl ,@erc-modules)) (erc-services-regain-alist diff --git a/test/lisp/erc/erc-scenarios-stamp.el b/test/lisp/erc/erc-scenarios-stamp.el index 8aea091333b..86074a9c35a 100644 --- a/test/lisp/erc/erc-scenarios-stamp.el +++ b/test/lisp/erc/erc-scenarios-stamp.el @@ -188,6 +188,7 @@ erc-scenarios-stamp--date-mode/reconnect ((erc-scenarios-common-dialog "base/reconnect") (erc-server-flood-penalty 0.1) (erc-stamp--tz t) + (erc-server-reconnect-function #'erc-server-delayed-reconnect) (erc-server-auto-reconnect t) ;; Start close to midnight: 2024-06-02T23:58:11.055Z (erc-stamp--current-time (if (< emacs-major-version 29) -- 2.47.0 --=-=-=--
bug-gnu-emacs@HIDDEN
:bug#62044
; Package emacs
.
Full text available.Received: (at 62044) by debbugs.gnu.org; 9 May 2024 06:14:05 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 09 02:14:05 2024 Received: from localhost ([127.0.0.1]:53265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1s4x2b-0003WE-4H for submit <at> debbugs.gnu.org; Thu, 09 May 2024 02:14:05 -0400 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]:42172) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <flexibeast@HIDDEN>) id 1s4x2X-0003VS-Aq for 62044 <at> debbugs.gnu.org; Thu, 09 May 2024 02:14:03 -0400 Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-5dcc4076c13so398974a12.0 for <62044 <at> debbugs.gnu.org>; Wed, 08 May 2024 23:13:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715235209; x=1715840009; darn=debbugs.gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=wZZTEg5z4+Ye5OPPhQ5aCrjk9aYzg1v+seZjYX3QE7E=; b=nTOGKqkXYdTX2NGSqmy+wiHvBo0MPIigzDtC/fMsj7D/AaI2cq96+BdTiUC3aj3ftJ nGDKpZhxyG2/6VZnal+iQHmLAI0ADkaEueXRz0Q6HBEQv26cAh5hGk95slbkCBO8pwxX NPYOpocr/rYNWQG0KMmPxFo80UDkQfjoOuUjSSbtKBIrSTcrS/97y2FDb1wwBminhuff 4Dhxm+NVACKrMIYzvmmP4WSzh3259eDVl/jDiY7sPP9UhYCbbib0/meZKkXAWQLQqgoF 4pwujevvhCgBLXPL0Nbb48O3sWLvIKN4CTDg3R5CPe0FQhSLEDVN+SrpGO6gr2zWrVZl MAMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715235209; x=1715840009; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wZZTEg5z4+Ye5OPPhQ5aCrjk9aYzg1v+seZjYX3QE7E=; b=tnEYnsiqF3eqZHh/i6YnwTeYZVSUwADkwL5m7Vm0PAyq83LZsUqnpXRxSfDb/yH5rJ zGMF75asPqxetGfinKLOwg+/q/gH9zdcd+tcbaPmS3MpbTSwNSGLpy4sbukCI1pBqzK/ BnWUVoYRFk1qZrQ1zRIqh72W0ZMwS8n7m8AqYtcoXPxEYPfv2a40N4vPOjrQ6eqXaXYu gdHR+ZB+v0cz7rQzz1KjTQ19C0zzDvgbklMmYYzboxBu5HfjR9HJ2HTf5bGlIKYb00hV e/IHWalUjhYZ132ZpdlkqMVnW3DKVRpZiPJbj0WDWwH/+9u8e6Y8rp0Pk1IdF/YR/Q1u PaRQ== X-Gm-Message-State: AOJu0YxRLa60hkWu8oORjVLdQ0CFYUiwzcQqcxZRuCmDZxjS/cnfI/06 mzEjfYI//qAVotgWOdJ8DJPoHhYkQ/TfNkeGnFyOKbd2j4sVy5DZ X-Google-Smtp-Source: AGHT+IHvtXxPcTQDriBCwAkN//LXtFIUbNx3sameH9n/9my0tBJ2vKCLSNCPLH6EnouAIV4EZUSEPw== X-Received: by 2002:a17:903:32ce:b0:1e0:c0b9:589e with SMTP id d9443c01a7336-1eefa5746d3mr26287915ad.25.1715235209550; Wed, 08 May 2024 23:13:29 -0700 (PDT) Received: from localhost ([120.21.79.152]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ef0bf316d5sm5743305ad.146.2024.05.08.23.13.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 23:13:29 -0700 (PDT) From: Alexis <flexibeast@HIDDEN> To: "J.P." <jp@HIDDEN> Subject: Re: bug#62044: 30.0.50; ERC 5.5: Auto-reconnect is broken In-Reply-To: <87wmoby69b.fsf@HIDDEN> (J. P.'s message of "Thu, 02 May 2024 19:32:48 -0700") References: <87v8404hn1.fsf@HIDDEN> <87wmoby69b.fsf@HIDDEN> Date: Thu, 09 May 2024 16:13:25 +1000 Message-ID: <875xvnsebe.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 62044 Cc: emacs-erc@HIDDEN, 62044 <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 (-) "J.P." <jp@HIDDEN> writes: > Yes, please install ERC 5.6 when it's released, which should be > any day > now. If you can't wait, you can try out the devel version > [1]. Either > way, make sure to customize the option > `erc-server-reconnect-function' > to `erc-server-delayed-check-reconnect' before connecting. Note > that not > all values of `erc-server-connect-function' are supported. And > yes, if > you could report back with any findings, that'd be great. Ah okay, thanks - i'll keep an eye out for the release, and let you know what i find. :-) Alexis.
bug-gnu-emacs@HIDDEN
:bug#62044
; Package emacs
.
Full text available.Received: (at 62044) by debbugs.gnu.org; 3 May 2024 02:33:16 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 02 22:33:16 2024 Received: from localhost ([127.0.0.1]:46057 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1s2ijc-0002OG-Gj for submit <at> debbugs.gnu.org; Thu, 02 May 2024 22:33:16 -0400 Received: from mail-108-mta252.mxroute.com ([136.175.108.252]:33339) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <jp@HIDDEN>) id 1s2ija-0002O8-Db for 62044 <at> debbugs.gnu.org; Thu, 02 May 2024 22:33:15 -0400 Received: from filter006.mxroute.com ([136.175.111.2] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta252.mxroute.com (ZoneMTA) with ESMTPSA id 18f3c4c17b40008ca2.001 for <62044 <at> debbugs.gnu.org> (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 03 May 2024 02:32:50 +0000 X-Zone-Loop: c35218c2b36c5dcb4eafe8bb26afdf4969e43b1d5272 X-Originating-IP: [136.175.111.2] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=neverwas.me ; s=x; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To: 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=N+0Qt6cesvh5ZuH43ngIRJp103gQa/yHYUgUrBtmA0E=; b=VgaTyOciAeASxDdwyxua5mCUYJ PlZqFoUZ+u430ynmxpv84nEPcisnTAO+I8jcty27V0uRFUf4b2S1bLEvpmeRfYNfTfgI0iNZCjEGr KdPPzusYNatC8A1SP4VKkP8oz/SCknE5319htLNz1/6Y2qLxe3f2A661xM2tKfFDATOfLfOKC3mtp kvZ8J6RJ9uhapC8j6Hd1c01/65b+bnEf6ZQ+7k9KLrEoVfzm32abS093FY/iYsuIi1O9I8Mj7AOp4 4HmaqB21S3K+xaDUCAnpxkchE+rXITu72MF8Z6EtFzlDi+af/l9EZ1IgdMpmpd11NpuqFn/sGcl+v UCFPUcjw==; From: "J.P." <jp@HIDDEN> To: Alexis <flexibeast@HIDDEN> Subject: Re: bug#62044: 30.0.50; ERC 5.5: Auto-reconnect is broken In-Reply-To: <87v8404hn1.fsf@HIDDEN> (Alexis's message of "Mon, 29 Apr 2024 19:56:02 +1000") References: <87v8404hn1.fsf@HIDDEN> Date: Thu, 02 May 2024 19:32:48 -0700 Message-ID: <87wmoby69b.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Authenticated-Id: masked@HIDDEN X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 62044 Cc: emacs-erc@HIDDEN, 62044 <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 (-) Hi Alexis, Alexis <flexibeast@HIDDEN> writes: > i'm also affected by this issue, as a user of the soju bouncer. i'm on Emacs > 29.3. > > i using ERC on my laptop, and my network connection is frequently disconnected > and reconnected: partly because i'm regularly moving around, but also due to > occasional dropouts on my home network. > > Is there anything i might be able to do to help with this? #29 says that > certain changes have been added to HEAD; should i apply those changes and > report back what, if anything, i discover? Yes, please install ERC 5.6 when it's released, which should be any day now. If you can't wait, you can try out the devel version [1]. Either way, make sure to customize the option `erc-server-reconnect-function' to `erc-server-delayed-check-reconnect' before connecting. Note that not all values of `erc-server-connect-function' are supported. And yes, if you could report back with any findings, that'd be great. Thanks, J.P. [1] https://elpa.gnu.org/devel/doc/erc.html#Upgrading
bug-gnu-emacs@HIDDEN
:bug#62044
; Package emacs
.
Full text available.Received: (at 62044) by debbugs.gnu.org; 29 Apr 2024 09:56:33 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 29 05:56:33 2024 Received: from localhost ([127.0.0.1]:56288 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1s1NkO-0005ic-Ms for submit <at> debbugs.gnu.org; Mon, 29 Apr 2024 05:56:32 -0400 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]:42386) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <flexibeast@HIDDEN>) id 1s1NkO-0005iW-0T for 62044 <at> debbugs.gnu.org; Mon, 29 Apr 2024 05:56:32 -0400 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-6f0aeee172dso2892724b3a.1 for <62044 <at> debbugs.gnu.org>; Mon, 29 Apr 2024 02:56:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714384566; x=1714989366; darn=debbugs.gnu.org; h=mime-version:message-id:date:user-agent:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=r2pG/YdprDPRRa0kk700rosCQW563Re6INSebfCI7Aw=; b=MP8Em0ogbq2tCzabEo3f33WuXkArdM6JiF4M9QzGL044ZmjtJ2JUcoZbqyeFu1s5VP v5dKEup0tI6DmxoGTMM90bZqo7ZcyFSBL2/wBaC+hzn5cNKnLboXyR8LEc44gzLrjICT +wUAGkoTFbYqEu/KxU1VOqmSUjr2BmhUo6GgxAAS2a4gu4+ZeMIVtFfN8ZSxfqDkUIpr GcnL/eGgVZjwh/g1EEqOwrSSyfZJ20zH+8kb9AtMDvwwWtQDA5UCIecpu0S/eT4qDyeV dPGIoiizQjk2fB1IeRAXuNoTf9ybZNV/GNrPBPTM9/J1eQ/2ITK2DEozT9lRJPvytLZL KlcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714384566; x=1714989366; h=mime-version:message-id:date:user-agent:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=r2pG/YdprDPRRa0kk700rosCQW563Re6INSebfCI7Aw=; b=ehc/gcUuR8j+CjADp0XiXoIkNVmF3ui1sJXyr84c8D9eAgwJ1Z0sBjgW1cenCrhg5S b+dDPsjOMxckxr/mRMl4sI7yTchbQHct5kE5BTn+4lcXFINSaT/lPsRMcpe5BAkCuJzz Bz3l8V8zISi/vzBJ7rZuhbVfpXP7t4p829GzbQaijD7m39zsTRHkEp/u6KDOg/Qo7mqt xiiZ43OE4rMGPN96xCrFWxvKw1BjjPGZHHG0vimOTS4s+wuOk7DH5wPNV8LddVdb53BQ rrjA6MQp+CR6tWsTR0KtB3KTvD58Eb2Tt1auJ2aBwhtiLBVNv6KAT3ncXhZ0TVmNvEMT 6V6g== X-Gm-Message-State: AOJu0YzW1CDmvDEE0UVMCsgazUA3/H45J6adlyBNXn14lXNxCJgHe491 8E5Rz0vWud4++6qHhmeJUiW0eKoqIUh/rmE9f1RbvyGrcP+4cGF4rXAaNnIB X-Google-Smtp-Source: AGHT+IGsBvtb06JpxeYiMjcK1LDgmwSAPf9bOOzlFxHcmTu0QTbRYZ8C8T6CZlN8D40046oKHkFOAg== X-Received: by 2002:a05:6a00:939e:b0:6f0:b67e:dcfb with SMTP id ka30-20020a056a00939e00b006f0b67edcfbmr8608514pfb.7.1714384565898; Mon, 29 Apr 2024 02:56:05 -0700 (PDT) Received: from localhost ([120.21.2.138]) by smtp.gmail.com with ESMTPSA id h6-20020a056a00170600b006e6b180d87asm18889719pfc.35.2024.04.29.02.56.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 02:56:05 -0700 (PDT) From: Alexis <flexibeast@HIDDEN> To: 62044 <at> debbugs.gnu.org Subject: Status update? User-Agent: mu4e 1.12.4; emacs 29.3 Date: Mon, 29 Apr 2024 19:56:02 +1000 Message-ID: <87v8404hn1.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 62044 Cc: emacs-erc@HIDDEN 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 (-) i'm also affected by this issue, as a user of the soju bouncer. i'm on Emacs 29.3. i using ERC on my laptop, and my network connection is frequently disconnected and reconnected: partly because i'm regularly moving around, but also due to occasional dropouts on my home network. Is there anything i might be able to do to help with this? #29 says that certain changes have been added to HEAD; should i apply those changes and report back what, if anything, i discover?
bug-gnu-emacs@HIDDEN
:bug#62044
; Package emacs
.
Full text available.Received: (at 62044) by debbugs.gnu.org; 10 Apr 2023 20:25:22 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 10 16:25:22 2023 Received: from localhost ([127.0.0.1]:36023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ply4o-0004HW-98 for submit <at> debbugs.gnu.org; Mon, 10 Apr 2023 16:25:22 -0400 Received: from mail-108-mta89.mxroute.com ([136.175.108.89]:37135) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <jp@HIDDEN>) id 1ply4m-0004HE-FM for 62044 <at> debbugs.gnu.org; Mon, 10 Apr 2023 16:25:21 -0400 Received: from mail-111-mta2.mxroute.com ([136.175.111.2] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta89.mxroute.com (ZoneMTA) with ESMTPSA id 1876cd80cdd000edb4.001 for <62044 <at> debbugs.gnu.org> (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Mon, 10 Apr 2023 20:25:11 +0000 X-Zone-Loop: 0bbfdc4eaef19256e6aea41db7348a80b54b07efb462 X-Originating-IP: [136.175.111.2] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=neverwas.me ; s=x; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To: 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=nynDwDq65bHcLOrYpJB5XdlpAA7W4dNNjD3SMsBtjRQ=; b=LZ7h52ivssw5Q8nKWWTuW3nycD LUh/GG5naBA3WC7nyFZGN+wnifKJqpIItyd610FXO4KwLQZMWiafLPY4PSv4zaTS5dq7MR09Jri1w bgoHpl2+7PbaR2XbTxFaCZyMednIa8K5KnKLvbxcVuLsMliBTT5ohXMYd90A2myN+vqlIGu9pANHb MdDXPeWzAPxE6+c+OjPDNqajGdwbN0+6A3YKVN0pWlwcuXxhNAadXWlrw5znjGe72tLUknuriKCYD BFu9X7KxtcTlPiMps+Cb1SFSqzBKj9+/rZqevm1bMt11peOP3W4AXRw33hsbXUXx1jR6mQ7WV4M0B KU12PY1w==; From: "J.P." <jp@HIDDEN> To: xoddf2 <woddfellow2@HIDDEN> Subject: Re: bug#62044: 30.0.50; ERC 5.5: Auto-reconnect is broken In-Reply-To: <87v8j715om.fsf@HIDDEN> (J. P.'s message of "Sat, 11 Mar 2023 10:52:41 -0800") References: <87wn3rg49m.fsf@HIDDEN> <87pm9jy8v7.fsf@HIDDEN> <87sfefr4qa.fsf@HIDDEN> <878rg7ql29.fsf@HIDDEN> <87fsaepsso.fsf@HIDDEN> <87lek6kn1b.fsf@HIDDEN> <87zg8lawlk.fsf@HIDDEN> <87v8j715om.fsf@HIDDEN> Date: Mon, 10 Apr 2023 13:25:06 -0700 Message-ID: <87bkjvv61p.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Authenticated-Id: masked@HIDDEN X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 62044 Cc: emacs-erc@HIDDEN, 62044 <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 (-) A Libera user was good enough to try this patch and has unfortunately reported something reminiscent of the old buffer-association troubles from versions past. According to them, buffers aren't being reused and new ones are receiving "<n>"-suffixed names. Sadly, this sounds all too plausible, although they haven't yet furnished a recipe, and I haven't been able to reproduce anything similar. Despite this, I've decided to keep things moving and perhaps cast a wider net by adding these changes to HEAD. Hopefully, this will compel others to shed more light on the user's account. If all else fails, I suppose we can consider temporarily changing the default value of `erc-server-reconnect-function' to enable the new behavior for everyone. Of course, that runs the risk of annoying disinterested folks while we work out the kinks. If anyone has something to add here, please share. Thanks.
bug-gnu-emacs@HIDDEN
:bug#62044
; Package emacs
.
Full text available.Received: (at 62044) by debbugs.gnu.org; 11 Mar 2023 18:52:58 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 11 13:52:58 2023 Received: from localhost ([127.0.0.1]:58673 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pb4Ku-0005JH-2q for submit <at> debbugs.gnu.org; Sat, 11 Mar 2023 13:52:58 -0500 Received: from mail-108-mta75.mxroute.com ([136.175.108.75]:35187) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <jp@HIDDEN>) id 1pb4Kq-0005J1-KB for 62044 <at> debbugs.gnu.org; Sat, 11 Mar 2023 13:52:54 -0500 Received: from mail-111-mta2.mxroute.com ([136.175.111.2] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta75.mxroute.com (ZoneMTA) with ESMTPSA id 186d204a9d4000edb4.001 for <62044 <at> debbugs.gnu.org> (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Sat, 11 Mar 2023 18:52:46 +0000 X-Zone-Loop: 7448709c20a303aa707a17048df7efc0380925dd462e X-Originating-IP: [136.175.111.2] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=neverwas.me ; s=x; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To: 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=Imisic3oLli0LUnviBDCIzeGZbHs43tNeMCsgUh8I60=; b=kYYSJ0T3KqCpFxeeWBPXDRcOZv yICVror348iwtNHt07XgBnetGka65tv6If/yTZp6sTzgzBVjFFaIsIexXIzSLO668VDzuch1cWB6A rJdxK2VkRFsTbPwbGehWj+OpmKj4I5WL4na1qDwU+PYKs97vkzSyDDPXNUw64oFm3VI6er2G91vTz LyTqyS48vZcUw3pE4GYYFcfEYH91o4r3L2d2ZjUAo+X/eBMkhsmA8GSew8aVUwQFZdCjd+i+mSmPa OiJbDV6v8//P3MDRh+7x7wcP3V1cMv0jz92SejDHEtNIz4nkRPh804H+IQhhQIHQhOWv/7+KjbgWB 6tepO3lw==; From: "J.P." <jp@HIDDEN> To: xoddf2 <woddfellow2@HIDDEN> Subject: Re: bug#62044: 30.0.50; ERC 5.5: Auto-reconnect is broken In-Reply-To: <87zg8lawlk.fsf@HIDDEN> (xoddf2's message of "Thu, 09 Mar 2023 23:34:15 -0800") References: <87wn3rg49m.fsf@HIDDEN> <87pm9jy8v7.fsf@HIDDEN> <87sfefr4qa.fsf@HIDDEN> <878rg7ql29.fsf@HIDDEN> <87fsaepsso.fsf@HIDDEN> <87lek6kn1b.fsf@HIDDEN> <87zg8lawlk.fsf@HIDDEN> Date: Sat, 11 Mar 2023 10:52:41 -0800 Message-ID: <87v8j715om.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Authenticated-Id: masked@HIDDEN X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 62044 Cc: emacs-erc@HIDDEN, 62044 <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 xoddf2 <woddfellow2@HIDDEN> writes: > J.P. writes: > >> [...] >> >> I've improved upon this further (v3 attached) by adding a housekeeping >> task to monitor the initial server process from creation. Such a move >> may be regrettable because it adds yet more complexity to the already >> dizzying auto-reconnect landscape. However, I couldn't find a suitable >> way to cover common process errors that aren't presented to the sentinel >> but still need to engage the reconnect logic. >> >> If this leads to a futile game of whack-a-mole, we'll obviously need to >> try a different approach. But if we do more-or-less build on what I've >> got so far, we'll definitely need to ensure it agrees with 27 and 28 >> before spending serious energy on refinement and tests. >> >> Thanks. > > Version 3 of the patch works, both with an otherwise unconfigured ERC > and with a full configuration connecting to my bouncer. > > I used this setting in both cases: > (setq erc-server-reconnect-function 'erc-server-delayed-check-reconnect) Really appreciate your trying this out. > The first 2 versions did not work at all. Right, and the last one still fails under various (hopefully less common) conditions, such as an outbound firewall dropping rather than rejecting packets. But the main problem (IMO) is unneeded complexity, and that stems from a fundamental design flaw in ERC: initializing new buffers and mode/module resources before creating connections, hence resorting to a probe to check for connectivity, which is roundabout and error prone. But until people become willing to accept the many breaking changes that a redesign would spell, I'm afraid we're stuck relying on these unfriendly contortions. As for next steps, I've polished up this patch some and have marked it for preliminary inclusion in what will become ERC 5.6. Thanks again. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0000-v3-v4.diff From a1d77151295d4c177ea75c723684873cc94875ed Mon Sep 17 00:00:00 2001 From: "F. Jason Park" <jp@HIDDEN> Date: Sat, 11 Mar 2023 06:46:19 -0800 Subject: [PATCH 0/1] *** NOT A PATCH *** *** BLURB HERE *** F. Jason Park (1): [5.6] Add probing erc-server-reconnect-function variant lisp/erc/erc-backend.el | 116 ++++++++++++++- .../lisp/erc/erc-scenarios-base-auto-recon.el | 140 ++++++++++++++++++ .../erc/resources/base/reconnect/just-eof.eld | 3 + .../resources/base/reconnect/just-ping.eld | 4 + .../resources/base/reconnect/ping-pong.eld | 6 + .../base/reconnect/unexpected-disconnect.eld | 24 +++ .../erc/resources/erc-scenarios-common.el | 1 + 7 files changed, 289 insertions(+), 5 deletions(-) create mode 100644 test/lisp/erc/erc-scenarios-base-auto-recon.el create mode 100644 test/lisp/erc/resources/base/reconnect/just-eof.eld create mode 100644 test/lisp/erc/resources/base/reconnect/just-ping.eld create mode 100644 test/lisp/erc/resources/base/reconnect/ping-pong.eld create mode 100644 test/lisp/erc/resources/base/reconnect/unexpected-disconnect.eld Interdiff: diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index 1030672506e..c6f263fdfba 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -415,8 +415,10 @@ erc-server-reconnect-attempts (defcustom erc-server-reconnect-timeout 1 "Number of seconds to wait between successive reconnect attempts. - -If a key is pressed while ERC is waiting, it will stop waiting." +If this value is too low, servers may reject your initial nick +request upon reconnecting because they haven't yet noticed that +your previous connection is dead. If this happens, try setting +this value to 120 or greater." :type 'number) (defcustom erc-server-reconnect-function 'erc-server-delayed-reconnect @@ -427,6 +429,7 @@ erc-server-reconnect-function and optionally alter the attempts tally." :package-version '(ERC . "5.5") :type '(choice (function-item erc-server-delayed-reconnect) + (function-item erc-server-delayed-check-reconnect) function)) (defcustom erc-split-line-length 440 @@ -667,18 +670,17 @@ erc--server-propagate-failed-connection "Ensure the PROCESS sentinel runs at least once on early failure. Act as a watchdog timer to force `erc-process-sentinel' and its finalizers, like `erc-disconnected-hook', to run when PROCESS has -a status of `failed' after one second. Print the -`process-exit-status', which can be a number, like 111, or a -message, like \"TLS negotiation failed\"." +a status of `failed' after one second. But only do so when its +error data is something ERC recognizes. Print an explanation to +the server buffer in any case." (when (eq (process-status process) 'failed) (erc-display-message nil 'error (process-buffer process) (format "Process exit status: %S" (process-exit-status process))) (pcase (process-exit-status process) - ((guard erc--server-reconnect-timer)) (111 - (delete-process process)) - (`(file-error ,(rx "failed") ,(rx "unreachable") . ,_) + (erc-process-sentinel process "failed with code 111\n")) + (`(file-error . ,_) (erc-process-sentinel process "failed with code -523\n")) ((rx "tls" (+ nonl) "failed") (erc-process-sentinel process "failed with code -525\n"))))) @@ -733,7 +735,7 @@ erc-server-connect (with-current-buffer buffer (erc-current-nick)))) ;; wait with script loading until we receive a confirmation (first ;; MOTD line) - (if (process-contact process :nowait) + (if (eq (process-status process) 'connect) ;; waiting for a non-blocking connect - keep the user informed (progn (erc-display-message nil nil buffer "Opening connection..\n") @@ -772,66 +774,76 @@ erc-server-delayed-reconnect (erc-server-reconnect)))) (defvar-local erc--server-reconnect-timeout nil) +(defvar-local erc--server-reconnect-timeout-check 10) +(defvar-local erc--server-reconnect-timeout-scale-function + #'erc--server-reconnect-timeout-double) + +(defun erc--server-reconnect-timeout-double (existing) + "Double EXISTING timeout, but cap it at 5 minutes." + (min 300 (* (or existing erc-server-reconnect-timeout) 2))) + +;; This may appear to hang at various places. It's assumed that when +;; *Messages* contains "Waiting for socket ..." or similar, progress +;; will be made eventually. (defun erc-server-delayed-check-reconnect (buffer) "Wait for internet connectivity before trying to reconnect. BUFFER is the server buffer for the current connection." - ;; This may appear to hang for a good while at various places - ;; because it calls wait_reading_process_output a bunch. It does at - ;; least sometimes print "Waiting for socket from ..." or similar. - (with-current-buffer buffer - (setq erc--server-reconnect-timeout - (min 300 (* (or erc--server-reconnect-timeout - erc-server-reconnect-timeout) - 2))) - (let ((reschedule - (lambda (proc) - (with-current-buffer buffer - (let ((erc-server-reconnect-timeout - erc--server-reconnect-timeout)) - (delete-process proc) - (erc-display-message nil 'error buffer "Nobody home...") - (erc-schedule-reconnect buffer 0)))))) - (condition-case _ - (let ((proc (funcall erc-session-connector - "*erc-connectivity-check" nil - erc-session-server erc-session-port - :nowait t)) - (check-expire (time-add 10 (current-time))) - check-aside) - (setq check-aside - (run-at-time - 1 1 (lambda (proc) - (when (or (not (eq 'connect (process-status proc))) - (time-less-p check-expire (current-time))) - (cancel-timer check-aside)) - (when (time-less-p check-expire (current-time)) - (erc-display-message - nil 'error buffer "Timed out waiting on `connect'") - (delete-process proc) - (funcall reschedule proc)) - (when (eq 'failed (process-status proc)) - (funcall reschedule proc))) - proc)) - (set-process-filter - proc (lambda (proc _) - (delete-process proc) - (with-current-buffer buffer - (setq erc--server-reconnect-timeout nil)) - (run-at-time nil nil #'erc-server-delayed-reconnect - buffer))) - (set-process-sentinel - proc (lambda (proc event) - (with-current-buffer buffer - (pcase event - ("open\n" - (run-at-time - nil nil #'send-string proc - (format "PING %d\r\n" (time-convert nil 'integer)))) - ((or "connection broken by remote peer\n" - (rx bot "failed")) - (funcall reschedule proc))))))) - (file-error (funcall reschedule nil)))))) + (when (buffer-live-p buffer) + (with-current-buffer buffer + (setq erc--server-reconnect-timeout + (funcall erc--server-reconnect-timeout-scale-function + erc--server-reconnect-timeout)) + (let* ((reschedule (lambda (proc) + (when (buffer-live-p buffer) + (with-current-buffer buffer + (let ((erc-server-reconnect-timeout + erc--server-reconnect-timeout)) + (delete-process proc) + (erc-display-message nil 'error buffer + "Nobody home...") + (erc-schedule-reconnect buffer 0)))))) + (conchk-exp (time-add erc--server-reconnect-timeout-check + (current-time))) + (conchk-timer nil) + (conchk (lambda (proc) + (let ((status (process-status proc)) + (top (time-less-p conchk-exp (current-time)))) + (when (or (not (eq 'connect status)) top) + (cancel-timer conchk-timer)) + (when (buffer-live-p buffer) + (cond (top (erc-display-message + nil 'error buffer + "Timed out while dialing...") + (delete-process proc) + (funcall reschedule proc)) + ((eq 'failed status) + (funcall reschedule proc))))))) + (sentinel (lambda (proc event) + (pcase event + ("open\n" + (run-at-time + nil nil #'send-string proc + (format "PING %d\r\n" + (time-convert nil 'integer)))) + ((or "connection broken by remote peer\n" + (rx bot "failed")) + (funcall reschedule proc))))) + (filter (lambda (proc _) + (delete-process proc) + (with-current-buffer buffer + (setq erc--server-reconnect-timeout nil)) + (run-at-time nil nil #'erc-server-delayed-reconnect + buffer)))) + (condition-case _ + (let ((proc (funcall erc-session-connector + "*erc-connectivity-check*" nil + erc-session-server erc-session-port + :nowait t))) + (setq conchk-timer (run-at-time 1 1 conchk proc)) + (set-process-filter proc filter) + (set-process-sentinel proc sentinel)) + (file-error (funcall reschedule nil))))))) (defun erc-server-filter-function (process string) "The process filter for the ERC server." @@ -912,11 +924,16 @@ erc-schedule-reconnect `erc-server-reconnect-count' by INCR unconditionally." (let ((count (and (integerp erc-server-reconnect-attempts) (- erc-server-reconnect-attempts - (cl-incf erc-server-reconnect-count (or incr 1)))))) - (erc-display-message nil 'error (current-buffer) 'reconnecting + (cl-incf erc-server-reconnect-count (or incr 1))))) + (proc (buffer-local-value 'erc-server-process buffer))) + (erc-display-message nil 'error buffer 'reconnecting ?m erc-server-reconnect-timeout ?i (if count erc-server-reconnect-count "N") ?n (if count erc-server-reconnect-attempts "A")) + (set-process-sentinel proc #'ignore) + (set-process-filter proc nil) + (delete-process proc) + (erc-update-mode-line) (setq erc-server-reconnecting nil erc--server-reconnect-timer (run-at-time erc-server-reconnect-timeout nil diff --git a/test/lisp/erc/erc-scenarios-base-auto-recon.el b/test/lisp/erc/erc-scenarios-base-auto-recon.el new file mode 100644 index 00000000000..719cf4e3b5d --- /dev/null +++ b/test/lisp/erc/erc-scenarios-base-auto-recon.el @@ -0,0 +1,140 @@ +;;; erc-scenarios-base-auto-recon.el --- auto-recon scenarios -*- lexical-binding: t -*- + +;; Copyright (C) 2023 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. + +;;; Code: + +(require 'ert-x) +(eval-and-compile + (let ((load-path (cons (ert-resource-directory) load-path))) + (require 'erc-scenarios-common))) + +(defun erc-scenarios-base-auto-recon--get-unused-port () + (let ((server (make-network-process :name "*erc-scenarios-base-auto-recon*" + :host "localhost" + :service t + :server t))) + (delete-process server) + (process-contact server :service))) + +;; This demos one possible flavor of intermittent service. +;; It may end up needing to be marked :unstable. +(ert-deftest erc-scenarios-base-auto-recon-unavailable () + :tags '(:expensive-test) + (erc-scenarios-common-with-cleanup + ((erc-server-flood-penalty 0.1) + (port (erc-scenarios-base-auto-recon--get-unused-port)) + (erc--server-reconnect-timeout-scale-function (lambda (_) 1)) + (erc-server-auto-reconnect t) + (erc-server-reconnect-function #'erc-server-delayed-check-reconnect) + (expect (erc-d-t-make-expecter)) + (erc-scenarios-common-dialog "base/reconnect") + (dumb-server nil)) + + (ert-info ("Dialing fails: nobody home") + (with-current-buffer (erc :server "127.0.0.1" + :port port + :nick "tester" + :full-name "tester") + (erc-d-t-wait-for 10 (not (erc-server-process-alive))) + (erc-d-t-wait-for 10 erc--server-reconnect-timer) + (funcall expect 10 "Opening connection") + (funcall expect 10 "failed") + + (ert-info ("Reconnect function freezes attempts at 1") + (funcall expect 10 '(: "reconnecting" (+ nonl) "attempt 1/2")) + (funcall expect 10 "nobody home") + (funcall expect 10 '(: "reconnecting" (+ nonl) "attempt 1/2")) + (funcall expect 10 "nobody home")))) + + (ert-info ("Service appears") + (setq dumb-server (erc-d-run "localhost" port + 'just-eof 'unexpected-disconnect)) + (with-current-buffer (format "127.0.0.1:%d" port) + (funcall expect 10 "server is in debug mode") + (should (equal (buffer-name) "FooNet")))) + + (ert-info ("Service interrupted, reconnect starts again") + (with-current-buffer "FooNet" + (funcall expect 10 "failed") + (funcall expect 10 '(: "reconnecting" (+ nonl) "attempt 1/2")))) + + (ert-info ("Service restored") + (delete-process dumb-server) + (setq dumb-server (erc-d-run "localhost" port + 'just-eof 'unexpected-disconnect)) + (with-current-buffer "FooNet" + (funcall expect 10 "server is in debug mode"))) + + (ert-info ("Service interrupted a third time, reconnect starts yet again") + (with-current-buffer "FooNet" + (funcall expect 10 "failed") + (funcall expect 10 '(: "reconnecting" (+ nonl) "attempt 1/2")) + (erc-cmd-RECONNECT "cancel") + (funcall expect 10 "canceled"))))) + +;; In this test, a listener accepts but doesn't respond to any messages. + +(ert-deftest erc-scenarios-base-auto-recon-no-proto () + :tags '(:expensive-test) + (erc-scenarios-common-with-cleanup + ((erc-server-flood-penalty 0.1) + (erc-scenarios-common-dialog "base/reconnect") + (erc-d-auto-pong nil) + (dumb-server (erc-d-run "localhost" t 'unexpected-disconnect)) + (port (process-contact dumb-server :service)) + (erc--server-reconnect-timeout-scale-function (lambda (_) 1)) + (erc--server-reconnect-timeout-check 0.5) + (erc-server-auto-reconnect t) + (erc-server-reconnect-function #'erc-server-delayed-check-reconnect) + (expect (erc-d-t-make-expecter))) + + (ert-info ("Session succeeds but cut short") + (with-current-buffer (erc :server "127.0.0.1" + :port port + :nick "tester" + :full-name "tester") + (funcall expect 10 "server is in debug mode") + (should (equal (buffer-name) "FooNet")) + (erc-d-t-wait-for 10 erc--server-reconnect-timer) + (delete-process dumb-server) + (funcall expect 10 "failed") + + (ert-info ("Reconnect function freezes attempts at 1") + (funcall expect 10 '(: "reconnecting" (+ nonl) "attempt 1/2")) + (funcall expect 10 "nobody home") + (funcall expect 10 "timed out while dialing") + (funcall expect 10 '(: "reconnecting" (+ nonl) "attempt 1/2")) + (funcall expect 10 "nobody home")))) + + (ert-info ("Service restored") + (setq dumb-server (erc-d-run "localhost" port + 'just-ping + 'ping-pong + 'unexpected-disconnect)) + (with-current-buffer "FooNet" + (funcall expect 30 "server is in debug mode"))) + + (ert-info ("Service interrupted again, reconnect starts again") + (with-current-buffer "FooNet" + (funcall expect 10 "failed") + (funcall expect 10 '(: "reconnecting" (+ nonl) "attempt 1/2")) + (erc-cmd-RECONNECT "cancel") + (funcall expect 10 "canceled"))))) + +;;; erc-scenarios-base-auto-recon.el ends here diff --git a/test/lisp/erc/resources/base/reconnect/just-eof.eld b/test/lisp/erc/resources/base/reconnect/just-eof.eld new file mode 100644 index 00000000000..c80a39b3170 --- /dev/null +++ b/test/lisp/erc/resources/base/reconnect/just-eof.eld @@ -0,0 +1,3 @@ +;; -*- mode: lisp-data; -*- +((eof 5 EOF)) +((drop 0 DROP)) diff --git a/test/lisp/erc/resources/base/reconnect/just-ping.eld b/test/lisp/erc/resources/base/reconnect/just-ping.eld new file mode 100644 index 00000000000..d57888b42d3 --- /dev/null +++ b/test/lisp/erc/resources/base/reconnect/just-ping.eld @@ -0,0 +1,4 @@ +;; -*- mode: lisp-data; -*- +((ping 20 "PING")) + +((eof 10 EOF)) diff --git a/test/lisp/erc/resources/base/reconnect/ping-pong.eld b/test/lisp/erc/resources/base/reconnect/ping-pong.eld new file mode 100644 index 00000000000..b3d36cf6cec --- /dev/null +++ b/test/lisp/erc/resources/base/reconnect/ping-pong.eld @@ -0,0 +1,6 @@ +;; -*- mode: lisp-data; -*- +((ping 10 "PING ") + (0 "PONG fake")) + +((eof 10 EOF)) +((drop 0 DROP)) diff --git a/test/lisp/erc/resources/base/reconnect/unexpected-disconnect.eld b/test/lisp/erc/resources/base/reconnect/unexpected-disconnect.eld new file mode 100644 index 00000000000..386d0f4b085 --- /dev/null +++ b/test/lisp/erc/resources/base/reconnect/unexpected-disconnect.eld @@ -0,0 +1,24 @@ +;; -*- mode: lisp-data; -*- +((nick 10 "NICK tester")) +((user 10 "USER user 0 * :tester") + (0 ":irc.foonet.org 001 tester :Welcome to the foonet IRC Network tester") + (0 ":irc.foonet.org 002 tester :Your host is irc.foonet.org, running version oragono-2.6.0-7481bf0385b95b16") + (0 ":irc.foonet.org 003 tester :This server was created Tue, 04 May 2021 05:06:18 UTC") + (0 ":irc.foonet.org 004 tester irc.foonet.org oragono-2.6.0-7481bf0385b95b16 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") + (0 ":irc.foonet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server") + (0 ":irc.foonet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=FooNet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") + (0 ":irc.foonet.org 005 tester draft/CHATHISTORY=100 :are supported by this server") + (0 ":irc.foonet.org 251 tester :There are 0 users and 3 invisible on 1 server(s)") + (0 ":irc.foonet.org 252 tester 0 :IRC Operators online") + (0 ":irc.foonet.org 253 tester 0 :unregistered connections") + (0 ":irc.foonet.org 254 tester 1 :channels formed") + (0 ":irc.foonet.org 255 tester :I have 3 clients and 0 servers") + (0 ":irc.foonet.org 265 tester 3 3 :Current local users 3, max 3") + (0 ":irc.foonet.org 266 tester 3 3 :Current global users 3, max 3") + (0 ":irc.foonet.org 422 tester :MOTD File is missing")) + +((mode-user 10 "MODE tester +i") + (0 ":irc.foonet.org 221 tester +i") + (0 ":irc.foonet.org NOTICE tester :This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect.")) + +((drop 0 DROP)) diff --git a/test/lisp/erc/resources/erc-scenarios-common.el b/test/lisp/erc/resources/erc-scenarios-common.el index 0d9a79ae9ce..f259c88594b 100644 --- a/test/lisp/erc/resources/erc-scenarios-common.el +++ b/test/lisp/erc/resources/erc-scenarios-common.el @@ -121,6 +121,7 @@ erc-scenarios-common--print-trace (erc-modules (copy-sequence erc-modules)) (inhibit-interaction t) (auth-source-do-cache nil) + (timer-list (copy-sequence timer-list)) (erc-auth-source-parameters-join-function nil) (erc-autojoin-channels-alist nil) (erc-server-auto-reconnect nil) -- 2.39.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-5.6-Add-probing-erc-server-reconnect-function-varian.patch From a1d77151295d4c177ea75c723684873cc94875ed Mon Sep 17 00:00:00 2001 From: "F. Jason Park" <jp@HIDDEN> Date: Wed, 8 Mar 2023 06:14:36 -0800 Subject: [PATCH 1/1] [5.6] Add probing erc-server-reconnect-function variant * lisp/erc/erc-backend.el (erc-server-reconnect-timeout): Replace questionable claim with recommendation for alternate value when experiencing nick rejections. (erc-server-reconnect-function): Add new value `erc-server-delayed-check-reconnect'. (erc--server-reconnect-timer, erc-server-delayed-check-reconnect): Add possible alternate value for option `erc-server-reconnect-function' that only attempts to reconnect after hearing back from the server. Also add helper variable. (erc-server-connect): Run erc--server-connect-function for async processes. (erc--server-connect-function, erc--server-propagate-failed-connection): Add connect-function variable and default value to run on process creation and execute process-failure handlers. (erc--server-reconnect-timeout-scale-function, erc--server-reconnect-timeout-double, erc--server-reconnect-timeout-check): Add supporting variables and functions for `erc-server-delayed-check-reconnect'. (erc-schedule-reconnect): Ensure previous `erc-server-process' is deleted. * test/lisp/erc/erc-scenarios-base-auto-recon.el: New file. * test/lisp/erc/resources/base/reconnect/just-eof.eld: New file. * test/lisp/erc/resources/base/reconnect/just-ping.eld: New file. * test/lisp/erc/resources/base/reconnect/ping-pong.eld: New file. * test/lisp/erc/resources/base/reconnect/unexpected-disconnect.eld: New file. * test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common--make-bindings): Shadow timer-list. --- lisp/erc/erc-backend.el | 116 ++++++++++++++- .../lisp/erc/erc-scenarios-base-auto-recon.el | 140 ++++++++++++++++++ .../erc/resources/base/reconnect/just-eof.eld | 3 + .../resources/base/reconnect/just-ping.eld | 4 + .../resources/base/reconnect/ping-pong.eld | 6 + .../base/reconnect/unexpected-disconnect.eld | 24 +++ .../erc/resources/erc-scenarios-common.el | 1 + 7 files changed, 289 insertions(+), 5 deletions(-) create mode 100644 test/lisp/erc/erc-scenarios-base-auto-recon.el create mode 100644 test/lisp/erc/resources/base/reconnect/just-eof.eld create mode 100644 test/lisp/erc/resources/base/reconnect/just-ping.eld create mode 100644 test/lisp/erc/resources/base/reconnect/ping-pong.eld create mode 100644 test/lisp/erc/resources/base/reconnect/unexpected-disconnect.eld diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index 567443f5329..c6f263fdfba 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -415,8 +415,10 @@ erc-server-reconnect-attempts (defcustom erc-server-reconnect-timeout 1 "Number of seconds to wait between successive reconnect attempts. - -If a key is pressed while ERC is waiting, it will stop waiting." +If this value is too low, servers may reject your initial nick +request upon reconnecting because they haven't yet noticed that +your previous connection is dead. If this happens, try setting +this value to 120 or greater." :type 'number) (defcustom erc-server-reconnect-function 'erc-server-delayed-reconnect @@ -427,6 +429,7 @@ erc-server-reconnect-function and optionally alter the attempts tally." :package-version '(ERC . "5.5") :type '(choice (function-item erc-server-delayed-reconnect) + (function-item erc-server-delayed-check-reconnect) function)) (defcustom erc-split-line-length 440 @@ -658,6 +661,30 @@ erc--register-connection (run-hooks 'erc--server-post-connect-hook) (erc-login)) +(defvar erc--server-connect-function #'erc--server-propagate-failed-connection + "Function called one second after creating a server process. +Called with the newly created process just before the opening IRC +protocol exchange.") + +(defun erc--server-propagate-failed-connection (process) + "Ensure the PROCESS sentinel runs at least once on early failure. +Act as a watchdog timer to force `erc-process-sentinel' and its +finalizers, like `erc-disconnected-hook', to run when PROCESS has +a status of `failed' after one second. But only do so when its +error data is something ERC recognizes. Print an explanation to +the server buffer in any case." + (when (eq (process-status process) 'failed) + (erc-display-message + nil 'error (process-buffer process) + (format "Process exit status: %S" (process-exit-status process))) + (pcase (process-exit-status process) + (111 + (erc-process-sentinel process "failed with code 111\n")) + (`(file-error . ,_) + (erc-process-sentinel process "failed with code -523\n")) + ((rx "tls" (+ nonl) "failed") + (erc-process-sentinel process "failed with code -525\n"))))) + (defvar erc--server-connect-dumb-ipv6-regexp ;; Not for validation (gives false positives). (rx bot "[" (group (+ (any xdigit digit ":.")) (? "%" (+ alnum))) "]" eot)) @@ -710,7 +737,9 @@ erc-server-connect ;; MOTD line) (if (eq (process-status process) 'connect) ;; waiting for a non-blocking connect - keep the user informed - (erc-display-message nil nil buffer "Opening connection..\n") + (progn + (erc-display-message nil nil buffer "Opening connection..\n") + (run-at-time 1 nil erc--server-connect-function process)) (message "%s...done" msg) (erc--register-connection)))) @@ -744,6 +773,78 @@ erc-server-delayed-reconnect (with-current-buffer buffer (erc-server-reconnect)))) +(defvar-local erc--server-reconnect-timeout nil) +(defvar-local erc--server-reconnect-timeout-check 10) +(defvar-local erc--server-reconnect-timeout-scale-function + #'erc--server-reconnect-timeout-double) + +(defun erc--server-reconnect-timeout-double (existing) + "Double EXISTING timeout, but cap it at 5 minutes." + (min 300 (* (or existing erc-server-reconnect-timeout) 2))) + +;; This may appear to hang at various places. It's assumed that when +;; *Messages* contains "Waiting for socket ..." or similar, progress +;; will be made eventually. + +(defun erc-server-delayed-check-reconnect (buffer) + "Wait for internet connectivity before trying to reconnect. +BUFFER is the server buffer for the current connection." + (when (buffer-live-p buffer) + (with-current-buffer buffer + (setq erc--server-reconnect-timeout + (funcall erc--server-reconnect-timeout-scale-function + erc--server-reconnect-timeout)) + (let* ((reschedule (lambda (proc) + (when (buffer-live-p buffer) + (with-current-buffer buffer + (let ((erc-server-reconnect-timeout + erc--server-reconnect-timeout)) + (delete-process proc) + (erc-display-message nil 'error buffer + "Nobody home...") + (erc-schedule-reconnect buffer 0)))))) + (conchk-exp (time-add erc--server-reconnect-timeout-check + (current-time))) + (conchk-timer nil) + (conchk (lambda (proc) + (let ((status (process-status proc)) + (top (time-less-p conchk-exp (current-time)))) + (when (or (not (eq 'connect status)) top) + (cancel-timer conchk-timer)) + (when (buffer-live-p buffer) + (cond (top (erc-display-message + nil 'error buffer + "Timed out while dialing...") + (delete-process proc) + (funcall reschedule proc)) + ((eq 'failed status) + (funcall reschedule proc))))))) + (sentinel (lambda (proc event) + (pcase event + ("open\n" + (run-at-time + nil nil #'send-string proc + (format "PING %d\r\n" + (time-convert nil 'integer)))) + ((or "connection broken by remote peer\n" + (rx bot "failed")) + (funcall reschedule proc))))) + (filter (lambda (proc _) + (delete-process proc) + (with-current-buffer buffer + (setq erc--server-reconnect-timeout nil)) + (run-at-time nil nil #'erc-server-delayed-reconnect + buffer)))) + (condition-case _ + (let ((proc (funcall erc-session-connector + "*erc-connectivity-check*" nil + erc-session-server erc-session-port + :nowait t))) + (setq conchk-timer (run-at-time 1 1 conchk proc)) + (set-process-filter proc filter) + (set-process-sentinel proc sentinel)) + (file-error (funcall reschedule nil))))))) + (defun erc-server-filter-function (process string) "The process filter for the ERC server." (with-current-buffer (process-buffer process) @@ -823,11 +924,16 @@ erc-schedule-reconnect `erc-server-reconnect-count' by INCR unconditionally." (let ((count (and (integerp erc-server-reconnect-attempts) (- erc-server-reconnect-attempts - (cl-incf erc-server-reconnect-count (or incr 1)))))) - (erc-display-message nil 'error (current-buffer) 'reconnecting + (cl-incf erc-server-reconnect-count (or incr 1))))) + (proc (buffer-local-value 'erc-server-process buffer))) + (erc-display-message nil 'error buffer 'reconnecting ?m erc-server-reconnect-timeout ?i (if count erc-server-reconnect-count "N") ?n (if count erc-server-reconnect-attempts "A")) + (set-process-sentinel proc #'ignore) + (set-process-filter proc nil) + (delete-process proc) + (erc-update-mode-line) (setq erc-server-reconnecting nil erc--server-reconnect-timer (run-at-time erc-server-reconnect-timeout nil diff --git a/test/lisp/erc/erc-scenarios-base-auto-recon.el b/test/lisp/erc/erc-scenarios-base-auto-recon.el new file mode 100644 index 00000000000..719cf4e3b5d --- /dev/null +++ b/test/lisp/erc/erc-scenarios-base-auto-recon.el @@ -0,0 +1,140 @@ +;;; erc-scenarios-base-auto-recon.el --- auto-recon scenarios -*- lexical-binding: t -*- + +;; Copyright (C) 2023 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. + +;;; Code: + +(require 'ert-x) +(eval-and-compile + (let ((load-path (cons (ert-resource-directory) load-path))) + (require 'erc-scenarios-common))) + +(defun erc-scenarios-base-auto-recon--get-unused-port () + (let ((server (make-network-process :name "*erc-scenarios-base-auto-recon*" + :host "localhost" + :service t + :server t))) + (delete-process server) + (process-contact server :service))) + +;; This demos one possible flavor of intermittent service. +;; It may end up needing to be marked :unstable. +(ert-deftest erc-scenarios-base-auto-recon-unavailable () + :tags '(:expensive-test) + (erc-scenarios-common-with-cleanup + ((erc-server-flood-penalty 0.1) + (port (erc-scenarios-base-auto-recon--get-unused-port)) + (erc--server-reconnect-timeout-scale-function (lambda (_) 1)) + (erc-server-auto-reconnect t) + (erc-server-reconnect-function #'erc-server-delayed-check-reconnect) + (expect (erc-d-t-make-expecter)) + (erc-scenarios-common-dialog "base/reconnect") + (dumb-server nil)) + + (ert-info ("Dialing fails: nobody home") + (with-current-buffer (erc :server "127.0.0.1" + :port port + :nick "tester" + :full-name "tester") + (erc-d-t-wait-for 10 (not (erc-server-process-alive))) + (erc-d-t-wait-for 10 erc--server-reconnect-timer) + (funcall expect 10 "Opening connection") + (funcall expect 10 "failed") + + (ert-info ("Reconnect function freezes attempts at 1") + (funcall expect 10 '(: "reconnecting" (+ nonl) "attempt 1/2")) + (funcall expect 10 "nobody home") + (funcall expect 10 '(: "reconnecting" (+ nonl) "attempt 1/2")) + (funcall expect 10 "nobody home")))) + + (ert-info ("Service appears") + (setq dumb-server (erc-d-run "localhost" port + 'just-eof 'unexpected-disconnect)) + (with-current-buffer (format "127.0.0.1:%d" port) + (funcall expect 10 "server is in debug mode") + (should (equal (buffer-name) "FooNet")))) + + (ert-info ("Service interrupted, reconnect starts again") + (with-current-buffer "FooNet" + (funcall expect 10 "failed") + (funcall expect 10 '(: "reconnecting" (+ nonl) "attempt 1/2")))) + + (ert-info ("Service restored") + (delete-process dumb-server) + (setq dumb-server (erc-d-run "localhost" port + 'just-eof 'unexpected-disconnect)) + (with-current-buffer "FooNet" + (funcall expect 10 "server is in debug mode"))) + + (ert-info ("Service interrupted a third time, reconnect starts yet again") + (with-current-buffer "FooNet" + (funcall expect 10 "failed") + (funcall expect 10 '(: "reconnecting" (+ nonl) "attempt 1/2")) + (erc-cmd-RECONNECT "cancel") + (funcall expect 10 "canceled"))))) + +;; In this test, a listener accepts but doesn't respond to any messages. + +(ert-deftest erc-scenarios-base-auto-recon-no-proto () + :tags '(:expensive-test) + (erc-scenarios-common-with-cleanup + ((erc-server-flood-penalty 0.1) + (erc-scenarios-common-dialog "base/reconnect") + (erc-d-auto-pong nil) + (dumb-server (erc-d-run "localhost" t 'unexpected-disconnect)) + (port (process-contact dumb-server :service)) + (erc--server-reconnect-timeout-scale-function (lambda (_) 1)) + (erc--server-reconnect-timeout-check 0.5) + (erc-server-auto-reconnect t) + (erc-server-reconnect-function #'erc-server-delayed-check-reconnect) + (expect (erc-d-t-make-expecter))) + + (ert-info ("Session succeeds but cut short") + (with-current-buffer (erc :server "127.0.0.1" + :port port + :nick "tester" + :full-name "tester") + (funcall expect 10 "server is in debug mode") + (should (equal (buffer-name) "FooNet")) + (erc-d-t-wait-for 10 erc--server-reconnect-timer) + (delete-process dumb-server) + (funcall expect 10 "failed") + + (ert-info ("Reconnect function freezes attempts at 1") + (funcall expect 10 '(: "reconnecting" (+ nonl) "attempt 1/2")) + (funcall expect 10 "nobody home") + (funcall expect 10 "timed out while dialing") + (funcall expect 10 '(: "reconnecting" (+ nonl) "attempt 1/2")) + (funcall expect 10 "nobody home")))) + + (ert-info ("Service restored") + (setq dumb-server (erc-d-run "localhost" port + 'just-ping + 'ping-pong + 'unexpected-disconnect)) + (with-current-buffer "FooNet" + (funcall expect 30 "server is in debug mode"))) + + (ert-info ("Service interrupted again, reconnect starts again") + (with-current-buffer "FooNet" + (funcall expect 10 "failed") + (funcall expect 10 '(: "reconnecting" (+ nonl) "attempt 1/2")) + (erc-cmd-RECONNECT "cancel") + (funcall expect 10 "canceled"))))) + +;;; erc-scenarios-base-auto-recon.el ends here diff --git a/test/lisp/erc/resources/base/reconnect/just-eof.eld b/test/lisp/erc/resources/base/reconnect/just-eof.eld new file mode 100644 index 00000000000..c80a39b3170 --- /dev/null +++ b/test/lisp/erc/resources/base/reconnect/just-eof.eld @@ -0,0 +1,3 @@ +;; -*- mode: lisp-data; -*- +((eof 5 EOF)) +((drop 0 DROP)) diff --git a/test/lisp/erc/resources/base/reconnect/just-ping.eld b/test/lisp/erc/resources/base/reconnect/just-ping.eld new file mode 100644 index 00000000000..d57888b42d3 --- /dev/null +++ b/test/lisp/erc/resources/base/reconnect/just-ping.eld @@ -0,0 +1,4 @@ +;; -*- mode: lisp-data; -*- +((ping 20 "PING")) + +((eof 10 EOF)) diff --git a/test/lisp/erc/resources/base/reconnect/ping-pong.eld b/test/lisp/erc/resources/base/reconnect/ping-pong.eld new file mode 100644 index 00000000000..b3d36cf6cec --- /dev/null +++ b/test/lisp/erc/resources/base/reconnect/ping-pong.eld @@ -0,0 +1,6 @@ +;; -*- mode: lisp-data; -*- +((ping 10 "PING ") + (0 "PONG fake")) + +((eof 10 EOF)) +((drop 0 DROP)) diff --git a/test/lisp/erc/resources/base/reconnect/unexpected-disconnect.eld b/test/lisp/erc/resources/base/reconnect/unexpected-disconnect.eld new file mode 100644 index 00000000000..386d0f4b085 --- /dev/null +++ b/test/lisp/erc/resources/base/reconnect/unexpected-disconnect.eld @@ -0,0 +1,24 @@ +;; -*- mode: lisp-data; -*- +((nick 10 "NICK tester")) +((user 10 "USER user 0 * :tester") + (0 ":irc.foonet.org 001 tester :Welcome to the foonet IRC Network tester") + (0 ":irc.foonet.org 002 tester :Your host is irc.foonet.org, running version oragono-2.6.0-7481bf0385b95b16") + (0 ":irc.foonet.org 003 tester :This server was created Tue, 04 May 2021 05:06:18 UTC") + (0 ":irc.foonet.org 004 tester irc.foonet.org oragono-2.6.0-7481bf0385b95b16 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") + (0 ":irc.foonet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server") + (0 ":irc.foonet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=FooNet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") + (0 ":irc.foonet.org 005 tester draft/CHATHISTORY=100 :are supported by this server") + (0 ":irc.foonet.org 251 tester :There are 0 users and 3 invisible on 1 server(s)") + (0 ":irc.foonet.org 252 tester 0 :IRC Operators online") + (0 ":irc.foonet.org 253 tester 0 :unregistered connections") + (0 ":irc.foonet.org 254 tester 1 :channels formed") + (0 ":irc.foonet.org 255 tester :I have 3 clients and 0 servers") + (0 ":irc.foonet.org 265 tester 3 3 :Current local users 3, max 3") + (0 ":irc.foonet.org 266 tester 3 3 :Current global users 3, max 3") + (0 ":irc.foonet.org 422 tester :MOTD File is missing")) + +((mode-user 10 "MODE tester +i") + (0 ":irc.foonet.org 221 tester +i") + (0 ":irc.foonet.org NOTICE tester :This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect.")) + +((drop 0 DROP)) diff --git a/test/lisp/erc/resources/erc-scenarios-common.el b/test/lisp/erc/resources/erc-scenarios-common.el index 0d9a79ae9ce..f259c88594b 100644 --- a/test/lisp/erc/resources/erc-scenarios-common.el +++ b/test/lisp/erc/resources/erc-scenarios-common.el @@ -121,6 +121,7 @@ erc-scenarios-common--print-trace (erc-modules (copy-sequence erc-modules)) (inhibit-interaction t) (auth-source-do-cache nil) + (timer-list (copy-sequence timer-list)) (erc-auth-source-parameters-join-function nil) (erc-autojoin-channels-alist nil) (erc-server-auto-reconnect nil) -- 2.39.2 --=-=-=--
bug-gnu-emacs@HIDDEN
:bug#62044
; Package emacs
.
Full text available.Received: (at 62044) by debbugs.gnu.org; 10 Mar 2023 07:34:28 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 10 02:34:28 2023 Received: from localhost ([127.0.0.1]:53569 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1paXGm-000640-BV for submit <at> debbugs.gnu.org; Fri, 10 Mar 2023 02:34:28 -0500 Received: from mail-pl1-f171.google.com ([209.85.214.171]:41949) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <woddfellow2@HIDDEN>) id 1paXGl-00063o-5d for 62044 <at> debbugs.gnu.org; Fri, 10 Mar 2023 02:34:27 -0500 Received: by mail-pl1-f171.google.com with SMTP id v11so4673779plz.8 for <62044 <at> debbugs.gnu.org>; Thu, 09 Mar 2023 23:34:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678433661; h=mime-version:date:message-id:in-reply-to:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=bchjNRYKY75PiJd28qgzHXKsfkkFVcI+FlY7KSxkQhQ=; b=HEO+XhDtebVGbiWD20yvYCH8kFpCftAYmm+KM6EMryFKRm+k+ZLBcVVxg2hZhuY/0G m8wu2u/15RmppItYBpdV5Tn5spyFDnC8tALGtx3pYsdPWPiZQApiW1Nej1YZRXdFOjzZ NawGZ4AgAXYdIB8EBHTHmILO0fWv8wX6M7f52HHm56auhf+eNuYmqlhpL2Mx3WJec4tz 1pUShI/zXChfTdyKheyB2dQBTpw8Z4r+TxhWZG4SEMsIzGxyAMZVNjeKQ4I4dcQ4+hL2 P03AzvJwmweQSN8BaGQWNJ9Yt2ABq5u3gkor4r1vuOSyAVJKIfZLp+NxkqYkN5zhOcta dDIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678433661; h=mime-version:date:message-id:in-reply-to:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=bchjNRYKY75PiJd28qgzHXKsfkkFVcI+FlY7KSxkQhQ=; b=GDwixkCaj7Kqk1XWfs7TrhSRWi1ywnhrZT6xN9LJF+fmR8g4ZdI4xu2xAdzDzsu3vK RXJtpMGFGWX+M4/e8JDBkPbeMLRXm12yUzCPCSEqDTldjvbNnC1STxToIIKtmTuTTz35 kPoJjFnUZgrEVFldShxcK91L1TWnCVww3SDkDLslYQPcRdwDQ+1Spi1lhdOovjvp8/De lmA6uDOTYtb8+29U7mjRHbOiMeatH20nKYcKMq7k5Y+LRhJit2Bws7khvgfYJlzBvbfK FMlG+B9cMZcZ3/CzVRzaj0oDR0Z2RBWEaUz0dg9PfbBuymhYNFexbZ5vUkMZf1eSpRgk P5qA== X-Gm-Message-State: AO0yUKVHGnZUz55jggoenmBGUg1MOY6q+0ca7kfml/R2RTVpSCcc4gKF ESQE6GeSgMEBZbuUIulEw1s= X-Google-Smtp-Source: AK7set9wukFgxU72eErxwJcrYqjjld7QObFv5t0vpB1MWX2zRWZl38782bgNtJzT9L0zXmH4/kHFug== X-Received: by 2002:a17:903:18a:b0:19c:df6e:6aec with SMTP id z10-20020a170903018a00b0019cdf6e6aecmr1230620plg.7.1678433661139; Thu, 09 Mar 2023 23:34:21 -0800 (PST) Received: from localhost (068-189-034-037.res.spectrum.com. [68.189.34.37]) by smtp.gmail.com with ESMTPSA id kk13-20020a170903070d00b0019309be03e7sm788835plb.66.2023.03.09.23.34.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 23:34:20 -0800 (PST) References: <87wn3rg49m.fsf@HIDDEN> <87pm9jy8v7.fsf@HIDDEN> <87sfefr4qa.fsf@HIDDEN> <878rg7ql29.fsf@HIDDEN> <87fsaepsso.fsf@HIDDEN> <87lek6kn1b.fsf@HIDDEN> User-agent: mu4e 1.4.15; emacs 27.1 From: xoddf2 <woddfellow2@HIDDEN> To: "J.P." <jp@HIDDEN> Subject: Re: bug#62044: 30.0.50; ERC 5.5: Auto-reconnect is broken In-reply-to: <87lek6kn1b.fsf@HIDDEN> Message-ID: <87zg8lawlk.fsf@HIDDEN> Date: Thu, 09 Mar 2023 23:34:15 -0800 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 62044 Cc: emacs-erc@HIDDEN, 62044 <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: -0.8 (/) J.P. writes: > [...] > > I've improved upon this further (v3 attached) by adding a housekeeping > task to monitor the initial server process from creation. Such a move > may be regrettable because it adds yet more complexity to the already > dizzying auto-reconnect landscape. However, I couldn't find a suitable > way to cover common process errors that aren't presented to the sentinel > but still need to engage the reconnect logic. > > If this leads to a futile game of whack-a-mole, we'll obviously need to > try a different approach. But if we do more-or-less build on what I've > got so far, we'll definitely need to ensure it agrees with 27 and 28 > before spending serious energy on refinement and tests. > > Thanks. Version 3 of the patch works, both with an otherwise unconfigured ERC and with a full configuration connecting to my bouncer. I used this setting in both cases: (setq erc-server-reconnect-function 'erc-server-delayed-check-reconnect) The first 2 versions did not work at all. Thanks -- xoddf2 | https://wlair.us.to/ | PGP: 20EB90D3
bug-gnu-emacs@HIDDEN
:bug#62044
; Package emacs
.
Full text available.Received: (at 62044) by debbugs.gnu.org; 9 Mar 2023 14:38:41 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 09 09:38:41 2023 Received: from localhost ([127.0.0.1]:51247 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1paHPk-0003Ng-7c for submit <at> debbugs.gnu.org; Thu, 09 Mar 2023 09:38:41 -0500 Received: from mail-108-mta224.mxroute.com ([136.175.108.224]:40689) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <jp@HIDDEN>) id 1paHPh-0003NR-D7 for 62044 <at> debbugs.gnu.org; Thu, 09 Mar 2023 09:38:38 -0500 Received: from mail-111-mta2.mxroute.com ([136.175.111.2] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta224.mxroute.com (ZoneMTA) with ESMTPSA id 186c6cf21c1000edb4.001 for <62044 <at> debbugs.gnu.org> (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Thu, 09 Mar 2023 14:38:28 +0000 X-Zone-Loop: c946599153481197482309ddb05d37047aa3a4f9a615 X-Originating-IP: [136.175.111.2] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=neverwas.me ; s=x; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To: 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=t1JMivn0tVAjKIoX27fxqe7JoLys5zdFHDjDnQJaJSI=; b=WAO8CVN0M29mwCxRDht1FUMC/o vetFrfl6ksZk0NjchxIjofkVkhPZLb3LBuZVA68ZZHaO/j/yPCO85lNFnxKYeK2o85P4+pVd0AlK7 xYhk5cD2Wc12IkJjs8MJEyarqMXukEUH8KUxIfvtQzwsejg9baVS1Fy+u1fYsrG0ganTX21hGHD4Y jbtpuOLEg/PfajxlebBlYMi9IYMWUTPZtTrij3PX2OXt2xrcyvpGcQjPfbNMCuwG+EibqXRq+gqhX 5q/GVWDQkihjNaR+GeFe7khsDwez/TutXV5gYTGX5bJefMpIpz4Yeg0+uGYbCWppnYlF11lTvsaNT Sy/StzFw==; From: "J.P." <jp@HIDDEN> To: xoddf2 <woddfellow2@HIDDEN> Subject: Re: bug#62044: 30.0.50; ERC 5.5: Auto-reconnect is broken In-Reply-To: <87fsaepsso.fsf@HIDDEN> (J. P.'s message of "Wed, 08 Mar 2023 18:22:47 -0800") References: <87wn3rg49m.fsf@HIDDEN> <87pm9jy8v7.fsf@HIDDEN> <87sfefr4qa.fsf@HIDDEN> <878rg7ql29.fsf@HIDDEN> <87fsaepsso.fsf@HIDDEN> Date: Thu, 09 Mar 2023 06:38:24 -0800 Message-ID: <87lek6kn1b.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Authenticated-Id: masked@HIDDEN X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 62044 Cc: emacs-erc@HIDDEN, 62044 <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 "J.P." <jp@HIDDEN> writes: > I've attached a less sloppy version that probably still fails in some > common cases, but at least it reuses the existing session connector. I've improved upon this further (v3 attached) by adding a housekeeping task to monitor the initial server process from creation. Such a move may be regrettable because it adds yet more complexity to the already dizzying auto-reconnect landscape. However, I couldn't find a suitable way to cover common process errors that aren't presented to the sentinel but still need to engage the reconnect logic. If this leads to a futile game of whack-a-mole, we'll obviously need to try a different approach. But if we do more-or-less build on what I've got so far, we'll definitely need to ensure it agrees with 27 and 28 before spending serious energy on refinement and tests. Thanks. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0000-v2-v3.diff From 7dcccaef52ad4442eabaabe04cd95ffceec048f7 Mon Sep 17 00:00:00 2001 From: "F. Jason Park" <jp@HIDDEN> Date: Thu, 9 Mar 2023 06:33:38 -0800 Subject: [PATCH 0/1] *** NOT A PATCH *** *** BLURB HERE *** F. Jason Park (1): Add conditional erc-server-reconnect-function lisp/erc/erc-backend.el | 93 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 91 insertions(+), 2 deletions(-) Interdiff: diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index d289df98bab..1030672506e 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -658,6 +658,31 @@ erc--register-connection (run-hooks 'erc--server-post-connect-hook) (erc-login)) +(defvar erc--server-connect-function #'erc--server-propagate-failed-connection + "Function called one second after creating a server process. +Called with the newly created process just before the opening IRC +protocol exchange.") + +(defun erc--server-propagate-failed-connection (process) + "Ensure the PROCESS sentinel runs at least once on early failure. +Act as a watchdog timer to force `erc-process-sentinel' and its +finalizers, like `erc-disconnected-hook', to run when PROCESS has +a status of `failed' after one second. Print the +`process-exit-status', which can be a number, like 111, or a +message, like \"TLS negotiation failed\"." + (when (eq (process-status process) 'failed) + (erc-display-message + nil 'error (process-buffer process) + (format "Process exit status: %S" (process-exit-status process))) + (pcase (process-exit-status process) + ((guard erc--server-reconnect-timer)) + (111 + (delete-process process)) + (`(file-error ,(rx "failed") ,(rx "unreachable") . ,_) + (erc-process-sentinel process "failed with code -523\n")) + ((rx "tls" (+ nonl) "failed") + (erc-process-sentinel process "failed with code -525\n"))))) + (defvar erc--server-connect-dumb-ipv6-regexp ;; Not for validation (gives false positives). (rx bot "[" (group (+ (any xdigit digit ":.")) (? "%" (+ alnum))) "]" eot)) @@ -708,9 +733,11 @@ erc-server-connect (with-current-buffer buffer (erc-current-nick)))) ;; wait with script loading until we receive a confirmation (first ;; MOTD line) - (if (eq (process-status process) 'connect) + (if (process-contact process :nowait) ;; waiting for a non-blocking connect - keep the user informed - (erc-display-message nil nil buffer "Opening connection..\n") + (progn + (erc-display-message nil nil buffer "Opening connection..\n") + (run-at-time 1 nil erc--server-connect-function process)) (message "%s...done" msg) (erc--register-connection)))) @@ -759,9 +786,9 @@ erc-server-delayed-check-reconnect 2))) (let ((reschedule (lambda (proc) - (let ((erc-server-reconnect-timeout - erc--server-reconnect-timeout)) - (with-current-buffer buffer + (with-current-buffer buffer + (let ((erc-server-reconnect-timeout + erc--server-reconnect-timeout)) (delete-process proc) (erc-display-message nil 'error buffer "Nobody home...") (erc-schedule-reconnect buffer 0)))))) @@ -770,18 +797,22 @@ erc-server-delayed-check-reconnect "*erc-connectivity-check" nil erc-session-server erc-session-port :nowait t)) - tls-check) - (when (and (not (eq erc-session-connector - #'erc-open-network-stream)) - (process-contact proc :tls-parameters)) - (setq tls-check - (run-at-time - 1 1 (lambda (proc) - (unless (eq 'connect (process-status proc)) - (cancel-timer tls-check)) - (when (eq 'failed (process-status proc)) - (funcall reschedule proc))) - proc))) + (check-expire (time-add 10 (current-time))) + check-aside) + (setq check-aside + (run-at-time + 1 1 (lambda (proc) + (when (or (not (eq 'connect (process-status proc))) + (time-less-p check-expire (current-time))) + (cancel-timer check-aside)) + (when (time-less-p check-expire (current-time)) + (erc-display-message + nil 'error buffer "Timed out waiting on `connect'") + (delete-process proc) + (funcall reschedule proc)) + (when (eq 'failed (process-status proc)) + (funcall reschedule proc))) + proc)) (set-process-filter proc (lambda (proc _) (delete-process proc) @@ -790,14 +821,16 @@ erc-server-delayed-check-reconnect (run-at-time nil nil #'erc-server-delayed-reconnect buffer))) (set-process-sentinel - proc (lambda (cproc event) + proc (lambda (proc event) (with-current-buffer buffer (pcase event ("open\n" - (run-at-time nil nil #'send-string - cproc "PING *connect-check*\r\n")) - ("connection broken by remote peer\n" - (funcall reschedule cproc))))))) + (run-at-time + nil nil #'send-string proc + (format "PING %d\r\n" (time-convert nil 'integer)))) + ((or "connection broken by remote peer\n" + (rx bot "failed")) + (funcall reschedule proc))))))) (file-error (funcall reschedule nil)))))) (defun erc-server-filter-function (process string) -- 2.39.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Add-conditional-erc-server-reconnect-function.patch From 7dcccaef52ad4442eabaabe04cd95ffceec048f7 Mon Sep 17 00:00:00 2001 From: "F. Jason Park" <jp@HIDDEN> Date: Wed, 8 Mar 2023 06:14:36 -0800 Subject: [PATCH 1/1] Add conditional erc-server-reconnect-function * lisp/erc/erc-backend.el (erc--server-reconnect-timer, erc-server-delayed-check-reconnect): Add possible alternate value for option `erc-server-reconnect-function' that only attempts to reconnect after hearing back from the server. Also add helper variable. (erc-server-connect): Run erc--server-connect-function for async processes. (erc--server-connect-function, erc--server-propagate-failed-connection): Add connect-function variable and default value to run on process creation and execute process-failure handlers. --- lisp/erc/erc-backend.el | 93 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 91 insertions(+), 2 deletions(-) diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index 567443f5329..1030672506e 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -658,6 +658,31 @@ erc--register-connection (run-hooks 'erc--server-post-connect-hook) (erc-login)) +(defvar erc--server-connect-function #'erc--server-propagate-failed-connection + "Function called one second after creating a server process. +Called with the newly created process just before the opening IRC +protocol exchange.") + +(defun erc--server-propagate-failed-connection (process) + "Ensure the PROCESS sentinel runs at least once on early failure. +Act as a watchdog timer to force `erc-process-sentinel' and its +finalizers, like `erc-disconnected-hook', to run when PROCESS has +a status of `failed' after one second. Print the +`process-exit-status', which can be a number, like 111, or a +message, like \"TLS negotiation failed\"." + (when (eq (process-status process) 'failed) + (erc-display-message + nil 'error (process-buffer process) + (format "Process exit status: %S" (process-exit-status process))) + (pcase (process-exit-status process) + ((guard erc--server-reconnect-timer)) + (111 + (delete-process process)) + (`(file-error ,(rx "failed") ,(rx "unreachable") . ,_) + (erc-process-sentinel process "failed with code -523\n")) + ((rx "tls" (+ nonl) "failed") + (erc-process-sentinel process "failed with code -525\n"))))) + (defvar erc--server-connect-dumb-ipv6-regexp ;; Not for validation (gives false positives). (rx bot "[" (group (+ (any xdigit digit ":.")) (? "%" (+ alnum))) "]" eot)) @@ -708,9 +733,11 @@ erc-server-connect (with-current-buffer buffer (erc-current-nick)))) ;; wait with script loading until we receive a confirmation (first ;; MOTD line) - (if (eq (process-status process) 'connect) + (if (process-contact process :nowait) ;; waiting for a non-blocking connect - keep the user informed - (erc-display-message nil nil buffer "Opening connection..\n") + (progn + (erc-display-message nil nil buffer "Opening connection..\n") + (run-at-time 1 nil erc--server-connect-function process)) (message "%s...done" msg) (erc--register-connection)))) @@ -744,6 +771,68 @@ erc-server-delayed-reconnect (with-current-buffer buffer (erc-server-reconnect)))) +(defvar-local erc--server-reconnect-timeout nil) + +(defun erc-server-delayed-check-reconnect (buffer) + "Wait for internet connectivity before trying to reconnect. +BUFFER is the server buffer for the current connection." + ;; This may appear to hang for a good while at various places + ;; because it calls wait_reading_process_output a bunch. It does at + ;; least sometimes print "Waiting for socket from ..." or similar. + (with-current-buffer buffer + (setq erc--server-reconnect-timeout + (min 300 (* (or erc--server-reconnect-timeout + erc-server-reconnect-timeout) + 2))) + (let ((reschedule + (lambda (proc) + (with-current-buffer buffer + (let ((erc-server-reconnect-timeout + erc--server-reconnect-timeout)) + (delete-process proc) + (erc-display-message nil 'error buffer "Nobody home...") + (erc-schedule-reconnect buffer 0)))))) + (condition-case _ + (let ((proc (funcall erc-session-connector + "*erc-connectivity-check" nil + erc-session-server erc-session-port + :nowait t)) + (check-expire (time-add 10 (current-time))) + check-aside) + (setq check-aside + (run-at-time + 1 1 (lambda (proc) + (when (or (not (eq 'connect (process-status proc))) + (time-less-p check-expire (current-time))) + (cancel-timer check-aside)) + (when (time-less-p check-expire (current-time)) + (erc-display-message + nil 'error buffer "Timed out waiting on `connect'") + (delete-process proc) + (funcall reschedule proc)) + (when (eq 'failed (process-status proc)) + (funcall reschedule proc))) + proc)) + (set-process-filter + proc (lambda (proc _) + (delete-process proc) + (with-current-buffer buffer + (setq erc--server-reconnect-timeout nil)) + (run-at-time nil nil #'erc-server-delayed-reconnect + buffer))) + (set-process-sentinel + proc (lambda (proc event) + (with-current-buffer buffer + (pcase event + ("open\n" + (run-at-time + nil nil #'send-string proc + (format "PING %d\r\n" (time-convert nil 'integer)))) + ((or "connection broken by remote peer\n" + (rx bot "failed")) + (funcall reschedule proc))))))) + (file-error (funcall reschedule nil)))))) + (defun erc-server-filter-function (process string) "The process filter for the ERC server." (with-current-buffer (process-buffer process) -- 2.39.2 --=-=-=--
bug-gnu-emacs@HIDDEN
:bug#62044
; Package emacs
.
Full text available.Received: (at 62044) by debbugs.gnu.org; 9 Mar 2023 02:23:02 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 08 21:23:02 2023 Received: from localhost ([127.0.0.1]:50532 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pa5vp-0004dy-On for submit <at> debbugs.gnu.org; Wed, 08 Mar 2023 21:23:02 -0500 Received: from mail-108-mta159.mxroute.com ([136.175.108.159]:39527) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <jp@HIDDEN>) id 1pa5vn-0004dP-8O for 62044 <at> debbugs.gnu.org; Wed, 08 Mar 2023 21:23:00 -0500 Received: from mail-111-mta2.mxroute.com ([136.175.111.2] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta159.mxroute.com (ZoneMTA) with ESMTPSA id 186c42daa6f000edb4.001 for <62044 <at> debbugs.gnu.org> (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Thu, 09 Mar 2023 02:22:52 +0000 X-Zone-Loop: 09fa08702dfa573a390a6b32cbefb728c56e45764e8d X-Originating-IP: [136.175.111.2] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=neverwas.me ; s=x; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To: 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=GWuUvm2ZJ8Ke2uzST29b20e5j7LxESNOyWnjYTZA/OA=; b=JZSm+KWqgwmpHm3XFZ2cB3ejij QFszyXdm++GasXxaaSvUg73u1Aj99kTN1pzf0qu66A7azbh9LF+Bhff3HJy7RWf94PlZ+FODTkcVI 8eeDMj7DJKYjx4OCCkrMt41Na46Z33UQ/eZ23B0HodjkGV+JYi8AheqXtYhgdqOINMxN5KmhUKvDf ynCdf6Jh16wbzJZJ64XA1qCXpuDrleGb+ApYUXVmPOe0Gtz0VVDICXUAj2x50CZBtDRZeXkz1RHZJ eVtKI0zAchFsceuiUNAcpSn2CaF+kpRZhRqr+KjtnYttIRTP7WfYIHQomzL8GqmVD1AwkZ0tLSxBk vdyI0ttg==; From: "J.P." <jp@HIDDEN> To: xoddf2 <woddfellow2@HIDDEN> Subject: Re: bug#62044: 30.0.50; ERC 5.5: Auto-reconnect is broken In-Reply-To: <878rg7ql29.fsf@HIDDEN> (J. P.'s message of "Wed, 08 Mar 2023 08:12:14 -0800") References: <87wn3rg49m.fsf@HIDDEN> <87pm9jy8v7.fsf@HIDDEN> <87sfefr4qa.fsf@HIDDEN> <878rg7ql29.fsf@HIDDEN> Date: Wed, 08 Mar 2023 18:22:47 -0800 Message-ID: <87fsaepsso.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Authenticated-Id: masked@HIDDEN X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 62044 Cc: emacs-erc@HIDDEN, 62044 <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 "J.P." <jp@HIDDEN> writes: > In your initial report, underlying connectivity is present in some > form because ERC reaches the "Logging in as" stage and attempts to > send an application payload, Actually, this is nonsense (forgive me). I seem to have forgotten that ERC prints this message regardless of whether a connection attempt succeeds. > So to keep things sane, we should probably treat auto-reconnecting > across connectivity gaps as a wishlist item and auto-reconnecting atop > healthy connections as an existing, previously unreported bug. As for > the new feature, I've attached a POC patch that you can try if you're > willing (usage is self-explanatory, but feel free to modify or iterate > as needed). I've attached a less sloppy version that probably still fails in some common cases, but at least it reuses the existing session connector. > As for the other issue, I think we're going to need some genuine > session logs to really get anywhere. That is, we'll likely need you to > enable logging and tracing during a real session with your bouncer > over a hopefully not-too-prolonged period to capture an actual > reconnect sequence failing. But hold off on that for another round > unless you're feeling adventurous. Actually, I'm not sure we'll be needing these logs after all. Let's maybe think on it a bit more (if that's acceptable). Thanks. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0000-v1-v2.diff From 01a2aa830b73028aecf1f7dae7dadba7467a3144 Mon Sep 17 00:00:00 2001 From: "F. Jason Park" <jp@HIDDEN> Date: Wed, 8 Mar 2023 18:04:16 -0800 Subject: [PATCH 0/1] *** NOT A PATCH *** *** BLURB HERE *** F. Jason Park (1): Add conditional erc-server-reconnect-function lisp/erc/erc-backend.el | 56 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) Interdiff: diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index d1738e4f92d..d289df98bab 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -749,6 +749,9 @@ erc--server-reconnect-timeout (defun erc-server-delayed-check-reconnect (buffer) "Wait for internet connectivity before trying to reconnect. BUFFER is the server buffer for the current connection." + ;; This may appear to hang for a good while at various places + ;; because it calls wait_reading_process_output a bunch. It does at + ;; least sometimes print "Waiting for socket from ..." or similar. (with-current-buffer buffer (setq erc--server-reconnect-timeout (min 300 (* (or erc--server-reconnect-timeout @@ -763,26 +766,38 @@ erc-server-delayed-check-reconnect (erc-display-message nil 'error buffer "Nobody home...") (erc-schedule-reconnect buffer 0)))))) (condition-case _ - (make-network-process - :name "*erc-connectivity-check" - :host erc-session-server - :service erc-session-port - :nowait t - :filter - (lambda (proc _) - (delete-process proc) - (with-current-buffer buffer - (setq erc--server-reconnect-timeout nil)) - (run-at-time nil nil #'erc-server-delayed-reconnect buffer)) - :sentinel - (lambda (cproc event) - (with-current-buffer buffer - (pcase event - ("open\n" - (run-at-time nil nil #'send-string - cproc "PING *connect-check*\r\n")) - ("connection broken by remote peer\n" - (funcall reschedule cproc)))))) + (let ((proc (funcall erc-session-connector + "*erc-connectivity-check" nil + erc-session-server erc-session-port + :nowait t)) + tls-check) + (when (and (not (eq erc-session-connector + #'erc-open-network-stream)) + (process-contact proc :tls-parameters)) + (setq tls-check + (run-at-time + 1 1 (lambda (proc) + (unless (eq 'connect (process-status proc)) + (cancel-timer tls-check)) + (when (eq 'failed (process-status proc)) + (funcall reschedule proc))) + proc))) + (set-process-filter + proc (lambda (proc _) + (delete-process proc) + (with-current-buffer buffer + (setq erc--server-reconnect-timeout nil)) + (run-at-time nil nil #'erc-server-delayed-reconnect + buffer))) + (set-process-sentinel + proc (lambda (cproc event) + (with-current-buffer buffer + (pcase event + ("open\n" + (run-at-time nil nil #'send-string + cproc "PING *connect-check*\r\n")) + ("connection broken by remote peer\n" + (funcall reschedule cproc))))))) (file-error (funcall reschedule nil)))))) (defun erc-server-filter-function (process string) -- 2.39.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Add-conditional-erc-server-reconnect-function.patch From 01a2aa830b73028aecf1f7dae7dadba7467a3144 Mon Sep 17 00:00:00 2001 From: "F. Jason Park" <jp@HIDDEN> Date: Wed, 8 Mar 2023 06:14:36 -0800 Subject: [PATCH 1/1] Add conditional erc-server-reconnect-function * lisp/erc/erc-backend.el (erc--server-reconnect-timer, erc-server-delayed-check-reconnect): Add possible alternate value for option `erc-server-reconnect-function' that only attempts to reconnect after hearing back from the server. Also add helper variable. --- lisp/erc/erc-backend.el | 56 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index 567443f5329..d289df98bab 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -744,6 +744,62 @@ erc-server-delayed-reconnect (with-current-buffer buffer (erc-server-reconnect)))) +(defvar-local erc--server-reconnect-timeout nil) + +(defun erc-server-delayed-check-reconnect (buffer) + "Wait for internet connectivity before trying to reconnect. +BUFFER is the server buffer for the current connection." + ;; This may appear to hang for a good while at various places + ;; because it calls wait_reading_process_output a bunch. It does at + ;; least sometimes print "Waiting for socket from ..." or similar. + (with-current-buffer buffer + (setq erc--server-reconnect-timeout + (min 300 (* (or erc--server-reconnect-timeout + erc-server-reconnect-timeout) + 2))) + (let ((reschedule + (lambda (proc) + (let ((erc-server-reconnect-timeout + erc--server-reconnect-timeout)) + (with-current-buffer buffer + (delete-process proc) + (erc-display-message nil 'error buffer "Nobody home...") + (erc-schedule-reconnect buffer 0)))))) + (condition-case _ + (let ((proc (funcall erc-session-connector + "*erc-connectivity-check" nil + erc-session-server erc-session-port + :nowait t)) + tls-check) + (when (and (not (eq erc-session-connector + #'erc-open-network-stream)) + (process-contact proc :tls-parameters)) + (setq tls-check + (run-at-time + 1 1 (lambda (proc) + (unless (eq 'connect (process-status proc)) + (cancel-timer tls-check)) + (when (eq 'failed (process-status proc)) + (funcall reschedule proc))) + proc))) + (set-process-filter + proc (lambda (proc _) + (delete-process proc) + (with-current-buffer buffer + (setq erc--server-reconnect-timeout nil)) + (run-at-time nil nil #'erc-server-delayed-reconnect + buffer))) + (set-process-sentinel + proc (lambda (cproc event) + (with-current-buffer buffer + (pcase event + ("open\n" + (run-at-time nil nil #'send-string + cproc "PING *connect-check*\r\n")) + ("connection broken by remote peer\n" + (funcall reschedule cproc))))))) + (file-error (funcall reschedule nil)))))) + (defun erc-server-filter-function (process string) "The process filter for the ERC server." (with-current-buffer (process-buffer process) -- 2.39.2 --=-=-=--
bug-gnu-emacs@HIDDEN
:bug#62044
; Package emacs
.
Full text available.Received: (at 62044) by debbugs.gnu.org; 8 Mar 2023 16:12:32 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 08 11:12:32 2023 Received: from localhost ([127.0.0.1]:50024 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pZwP1-0000Lo-PF for submit <at> debbugs.gnu.org; Wed, 08 Mar 2023 11:12:32 -0500 Received: from mail-108-mta14.mxroute.com ([136.175.108.14]:34743) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <jp@HIDDEN>) id 1pZwOz-0000La-FU for 62044 <at> debbugs.gnu.org; Wed, 08 Mar 2023 11:12:30 -0500 Received: from mail-111-mta2.mxroute.com ([136.175.111.2] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta14.mxroute.com (ZoneMTA) with ESMTPSA id 186c1feab82000edb4.001 for <62044 <at> debbugs.gnu.org> (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Wed, 08 Mar 2023 16:12:18 +0000 X-Zone-Loop: d4c2501ff935dc1b574c12e39bf67d15597c1a08c77f X-Originating-IP: [136.175.111.2] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=neverwas.me ; s=x; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To: 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=32hnjIJxVqDOu7in2O4p1mk90+3fhLsXjDwoRo0yg+w=; b=ZY0+/C8dICgmsFk9IQVhROBNhA PUmx9R85OaVVKa7VCVRS8xD5XwUK3fE2jZhebQTkbxAPpsZUypjyYs3GqTJBjpg3ba+agnzKIPhge Xvcbl+tW4e49U2y5bUmoROJuU9kFKzO0G8AfUucxNTLAe0pEI4a+E1DxzOX5RVYagkkxmpLUZKVx7 maXj2dyhOpKcJHWpHJ/k81z1dBLlfM73v6qqHG0kaJiPk2FnGkjdovzxoktkonoXT8T2QOLb1ZIfQ dsbaNYVx+rN9sV9xuFjSDt8RDvQXTMfMtPQqaE84g83jr4qzqO9FI6oPK6j6hae+zjA2FhW+fxcLc HL6vgu7g==; From: "J.P." <jp@HIDDEN> To: xoddf2 <woddfellow2@HIDDEN> Subject: Re: bug#62044: 30.0.50; ERC 5.5: Auto-reconnect is broken In-Reply-To: <87sfefr4qa.fsf@HIDDEN> (xoddf2's message of "Wed, 08 Mar 2023 01:07:25 -0800") References: <87wn3rg49m.fsf@HIDDEN> <87pm9jy8v7.fsf@HIDDEN> <87sfefr4qa.fsf@HIDDEN> Date: Wed, 08 Mar 2023 08:12:14 -0800 Message-ID: <878rg7ql29.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Authenticated-Id: masked@HIDDEN X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 62044 Cc: emacs-erc@HIDDEN, 62044 <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 xoddf2 <woddfellow2@HIDDEN> writes: > J.P. writes: > >> Hi xoddf2, >> >> [...] For starters, we need to find a recipe, all the way from >> emacs -Q, that triggers the unwanted behavior. That way, we can dispense >> with any possible complications arising from your init.el and any >> third-party packages [...] > > After running emacs-snapshot -Q, I yanked the below Emacs Lisp code into > the *scratch* buffer, evaluated it, then ran M-x erc. I left server and > port at default (irc.libera.chat and 6667, respectively), set nick to > aoddf2, and left the server password blank. I then joined ##test. I > said something in that channel from my usual client, disconnected the VM > from the network in NetworkManager Applet, and then waited a few > minutes. I reconnected and then waited again. ERC had still not > reconnected. Thanks for the logs and the lowdown As with many things IRC, there are two senses of "connectivity" at play here with regard to automatic reconnections: network and application. In your initial report, underlying connectivity is present in some form because ERC reaches the "Logging in as" stage and attempts to send an application payload, though there's no telling how far it actually gets. In your followup, network connectivity is absent due to your "disconnecting the VM", something confirmed by the logs. While I think this simulation is worth exploring, we probably shouldn't assume it's failing in a meaningfully similar way to the real-life connection you're losing to your bouncer, at least not without trying the settings you laid out initially and also seeking a better understanding of what the NM applet is actually doing when you flip the switch. So to keep things sane, we should probably treat auto-reconnecting across connectivity gaps as a wishlist item and auto-reconnecting atop healthy connections as an existing, previously unreported bug. As for the new feature, I've attached a POC patch that you can try if you're willing (usage is self-explanatory, but feel free to modify or iterate as needed). As for the other issue, I think we're going to need some genuine session logs to really get anywhere. That is, we'll likely need you to enable logging and tracing during a real session with your bouncer over a hopefully not-too-prolonged period to capture an actual reconnect sequence failing. But hold off on that for another round unless you're feeling adventurous. Thanks again. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Add-conditional-erc-server-reconnect-function.patch From 7c0d22d187400cf2445044f6526814a72b45a86d Mon Sep 17 00:00:00 2001 From: "F. Jason Park" <jp@HIDDEN> Date: Wed, 8 Mar 2023 06:14:36 -0800 Subject: [PATCH] Add conditional erc-server-reconnect-function * lisp/erc/erc-backend.el (erc--server-reconnect-timer, erc-server-delayed-check-reconnect): Add possible alternate value for option `erc-server-reconnect-function' that only attempts to reconnect after hearing back from the server. Also add helper variable. --- lisp/erc/erc-backend.el | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index 567443f5329..d1738e4f92d 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -744,6 +744,47 @@ erc-server-delayed-reconnect (with-current-buffer buffer (erc-server-reconnect)))) +(defvar-local erc--server-reconnect-timeout nil) + +(defun erc-server-delayed-check-reconnect (buffer) + "Wait for internet connectivity before trying to reconnect. +BUFFER is the server buffer for the current connection." + (with-current-buffer buffer + (setq erc--server-reconnect-timeout + (min 300 (* (or erc--server-reconnect-timeout + erc-server-reconnect-timeout) + 2))) + (let ((reschedule + (lambda (proc) + (let ((erc-server-reconnect-timeout + erc--server-reconnect-timeout)) + (with-current-buffer buffer + (delete-process proc) + (erc-display-message nil 'error buffer "Nobody home...") + (erc-schedule-reconnect buffer 0)))))) + (condition-case _ + (make-network-process + :name "*erc-connectivity-check" + :host erc-session-server + :service erc-session-port + :nowait t + :filter + (lambda (proc _) + (delete-process proc) + (with-current-buffer buffer + (setq erc--server-reconnect-timeout nil)) + (run-at-time nil nil #'erc-server-delayed-reconnect buffer)) + :sentinel + (lambda (cproc event) + (with-current-buffer buffer + (pcase event + ("open\n" + (run-at-time nil nil #'send-string + cproc "PING *connect-check*\r\n")) + ("connection broken by remote peer\n" + (funcall reschedule cproc)))))) + (file-error (funcall reschedule nil)))))) + (defun erc-server-filter-function (process string) "The process filter for the ERC server." (with-current-buffer (process-buffer process) -- 2.39.2 --=-=-=--
bug-gnu-emacs@HIDDEN
:bug#62044
; Package emacs
.
Full text available.Received: (at 62044) by debbugs.gnu.org; 8 Mar 2023 09:07:38 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 08 04:07:38 2023 Received: from localhost ([127.0.0.1]:47780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pZplp-0002ko-Aa for submit <at> debbugs.gnu.org; Wed, 08 Mar 2023 04:07:38 -0500 Received: from mail-pl1-f175.google.com ([209.85.214.175]:44818) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <woddfellow2@HIDDEN>) id 1pZplm-0002ka-MH for 62044 <at> debbugs.gnu.org; Wed, 08 Mar 2023 04:07:35 -0500 Received: by mail-pl1-f175.google.com with SMTP id a9so17007938plh.11 for <62044 <at> debbugs.gnu.org>; Wed, 08 Mar 2023 01:07:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678266448; h=mime-version:date:message-id:in-reply-to:subject:to:from:user-agent :references:from:to:cc:subject:date:message-id:reply-to; bh=04oh+PPNgN3bZM03tR7xMjRVmYG//vLhbpV16m+LhYQ=; b=cqexuTniGEqGJgsINkSp0VPtJaGKlypJ+p7utFoW97NVKZXZEtqZ2jRIy1/dqtAYwG yBocuPh/n/nSiQ+3E5ljHkTf7zfjO47bmmWiqVdVDakROdv4l6QYKVw1Nf5BnSvwGnYh QA85pb0Ldibag7zkMW5jEvnbumm0AgpcP2KflL5BcgjwzN89OgswgYBUe2857ZYAfaTB rcvMIynt9YchhwNgHToTouxhhzvYpyPzOeu8u0k7vzgwiGzpbI//9pjkJlVOzOVD16hg oLtVrwm/2dB+7PPHlXDlo9cKxU5OjNMtEMAQK4/eqWBzDE6GV0EX/tI2gZlzEZ68wWac kH/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678266448; h=mime-version:date:message-id:in-reply-to:subject:to:from:user-agent :references:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=04oh+PPNgN3bZM03tR7xMjRVmYG//vLhbpV16m+LhYQ=; b=B/KXiKAgu6SX/emqBJQjv78bve5ce247RimxXZyThs9k1sXeelXP7poLXEp6HQAtY8 Z4aBw0hgipxp5p0l21OuQFGcQCaJR1qbspu/i7lMqQmhYnc0g6zx1r+86i7xy07ycD5L CwOdpI2xofKZ24StrnIs9tOUpsLfoiS8YkUImxMOkHB+FEHSnyRnDCFpRu+++GE21Q8q ZpjQl8CDnplSbDnlFUB+iXQ+3pwzPtkM5EuhTqgItRWFrnK7Q0fnrvmCOhQVujSj9Y2E 5wclsHSOx6pZLwAXbnsTBFXVhJvokkYCNRUChexgbqCbHfE5Y3bF4dNIvVxCH+EMprkm iTJw== X-Gm-Message-State: AO0yUKUor98CmwoLfRRa4h+6llqxsuBl1KSECzrMnNTOB3FPA/lZGkoG GuVk41YM5v1AoZu/V8kPSEFtzUOtOCDh/A== X-Google-Smtp-Source: AK7set8k9n9yVdQVfTmIyP82hnOcvryEcn4m53wPlBnX9ez9ed49JHm/yPUQm5eQlfhiqcWuNa0dsw== X-Received: by 2002:a17:90a:16:b0:23a:ad68:25a4 with SMTP id 22-20020a17090a001600b0023aad6825a4mr10324153pja.10.1678266448251; Wed, 08 Mar 2023 01:07:28 -0800 (PST) Received: from localhost (068-189-034-037.res.spectrum.com. [68.189.34.37]) by smtp.gmail.com with ESMTPSA id nl2-20020a17090b384200b002311dbb2bc5sm10363506pjb.45.2023.03.08.01.07.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Mar 2023 01:07:27 -0800 (PST) References: <87wn3rg49m.fsf@HIDDEN> <87pm9jy8v7.fsf@HIDDEN> User-agent: mu4e 1.4.15; emacs 27.1 From: xoddf2 <woddfellow2@HIDDEN> To: 62044 <at> debbugs.gnu.org, emacs-erc@HIDDEN Subject: Re: bug#62044: 30.0.50; ERC 5.5: Auto-reconnect is broken In-reply-to: <87pm9jy8v7.fsf@HIDDEN> Message-ID: <87sfefr4qa.fsf@HIDDEN> Date: Wed, 08 Mar 2023 01:07:25 -0800 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 62044 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 (/) J.P. writes: > Hi xoddf2, > > [...] For starters, we need to find a recipe, all the way from > emacs -Q, that triggers the unwanted behavior. That way, we can dispense > with any possible complications arising from your init.el and any > third-party packages [...] After running emacs-snapshot -Q, I yanked the below Emacs Lisp code into the *scratch* buffer, evaluated it, then ran M-x erc. I left server and port at default (irc.libera.chat and 6667, respectively), set nick to aoddf2, and left the server password blank. I then joined ##test. I said something in that channel from my usual client, disconnected the VM from the network in NetworkManager Applet, and then waited a few minutes. I reconnected and then waited again. ERC had still not reconnected. > [...] > > Typically, if we make it to the "Logging in as" phase, we can rule out > TLS- and process-related issues (for now) and instead focus on logical > connection parameters, such as the various `erc-session-foo' variables. > If you don't mind, please do the following before connecting for the > first time in a new -Q session: > > (require 'erc) > (erc-toggle-debug-irc-protocol) > (setq erc-server-reconnect-timeout 60) > (trace-function-background 'erc--register-connection) > (trace-function-background 'erc-auth-source-search) > (trace-function-background 'erc-login) > (trace-function-background 'erc-open) > (trace-function-background 'erc-open-network-stream) > (trace-function-background 'erc-open-tls-stream) > (trace-function-background 'erc-process-sentinel) > (trace-function-background 'erc-process-sentinel-1) > (trace-function-background 'erc-process-sentinel-2) > (trace-function-background 'erc-schedule-reconnect) > (trace-function-background 'erc-server-connect) > (trace-function-background 'erc-server-reconnect) > > And, after witnessing the bug, please provide the output of the > *erc-protocol* and *trace-output* buffers (out of band, if necessary, > though ideally with minimal redactions, aside from credentials) along > with the -Q recipe mentioned earlier. *erc-protocol*: Version: 2 ERC-Version: 5.5 Emacs-Version: 30.0.50 *** This buffer displays all IRC protocol traffic exchanged with servers. *** Kill it to disable logging. *** Press t to toggle.*** IRC protocol logging enabled at Wed Mar 8 00:34:44 2023 2023-03-08T00:35:02.020240-0800 irc.libera.chat:6667 >> NICK aoddf2 2023-03-08T00:35:02.020406-0800 irc.libera.chat:6667 >> USER user 0 * :unknown 2023-03-08T00:35:02.161418-0800 irc.libera.chat:6667 << :lead.libera.chat NOTICE * :*** Checking Ident 2023-03-08T00:35:02.469048-0800 irc.libera.chat:6667 << :lead.libera.chat NOTICE * :*** Looking up your hostname... 2023-03-08T00:35:03.186250-0800 irc.libera.chat:6667 << :lead.libera.chat NOTICE * :*** Found your hostname: [REDACTED] 2023-03-08T00:35:08.306391-0800 irc.libera.chat:6667 << :lead.libera.chat NOTICE * :*** No Ident response 2023-03-08T00:35:08.306787-0800 irc.libera.chat:6667 << :lead.libera.chat 001 aoddf2 :Welcome to the Libera.Chat Internet Relay Chat Network aoddf2 2023-03-08T00:35:08.307200-0800 irc.libera.chat:6667 << :lead.libera.chat 002 aoddf2 :Your host is lead.libera.chat[94.125.182.252/6667], running version solanum-1.0-dev 2023-03-08T00:35:08.307887-0800 irc.libera.chat:6667 << :lead.libera.chat 003 aoddf2 :This server was created Thu Nov 24 2022 at 07:37:25 UTC 2023-03-08T00:35:08.308183-0800 irc.libera.chat:6667 << :lead.libera.chat 004 aoddf2 lead.libera.chat solanum-1.0-dev DGIMQRSZaghilopsuwz CFILMPQRSTbcefgijklmnopqrstuvz bkloveqjfI 2023-03-08T00:35:08.308628-0800 lead.libera.chat << :lead.libera.chat 005 aoddf2 FNC WHOX CALLERID=g ETRACE MONITOR=100 KNOCK SAFELIST ELIST=CMNTU CHANTYPES=# EXCEPTS INVEX CHANMODES=eIbq,k,flj,CFLMPQRSTcgimnprstuz :are supported by this server 2023-03-08T00:35:08.309048-0800 lead.libera.chat << :lead.libera.chat 005 aoddf2 CHANLIMIT=#:250 PREFIX=(ov)@+ MAXLIST=bqeI:100 MODES=4 NETWORK=Libera.Chat STATUSMSG=@+ CASEMAPPING=rfc1459 NICKLEN=16 MAXNICKLEN=16 CHANNELLEN=50 TOPICLEN=390 DEAF=D :are supported by this server 2023-03-08T00:35:08.309509-0800 lead.libera.chat << :lead.libera.chat 005 aoddf2 TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,PRIVMSG:4,NOTICE:4,ACCEPT:,MONITOR: EXTBAN=$,ajrxz :are supported by this server 2023-03-08T00:35:08.309867-0800 lead.libera.chat << :lead.libera.chat 251 aoddf2 :There are 70 users and 50158 invisible on 28 servers 2023-03-08T00:35:08.310079-0800 lead.libera.chat << :lead.libera.chat 252 aoddf2 37 :IRC Operators online 2023-03-08T00:35:08.310295-0800 lead.libera.chat << :lead.libera.chat 253 aoddf2 41 :unknown connection(s) 2023-03-08T00:35:08.310504-0800 lead.libera.chat << :lead.libera.chat 254 aoddf2 22988 :channels formed 2023-03-08T00:35:08.331744-0800 lead.libera.chat << :lead.libera.chat 255 aoddf2 :I have 3127 clients and 1 servers 2023-03-08T00:35:08.332278-0800 lead.libera.chat << :lead.libera.chat 265 aoddf2 3127 3449 :Current local users 3127, max 3449 2023-03-08T00:35:08.342970-0800 lead.libera.chat << :lead.libera.chat 266 aoddf2 50228 51827 :Current global users 50228, max 51827 2023-03-08T00:35:08.343304-0800 lead.libera.chat << :lead.libera.chat 250 aoddf2 :Highest connection count: 3450 (3449 clients) (314542 connections received) 2023-03-08T00:35:08.343675-0800 lead.libera.chat << :lead.libera.chat 375 aoddf2 :- lead.libera.chat Message of the Day - 2023-03-08T00:35:08.344067-0800 lead.libera.chat << :lead.libera.chat 372 aoddf2 :- Welcome to Libera Chat, the IRC network for 2023-03-08T00:35:08.344270-0800 lead.libera.chat << :lead.libera.chat 372 aoddf2 :- free & open-source software and peer directed projects. 2023-03-08T00:35:08.344460-0800 lead.libera.chat << :lead.libera.chat 372 aoddf2 :- 2023-03-08T00:35:08.344615-0800 lead.libera.chat << :lead.libera.chat 372 aoddf2 :- Use of Libera Chat is governed by our network policies. 2023-03-08T00:35:08.344813-0800 lead.libera.chat << :lead.libera.chat 372 aoddf2 :- 2023-03-08T00:35:08.344974-0800 lead.libera.chat << :lead.libera.chat 372 aoddf2 :- To reduce network abuses we perform open proxy checks 2023-03-08T00:35:08.345192-0800 lead.libera.chat << :lead.libera.chat 372 aoddf2 :- on hosts at connection time. 2023-03-08T00:35:08.345370-0800 lead.libera.chat << :lead.libera.chat 372 aoddf2 :- 2023-03-08T00:35:08.345528-0800 lead.libera.chat << :lead.libera.chat 372 aoddf2 :- Please visit us in #libera for questions and support. 2023-03-08T00:35:08.345728-0800 lead.libera.chat << :lead.libera.chat 372 aoddf2 :- 2023-03-08T00:35:08.345894-0800 lead.libera.chat << :lead.libera.chat 372 aoddf2 :- Website and documentation: https://libera.chat 2023-03-08T00:35:08.346100-0800 lead.libera.chat << :lead.libera.chat 372 aoddf2 :- Webchat: https://web.libera.chat 2023-03-08T00:35:08.346305-0800 lead.libera.chat << :lead.libera.chat 372 aoddf2 :- Network policies: https://libera.chat/policies 2023-03-08T00:35:08.346508-0800 lead.libera.chat << :lead.libera.chat 372 aoddf2 :- Email: support@HIDDEN 2023-03-08T00:35:08.346694-0800 lead.libera.chat << :lead.libera.chat 376 aoddf2 :End of /MOTD command. 2023-03-08T00:35:08.347303-0800 Libera.Chat >> MODE aoddf2 +i 2023-03-08T00:35:08.347382-0800 Libera.Chat << :aoddf2 MODE aoddf2 :+iw 2023-03-08T00:35:11.908212-0800 Libera.Chat >> JOIN ##test 2023-03-08T00:35:12.348311-0800 Libera.Chat >> PING 1678264512 2023-03-08T00:35:14.914253-0800 Libera.Chat << :aoddf2!~user@[REDACTED] JOIN ##test 2023-03-08T00:35:14.919775-0800 Libera.Chat >> MODE ##test 2023-03-08T00:35:15.268978-0800 Libera.Chat << :lead.libera.chat 353 aoddf2 @ ##test :aoddf2 xoddf2 lonjil2 Guest82707 jstoker 2023-03-08T00:35:15.269737-0800 Libera.Chat << :lead.libera.chat 366 aoddf2 ##test :End of /NAMES list. 2023-03-08T00:35:15.269837-0800 Libera.Chat << :lead.libera.chat PONG lead.libera.chat :1678264512 2023-03-08T00:35:15.678517-0800 Libera.Chat << :lead.libera.chat 324 aoddf2 ##test +Pnst 2023-03-08T00:35:15.679213-0800 Libera.Chat << :lead.libera.chat 329 aoddf2 ##test 1619537078 2023-03-08T00:35:17.932532-0800 Libera.Chat << :xoddf2!~xoddf2@user/xoddf2 PRIVMSG ##test :... 2023-03-08T00:35:42.357025-0800 Libera.Chat >> PING 1678264542 2023-03-08T00:36:12.366140-0800 Libera.Chat >> PING 1678264572 2023-03-08T00:36:42.378078-0800 Libera.Chat >> PING 1678264602 2023-03-08T00:37:12.378084-0800 Libera.Chat >> PING 1678264632 *trace-output*: ====================================================================== 1 -> (erc-open "irc.libera.chat" 6667 "aoddf2" "unknown" t nil nil nil nil nil "user" nil) | 2 -> (erc-auth-source-search :user "aoddf2") | 2 <- erc-auth-source-search: nil | 2 -> (erc-server-connect "irc.libera.chat" 6667 #<buffer irc.libera.chat:6667> nil) | | 3 -> (erc-open-network-stream "erc-irc.libera.chat-6667" nil "irc.libera.chat" 6667) | | 3 <- erc-open-network-stream: #<process erc-irc.libera.chat-6667> | 2 <- erc-server-connect: nil 1 <- erc-open: #<buffer irc.libera.chat:6667> ====================================================================== 1 -> (erc-process-sentinel #<process erc-irc.libera.chat-6667> "open\n") | 2 -> (erc--register-connection) | | 3 -> (erc-login) | | 3 <- erc-login: nil | 2 <- erc--register-connection: nil 1 <- erc-process-sentinel: nil ====================================================================== 1 -> (erc-auth-source-search :user "##test") 1 <- erc-auth-source-search: nil ====================================================================== 1 -> (erc-open "irc.libera.chat" 6667 "aoddf2" "unknown" nil nil (#1="##test") #1# #<process erc-irc.libera.chat-6667> nil "user" nil) 1 <- erc-open: #<buffer ##test> ====================================================================== 1 -> (erc-process-sentinel #<process erc-irc.libera.chat-6667> "deleted\n") | 2 -> (erc-process-sentinel-1 "deleted\n" #<buffer Libera.Chat>) | | 3 -> (erc-process-sentinel-2 "deleted\n" #<buffer Libera.Chat>) | | | 4 -> (erc-schedule-reconnect #<buffer Libera.Chat>) | | | 4 <- erc-schedule-reconnect: [nil 25608 18834 370932 nil erc-server-delayed-reconnect (#<buffer Libera.Chat>) nil 554000 nil] | | 3 <- erc-process-sentinel-2: nil | 2 <- erc-process-sentinel-1: nil 1 <- erc-process-sentinel: nil ====================================================================== 1 -> (erc-server-reconnect) | 2 -> (erc-open "irc.libera.chat" 6667 "aoddf2" "unknown" t nil nil nil nil nil "user" nil) | | 3 -> (erc-server-connect "irc.libera.chat" 6667 #<buffer Libera.Chat> nil) | | | 4 -> (erc-open-network-stream "erc-irc.libera.chat-6667" nil "irc.libera.chat" 6667) | | | 4 <- erc-open-network-stream: #<process erc-irc.libera.chat-6667> | | 3 <- erc-server-connect: nil | 2 <- erc-open: #<buffer Libera.Chat> 1 <- erc-server-reconnect: nil (Only redaction was the hostname.) > > Thanks again, > J.P. -- xoddf2 | https://wlair.us.to/ | PGP: 20EB90D3
bug-gnu-emacs@HIDDEN
:bug#62044
; Package emacs
.
Full text available.Received: (at 62044) by debbugs.gnu.org; 8 Mar 2023 07:56:25 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 08 02:56:25 2023 Received: from localhost ([127.0.0.1]:47709 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pZoeu-0000yt-VD for submit <at> debbugs.gnu.org; Wed, 08 Mar 2023 02:56:25 -0500 Received: from mail-108-mta189.mxroute.com ([136.175.108.189]:44251) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <jp@HIDDEN>) id 1pZoet-0000yg-4C for 62044 <at> debbugs.gnu.org; Wed, 08 Mar 2023 02:56:23 -0500 Received: from mail-111-mta2.mxroute.com ([136.175.111.2] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta189.mxroute.com (ZoneMTA) with ESMTPSA id 186c0388b51000edb4.001 for <62044 <at> debbugs.gnu.org> (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Wed, 08 Mar 2023 07:56:16 +0000 X-Zone-Loop: 45c078ffc21ccd07548cd1eb16e2618b019a3b40c9bb X-Originating-IP: [136.175.111.2] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=neverwas.me ; s=x; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To: 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=MxLmgjLP/gbBonxsxs/PrUDFdSvu505de1Y6jCP7+iM=; b=WctBPZgSbQ7t5hNCKTKEtxiPHP zM4ICbvS0DA+ts7h+nQxiNEfF2Ro4ZcnCrZn2Axmiyoq/f1G9BmypYlC5ak7psuHrIFIAg8x5DuwN AQ/8DLl/I36yHk2dIYTwKQy7bK7foRZjHDoOTwuqZEf8eBqn0+PhcHqJC0lBjhTOzd2GNzlIryqij pAIFU4fj198Y1cLHx2qJYGTfb4diiJbwbQHo2Y+8m6Wb+YoigNvHGPNlLZaxqshHvBAl4GVu9gA/R tvQb0lBklSJ16sz26cB11EjXRU9dFxBT3rbW19Pt6pCMIJkrlhXLSppoiOSTKuc1xauBu0l7gMlUl 49R15dgA==; From: "J.P." <jp@HIDDEN> To: xoddf2 <woddfellow2@HIDDEN> Subject: Re: bug#62044: 30.0.50; ERC 5.5: Auto-reconnect is broken In-Reply-To: <87wn3rg49m.fsf@HIDDEN> (xoddf2's message of "Tue, 07 Mar 2023 22:12:53 -0800") References: <87wn3rg49m.fsf@HIDDEN> Date: Tue, 07 Mar 2023 23:56:12 -0800 Message-ID: <87pm9jy8v7.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Authenticated-Id: masked@HIDDEN X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 62044 Cc: emacs-erc@HIDDEN, 62044 <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 (-) Hi xoddf2, xoddf2 <woddfellow2@HIDDEN> writes: > Even with the following settings: > > (setq erc-server-auto-reconnect t > erc-server-reconnect-timeout 10 > erc-server-reconnect-attempts t) > > ERC does not reconnect to my ZNC bouncer after a network outage. The > echo area reads "Connecting to example.net:6697..." and "Logging in as > `user'...", but ERC never actually reconnects, even after connectivity > is restored. The mode line continues to read "(ERC: CLOSED Fly/--)". Thanks for filing this bug. From your comments on Libera, it appears this problem has been haunting you since at least ERC 5.4 and that it also occurs with emacs -Q. If either of those is untrue, please correct the record. For starters, we need to find a recipe, all the way from emacs -Q, that triggers the unwanted behavior. That way, we can dispense with any possible complications arising from your init.el and any third-party packages, e.g., > Major mode: ERC [...] > erc-netsplit-mode: t > erc-ercn-mode: t ^~~~~~~~~~~~~~ > erc-match-mode: t > erc-hl-nicks-mode: t ^~~~~~~~~~~~~~~~~ [...] > > Features: > (shadow emacsbug cl-print help-fns radix-tree misearch multi-isearch > mule-util display-line-numbers znc advice cl smiley gnus-bcklg ^~~ Also, please be as specific as possible when describing connection parameters, whether assigned to user options or provided via entry-point arguments to `erc-tls'. For example, if you give a keyword argument of :user "me@laptop/libera" to `erc-tls', please provide something similar in the recipe, rather than simply :user "$user" And if you use auth-source, please describe the specific back end and, if possible, the rough contents of any relevant files. Typically, if we make it to the "Logging in as" phase, we can rule out TLS- and process-related issues (for now) and instead focus on logical connection parameters, such as the various `erc-session-foo' variables. If you don't mind, please do the following before connecting for the first time in a new -Q session: (require 'erc) (erc-toggle-debug-irc-protocol) (setq erc-server-reconnect-timeout 60) (trace-function-background 'erc--register-connection) (trace-function-background 'erc-auth-source-search) (trace-function-background 'erc-login) (trace-function-background 'erc-open) (trace-function-background 'erc-open-network-stream) (trace-function-background 'erc-open-tls-stream) (trace-function-background 'erc-process-sentinel) (trace-function-background 'erc-process-sentinel-1) (trace-function-background 'erc-process-sentinel-2) (trace-function-background 'erc-schedule-reconnect) (trace-function-background 'erc-server-connect) (trace-function-background 'erc-server-reconnect) And, after witnessing the bug, please provide the output of the *erc-protocol* and *trace-output* buffers (out of band, if necessary, though ideally with minimal redactions, aside from credentials) along with the -Q recipe mentioned earlier. Thanks again, J.P.
bug-gnu-emacs@HIDDEN
:bug#62044
; Package emacs
.
Full text available.Received: (at submit) by debbugs.gnu.org; 8 Mar 2023 06:13:04 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 08 01:13:04 2023 Received: from localhost ([127.0.0.1]:47663 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pZn2t-0006i1-2N for submit <at> debbugs.gnu.org; Wed, 08 Mar 2023 01:13:04 -0500 Received: from lists.gnu.org ([209.51.188.17]:56036) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <woddfellow2@HIDDEN>) id 1pZn2r-0006hb-0k for submit <at> debbugs.gnu.org; Wed, 08 Mar 2023 01:13:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <woddfellow2@HIDDEN>) id 1pZn2q-0000r1-OB for bug-gnu-emacs@HIDDEN; Wed, 08 Mar 2023 01:13:00 -0500 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <woddfellow2@HIDDEN>) id 1pZn2n-0003aL-Vw for bug-gnu-emacs@HIDDEN; Wed, 08 Mar 2023 01:13:00 -0500 Received: by mail-pj1-x1035.google.com with SMTP id m8-20020a17090a4d8800b002377bced051so1281027pjh.0 for <bug-gnu-emacs@HIDDEN>; Tue, 07 Mar 2023 22:12:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678255976; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=m2FEYiMh54GFr4TBnmlML6BYrUeDqIrER+FpNsv7LfU=; b=kPMKv98DPPbuWo+t1YG0cDhylkhoIfuJo8vLK6bKvcgVMUiOSdbZnXovS1hKd2S/kJ mMtfVfQv6YY+VVeZo94VHlFNZZdvV82erWnrNFVawY/VZ/xBRd/7h7ekAGdu8bkupNog z769486cuNqBjdaHAJ/UHcQ83DDyvUw/Qv3mCRnorRKiovS8nloyVjDlwoCDeMBPC6Ui Q+XoYmZTwZrxKGwqUz0ddlYqTBDaTbbLSf4oEexcDxIyMwHTi5KNsUejE9kB+i1YIuhb /MLiV1BDuBLia65indQyG8S/rKwb2yfUZvlOyNLPFsL/KMsFdCjXoCLhrv2Y7m8MQbxp XGww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678255976; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=m2FEYiMh54GFr4TBnmlML6BYrUeDqIrER+FpNsv7LfU=; b=j/2RQkuMSC82X4rWdHYJNalbS5jZs1ZPVg1zPWsxwDLf+njuNIoQ7xdlsYCD2IFNhZ wnVe7hQ+aUOFz4emizvyhct6iRKXiTeC745bQQQ+rsH8/2V+arnVkrUNg8CUrCeTDxa8 2IoP0BTmSAYFUqrXUMa9+gsf+81XyupWccELnpcAWOXB0DdHzvM6wvMPTWOfjDgVvflW 86EfnXWLTpergxIGMvxJcmAPifDQ/qVWMJkhlWFq03Ca9ux9HTdkHcozK2IQH+ZGxrGH mDGLfeIUpILMSQ8B2GYyl8SPA5dUjCiTiasBmSrcBvvz7xNDzPwJti0IoWWfQ0d++uLO XQTw== X-Gm-Message-State: AO0yUKUHs0Mp9KzKDlX5taPu97QgLcdVjWS2vj6fX0LdbYB2C0c4n1sE Ybhz1pXkwDx9CPN1tFvR2xe+JzpXwH0= X-Google-Smtp-Source: AK7set8w4AozURJBFP3CsloMfmpUvp4d14IXAbOQUB1j2cy/OooOAXxVatsfB+cekmqz9G3ZN+7tgw== X-Received: by 2002:a17:902:c206:b0:19e:2631:7bfd with SMTP id 6-20020a170902c20600b0019e26317bfdmr16746260pll.45.1678255975628; Tue, 07 Mar 2023 22:12:55 -0800 (PST) Received: from bookworm (068-189-034-037.res.spectrum.com. [68.189.34.37]) by smtp.gmail.com with ESMTPSA id p16-20020a170902ebd000b001994e74c094sm9268419plg.275.2023.03.07.22.12.54 for <bug-gnu-emacs@HIDDEN> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 22:12:55 -0800 (PST) From: xoddf2 <woddfellow2@HIDDEN> To: bug-gnu-emacs@HIDDEN Subject: 30.0.50; ERC 5.5: Auto-reconnect is broken X-Debbugs-CC: emacs-erc@HIDDEN Date: Tue, 07 Mar 2023 22:12:53 -0800 Message-ID: <87wn3rg49m.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::1035; envelope-from=woddfellow2@HIDDEN; helo=mail-pj1-x1035.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) 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: -2.1 (--) Even with the following settings: (setq erc-server-auto-reconnect t erc-server-reconnect-timeout 10 erc-server-reconnect-attempts t) ERC does not reconnect to my ZNC bouncer after a network outage. The echo area reads "Connecting to example.net:6697..." and "Logging in as `user'...", but ERC never actually reconnects, even after connectivity is restored. The mode line continues to read "(ERC: CLOSED Fly/--)". In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, cairo version 1.16.0) of 2023-03-07, unofficial emacs-snapshot build: http://emacs.secretsauce.net built on fatty Windowing system distributor 'The X.Org Foundation', version 11.0.12101007 System Description: Debian GNU/Linux bookworm/sid Configured using: 'configure --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --enable-libsystemd --with-native-compilation --with-pop=yes --with-tree-sitter --enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/30.0.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/30.0.50/site-lisp:/usr/share/emacs/site-lisp --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --enable-libsystemd --with-native-compilation --with-pop=yes --with-tree-sitter --enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/30.0.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/30.0.50/site-lisp:/usr/share/emacs/site-lisp --with-x=yes --with-imagemagick --with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2 -ffile-prefix-map=/build/emacs-snapshot-Vc6LHg/emacs-snapshot-20230307+emacs-28.2-164473-g4e8b50ec57b=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -fno-omit-frame-pointer' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ IMAGEMAGICK JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: ERC Minor modes in effect: erc-spelling-mode: t flyspell-mode: t erc-log-mode: t erc-autoaway-mode: t erc-list-mode: t erc-menu-mode: t erc-autojoin-mode: t erc-ring-mode: t erc-pcomplete-mode: t erc-track-mode: t erc-track-minor-mode: t erc-netsplit-mode: t erc-ercn-mode: t erc-match-mode: t erc-hl-nicks-mode: t erc-button-mode: t erc-stamp-mode: t erc-irccontrols-mode: t erc-noncommands-mode: t erc-move-to-prompt-mode: t erc-readonly-mode: t erc-networks-mode: t override-global-mode: t tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t line-number-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: /usr/share/emacs/30.0.50/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-context hides /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-context /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-contrib hides /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-contrib /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-server hides /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-server /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-icalendar hides /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-icalendar /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-update hides /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-update /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-main hides /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-main /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-config hides /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-config /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-actions hides /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-actions /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-pkg hides /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-pkg /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-lists hides /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-lists /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-helpers hides /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-helpers /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-bookmarks hides /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-bookmarks /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-headers hides /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-headers /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-message hides /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-message /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-search hides /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-search /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-compose hides /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-compose /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-contacts hides /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-contacts /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-speedbar hides /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-speedbar /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-folders hides /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-folders /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-mark hides /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-mark /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-view hides /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-view /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-vars hides /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-vars /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-org hides /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-org /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e hides /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-draft hides /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-draft /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-autoloads hides /usr/share/emacs/site-lisp/elpa/mu4e-1.8.14/mu4e-autoloads /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-context hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-context /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-server hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-server /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-icalendar hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-icalendar /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-main hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-main /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-config hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-config /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-pkg hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-pkg /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-lists hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-lists /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-helpers hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-helpers /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-message hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-message /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-search hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-search /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-compose hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-compose /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-update hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-update /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-speedbar hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-speedbar /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-folders hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-folders /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-headers hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-headers /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-view hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-view /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-vars hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-vars /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-org hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-org /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-contrib hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-contrib /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-actions hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-actions /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-contacts hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-contacts /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-mark hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-mark /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-draft hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-draft /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-autoloads hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-autoloads /usr/share/emacs/30.0.50/site-lisp/elpa/mu4e-1.8.14/mu4e-bookmarks hides /usr/share/emacs/site-lisp/elpa-src/mu4e-1.8.14/mu4e-bookmarks /home/xoddf2/.emacs.d/elpa/use-package-20230203.2004/use-package-bind-key hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-bind-key /home/xoddf2/.emacs.d/elpa/bind-key-20230203.2004/bind-key hides /usr/share/emacs/30.0.50/lisp/use-package/bind-key /home/xoddf2/.emacs.d/elpa/use-package-20230203.2004/use-package-ensure hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-ensure /home/xoddf2/.emacs.d/elpa/use-package-20230203.2004/use-package-delight hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-delight /home/xoddf2/.emacs.d/elpa/use-package-20230203.2004/use-package-core hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-core /home/xoddf2/.emacs.d/elpa/use-package-20230203.2004/use-package-diminish hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-diminish /home/xoddf2/.emacs.d/elpa/use-package-20230203.2004/use-package-jump hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-jump /home/xoddf2/.emacs.d/elpa/use-package-20230203.2004/use-package hides /usr/share/emacs/30.0.50/lisp/use-package/use-package /home/xoddf2/.emacs.d/elpa/use-package-20230203.2004/use-package-lint hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-lint Features: (shadow emacsbug cl-print help-fns radix-tree misearch multi-isearch mule-util display-line-numbers znc advice cl smiley gnus-bcklg gnus-async qp gnus-ml disp-table mailalias smtpmail textsec uni-scripts idna-mapping ucs-normalize uni-confusable textsec-check sort gnus-cite mail-extr nndraft nnmh nnfolder utf-7 network-stream nsm gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig nntp gnus-cache gnus-sum shr pixel-fill kinsoku url-file svg dom gnus-group gnus-undo gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7 nnoo gnus-spec gnus-int gnus-range message sendmail yank-media puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util text-property-search mail-utils range mm-util mail-prsvr comp comp-cstr warnings icons rx rcirc parse-time erc-spelling flyspell ispell erc-log erc-autoaway ercn erc-list erc-menu erc-join erc-ring erc-pcomplete pcomplete comint ansi-osc ansi-color ring erc-track erc-netsplit dash erc-match erc-hl-nicks color erc-button erc-fill erc-stamp wid-edit erc-goodies erc iso8601 time-date thingatpt pp format-spec erc-backend erc-networks erc-common erc-compat erc-loaddefs edmacro kmacro cl-extra help-mode use-package-bind-key bind-key easy-mmode use-package-ensure use-package-core modus-operandi-theme modus-vivendi-theme modus-themes finder-inf znc-autoloads ercn-autoloads erc-hl-nicks-autoloads mu4e-alert-autoloads s-autoloads ht-autoloads info dash-autoloads package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 1404652 266149) (symbols 48 29853 4) (strings 32 168672 35742) (string-bytes 1 3955639) (vectors 16 108362) (vector-slots 8 2328169 166965) (floats 8 496 169) (intervals 56 49583 4814) (buffers 984 45)) -- xoddf2 | https://wlair.us.to/ | PGP: 20EB90D3
xoddf2 <woddfellow2@HIDDEN>
:emacs-erc@HIDDEN, bug-gnu-emacs@HIDDEN
.
Full text available.emacs-erc@HIDDEN, bug-gnu-emacs@HIDDEN
:bug#62044
; Package emacs
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.