From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mike Kazantsev Newsgroups: gmane.emacs.bugs,gmane.emacs.erc.general Subject: bug#59976: ERC 5.4.1: erc-networks--id gets clobbered in erc server buffer on /query name conflict Date: Mon, 12 Dec 2022 00:00:31 +0500 Message-ID: <20221212000031.2f679e5e@malediction> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11212"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-erc@gnu.org To: 59976@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 11 20:02:35 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 1p4Ras-0002iq-H8 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 11 Dec 2022 20:02:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p4Rab-0001Vm-Lb; Sun, 11 Dec 2022 14:02:17 -0500 Original-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 ) id 1p4RaN-0001Rf-38; Sun, 11 Dec 2022 14:02:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p4RaM-0004VS-Nf; Sun, 11 Dec 2022 14:02:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p4RaM-0001vp-IB; Sun, 11 Dec 2022 14:02:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mike Kazantsev Original-Sender: "Debbugs-submit" Resent-CC: emacs-erc@gnu.org, bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Dec 2022 19:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59976 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-emacs@gnu.org X-Debbugs-Original-Xcc: emacs-erc@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16707853037416 (code B ref -1); Sun, 11 Dec 2022 19:02:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Dec 2022 19:01:43 +0000 Original-Received: from localhost ([127.0.0.1]:47703 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4Ra2-0001vY-Lu for submit@debbugs.gnu.org; Sun, 11 Dec 2022 14:01:43 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:37204) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4Ra0-0001vS-PW for submit@debbugs.gnu.org; Sun, 11 Dec 2022 14:01:41 -0500 Original-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 ) id 1p4Ra0-0001JF-FC for bug-gnu-emacs@gnu.org; Sun, 11 Dec 2022 14:01:40 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p4RZz-0004SZ-Ud for bug-gnu-emacs@gnu.org; Sun, 11 Dec 2022 14:01:39 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by fencepost.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p4RZz-000897-PY for bug-emacs@gnu.org; Sun, 11 Dec 2022 14:01:39 -0500 Original-Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p4RZx-0004F7-O2 for bug-emacs@gnu.org; Sun, 11 Dec 2022 14:01:39 -0500 Original-Received: by mail-lf1-x12e.google.com with SMTP id q6so5047888lfm.10 for ; Sun, 11 Dec 2022 11:00:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:subject:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=broxYTwBrX2pFmNbSvrPx4OCqFJuGfWQIG7xCv3RKUE=; b=ClTlPEdxzBKi6HfD8iJV8qt6+AAvDcb2BQeVa5yV9hOzEBZzSdsAeYCdSnNrvERUHs Kjw0U9ZKWnGdc6yv8otEkHEv50/1POFDHptQdq+2IADdUsNIaOoCZ77mldxzfXM63gPs tpzCCM7AG1G606NZBH5CkJ5WSIm3fTjFTDzU4UCQmlc8hcEJA675jnmv+ZtXNjZLCH6h pX8OU/tIvuA33TCFcmYloaabHoxQCOCRdOOHSwhaBVhxCTybm9Gd1drIFTOMcbBn+2qy lDECvPFiinmVXyooNlGn/p0McnBXQEgE5Lbgiq8M1Sb3hw0663qr2bGggpkeFcOCCI5B FDBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:subject:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=broxYTwBrX2pFmNbSvrPx4OCqFJuGfWQIG7xCv3RKUE=; b=GkOqu6bZWs9gxzVIY5UcyuGj1TKyOnosOKlMuu2IdxtOjpDvUnJiOSkaGlMcqXozSM aSQOjWVD/Arp4PjVBrX9eOgbUVZbf8ToGyontZsLZkcDbKflHn6fTRIqQAeivP6n7G4T GdzlI8pCkSVPVS3UPmGPP0IQ/zVRyJvPy4BcPV6X1MdN9LSPjX7VOP/joE2DPwL6fjVp NnR644j9StcamvxIYj4gQpWDwDs7DP4XYucVEMKHrjHUlaBjUSIomGSJk2/r3qjAYg5T 766REtWal+cGY/yQgaCW0Rt2ph51IH40K11HODF9YaoYFNgRJBoYdTfL5TuipcSbVazO 54kw== X-Gm-Message-State: ANoB5plj2Yt8JR78R2c+gA2D5HaRk/Uz5zbu7r4G01h7a+Kolt+9OyPV 4hZ0dmunYDnpCxnA1YYPCJKYssjV7Y0= X-Google-Smtp-Source: AA0mqf42/ZkdefQkC56saE530wov7mLr6Hg7UX5KH/stJabJDjB9px4N9qjbkt5uzRrN3qdS29Kf3g== X-Received: by 2002:a05:6512:b10:b0:4b1:3960:4cf8 with SMTP id w16-20020a0565120b1000b004b139604cf8mr4525747lfu.28.1670785234774; Sun, 11 Dec 2022 11:00:34 -0800 (PST) Original-Received: from malediction ([46.48.96.28]) by smtp.gmail.com with ESMTPSA id x24-20020a19e018000000b00498f23c249dsm1287785lfg.74.2022.12.11.11.00.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Dec 2022 11:00:33 -0800 (PST) X-Mailer: Claws Mail 4.1.1 (GTK 3.24.35; x86_64-pc-linux-gnu) Received-SPF: pass client-ip=2a00:1450:4864:20::12e; envelope-from=mk.fraggod@gmail.com; helo=mail-lf1-x12e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_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-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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:250650 gmane.emacs.erc.general:2027 Archived-At: Hi. I've needed to use case-sensitive channel names (with matrix2051 ad-hoc ircd), wanted to test updated ERC client for that, and stumbled upon what looks like a bug there: When IRC server is named "slack", and then it sends you a message from user named "slack", ERC tries to open query-buffer "slack", ends up running erc--open-target("slack") which does kill-all-local-variables() when enabling erc-mode in the buffer. That removes erc-networks--id value there and from then on ERC keeps spamming "error in process filter" about erc-networks--id being nil. - What I'm trying to do: - (erc-tls ...) ;; cleates "slack" server buffer and some channels. - Open "slack" buffer - Send "/ping myuser" IRC-command there - Expected result: Command actually results in PRIVMSG from "slack" user on this specific ircd, so I expect to see that open a separate query-buffer where that message is displayed. (message in question - though probably doesn't matter: "msg: ^APING 1670781447.080567^A could not be sent channel_not_found") - Actual result: - Emacs slows down while printing following errors to MiniBuffer and *Messages*: error in process filter: or: Wrong type argument: erc-networks--id, nil error in process filter: Wrong type argument: erc-networks--id, nil - As far as I can tell that IRC connection becomes unusable, and errors like above get signaled from then on randomly, likely on some commands sent from ircd. - Workaround: changing announced name of the server to something else helps - "slack" query-buffer gets created and is separate from server buffer. Was able to understand what seem to be the issue here by enabling logging for erc-networks--id changes to *Messages* like this: (defun debug-watch-log (sym newval op where) (message "Variable update: %s = %S -> %S [%S %S]" sym (symbol-value sym) newval op where) (backtrace)) (add-variable-watcher 'erc-networks--id #'debug-watch-log) (run M-x cancel-debug-on-variable-change afterwards to disable this) I think some kind of disambiguation or conflict-detection for query-channel names might be either missing or not working atm, but is needed to avoid this happening unintentionally, or maybe even on purpose (e.g. to annoy someone by cutting their IRC connection). I'm running ERC 5.4.1 from current 0e5d059 git master on Emacs 28.2 (replacing "erc" dir in /usr/share/emacs), so it is also possible that maybe some change in Emacs 29+ prevents this behavior, but it seems unlikely. Thanks. -- Mike Kazantsev // fraggod.net