From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "J.P." Newsgroups: gmane.emacs.bugs Subject: bug#54458: 27.2; erc-dcc-get: Re-entering top level after C stack overflow Date: Tue, 29 Mar 2022 21:02:44 -0700 Message-ID: <87mth8rst7.fsf__31446.9605962344$1648613020$gmane$org@neverwas.me> References: <78459EAB-314B-4122-8E3B-7F82685D0DBA@acm.org> <83a6da9vm8.fsf@gnu.org> <87r16m46uf.fsf@neverwas.me> <4DA2DB05-D902-42DF-860D-87617FBB74C8@acm.org> <83k0cc907r.fsf@gnu.org> <5A8EE4CF-6F5E-4119-8765-8E301E2BE935@acm.org> <87czi435nh.fsf@neverwas.me> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2377"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: fernandodemorais.jf@gmail.com, emacs-erc@gnu.org, bandali@gnu.org, 54458@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 30 06:03:32 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nZPYS-0000QQ-J3 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 30 Mar 2022 06:03:32 +0200 Original-Received: from localhost ([::1]:37084 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nZPYR-0003QS-Da for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 30 Mar 2022 00:03:31 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51652) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZPXy-0003Nb-E3 for bug-gnu-emacs@gnu.org; Wed, 30 Mar 2022 00:03:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40222) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nZPXy-0002PL-5E for bug-gnu-emacs@gnu.org; Wed, 30 Mar 2022 00:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nZPXx-00013B-SE for bug-gnu-emacs@gnu.org; Wed, 30 Mar 2022 00:03:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "J.P." Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Mar 2022 04:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54458 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 54458-submit@debbugs.gnu.org id=B54458.16486129804030 (code B ref 54458); Wed, 30 Mar 2022 04:03:01 +0000 Original-Received: (at 54458) by debbugs.gnu.org; 30 Mar 2022 04:03:00 +0000 Original-Received: from localhost ([127.0.0.1]:34119 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZPXw-00012w-D9 for submit@debbugs.gnu.org; Wed, 30 Mar 2022 00:03:00 -0400 Original-Received: from mail-108-mta66.mxroute.com ([136.175.108.66]:43843) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZPXt-00012h-Q1 for 54458@debbugs.gnu.org; Wed, 30 Mar 2022 00:02:58 -0400 Original-Received: from filter006.mxroute.com ([140.82.40.27] 140.82.40.27.vultrusercontent.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta66.mxroute.com (ZoneMTA) with ESMTPSA id 17fd8fd846b000fe85.002 for <54458@debbugs.gnu.org> (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Wed, 30 Mar 2022 04:02:47 +0000 X-Zone-Loop: 18b7612a5374c7c8194742df2cc2b33e5ce5df60179c X-Originating-IP: [140.82.40.27] In-Reply-To: <87czi435nh.fsf@neverwas.me> (J. P.'s message of "Tue, 29 Mar 2022 12:44:34 -0700") X-AuthUser: masked@neverwas.me X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:229088 Archived-At: "J.P." writes: > Mattias Engdeg=C3=A5rd writes: > >> Attached is a proof of concept: if process-send calls are invoked when >> another activation already exists, just enqueue the data and let the >> previous activation deal with the actual transmission. That nips the >> recursion in the buds. > > This seems an ingenious way of helping problematic code that already > exists. I'll give it a whirl just for fun. (But alas, I know nothing.) FWIW, I ran ERC's I/O heavy test suite (not yet part of Emacs) against these changes, and it passed. I also tried them out on that quasi-repro recipe (the one with the python script), and the problem vanished transparently, as expected. BTW (cc. Fernando), the reason I simply dropped nested send attempts in that earlier patch was because their payloads (those 4-byte receipts) are only meaningful to a sender honoring "the spec" [1], which says The sender should not continue to transmit until the recipient has acknowledged all data already transmitted. IOW, there shouldn't be prohibitive wire pressure when dealing with an obedient sender, so we needn't worry about an outgoing receipt being dropped (right?). And for corner-cutting senders, either those just treating receipts as heartbeats and ignoring their contents or those never bothering to read from the socket at all, "sparse but strictly increasing" should always suffice, I think. If I'm wrong on either count, we can always add more complexity. QUICK ADMINISTRATIVE NOTE: this whole time, I've been neglecting to Cc the emacs-erc mailing list (a lapse in professionalism on my part). So for anyone replying up thread, please cc. emacs-erc@gnu.org, if you happen to remember. Thanks. [1] https://www.irchelp.org/protocol/ctcpspec.html