From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#61350: Eglot over Tramp freezes with large project Date: Thu, 23 Feb 2023 12:17:30 +0000 Message-ID: <87y1ootw2t.fsf@gmail.com> References: <1163788660.69273.1675787581764@office.mailbox.org> 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="20849"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Thomas Koch , 61350@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 23 13:16:19 2023 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 1pVAWH-0005E6-O4 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 23 Feb 2023 13:16:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVAW4-0001jg-LW; Thu, 23 Feb 2023 07:16:04 -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 1pVAW2-0001jF-Gy for bug-gnu-emacs@gnu.org; Thu, 23 Feb 2023 07:16:02 -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 1pVAW2-0001jA-13 for bug-gnu-emacs@gnu.org; Thu, 23 Feb 2023 07:16:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVAW1-0000kl-Nh for bug-gnu-emacs@gnu.org; Thu, 23 Feb 2023 07:16:01 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <1163788660.69273.1675787581764@office.mailbox.org> Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Feb 2023 12:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61350 X-GNU-PR-Package: emacs Original-Received: via spool by 61350-submit@debbugs.gnu.org id=B61350.16771545472873 (code B ref 61350); Thu, 23 Feb 2023 12:16:01 +0000 Original-Received: (at 61350) by debbugs.gnu.org; 23 Feb 2023 12:15:47 +0000 Original-Received: from localhost ([127.0.0.1]:33241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVAVm-0000kG-OL for submit@debbugs.gnu.org; Thu, 23 Feb 2023 07:15:47 -0500 Original-Received: from mail-wm1-f41.google.com ([209.85.128.41]:37646) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVAVk-0000k3-Oj for 61350@debbugs.gnu.org; Thu, 23 Feb 2023 07:15:45 -0500 Original-Received: by mail-wm1-f41.google.com with SMTP id j19-20020a05600c1c1300b003e9b564fae9so4323225wms.2 for <61350@debbugs.gnu.org>; Thu, 23 Feb 2023 04:15:44 -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:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Z+KM1txjPET1xkEZR9c2W4PfgnV5qdzMWYhlZLxGfh4=; b=e/yllSl7J5WDR0CVR6Wr/K/PVNQHHrSDMFEHurAWkPM936BOaeK8V5Z6Vwm8vDbYgb PbMPvVvn0Ms4a++kIwZ6atQGtTd2IJDe4bTfl/P4VGbtBzM2EzBPPEXQcSSn6E6eGEd0 H6HTBzx9nJnEgZObFIggm2q04Y6IfQVYriQqsuYrKwBCz418WIRW09inoLjrFZbUDojq NaiLSxGuoz3ipyyFyeNwvcDLWPipLHX0zmeX3Xx/Tu3peip+cJnTLiHUCcE5TuV7vZpJ sw1zAMLucuQuC3FZqbm/r/JPp/s2OXaGRmlV8uipPG7josqbaafV2A1kKGXA5tFoedEQ a+dA== 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:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Z+KM1txjPET1xkEZR9c2W4PfgnV5qdzMWYhlZLxGfh4=; b=ytr0VGqwfuOxyTUihFgcwUX0SaET8lLifP86vz9UOtV4Pda58EPSjHkeMTUkaS3UJE /ogj8avT3VZsYaeJYEMxac5iIRNVjMOUp2fRCR7mzoM6jvTaaW5hIAdgLSjj994fRsnT hGwDKHwewYHrH+aTnqO0LwpP68z4th0L+4NMHugTWbUPUdMPB3IoQsfKUL6K3sPsZJgg LWrhHE3dMMhfAG4q1Kz/JtHf4ZFcARBD3WTVK+1h6OymEd3cksJAW3OCXYTglX6m2yMU aTOn3Ea4jOTI0jCNnhaZhjCPuGMajy2E7niz4BFkCKy+Wwka/8KhXbtWwR7DC8tSooVP xnLQ== X-Gm-Message-State: AO0yUKX3KVOLjqeqjRRgewUTGbImaOQ9b79lg073qfZQr0YXB09OvTW6 vlbdCKD52ys1ZThlhvViCLg= X-Google-Smtp-Source: AK7set9P7v89+gSI7SQUT+9W0Frl+nlrgoWbfBKVgCyGmNv5mUnJsKUNXvUfPkGXQxrtUPZSTN2qjg== X-Received: by 2002:a05:600c:244e:b0:3e9:1898:30c9 with SMTP id 14-20020a05600c244e00b003e9189830c9mr4251370wmr.32.1677154538770; Thu, 23 Feb 2023 04:15:38 -0800 (PST) Original-Received: from krug (87-196-72-142.net.novis.pt. [87.196.72.142]) by smtp.gmail.com with ESMTPSA id c62-20020a1c3541000000b003e9ae2a8cbfsm3682787wma.2.2023.02.23.04.15.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 04:15:38 -0800 (PST) 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:256449 Archived-At: Michael Albinus wrote: > The problem is clear. We are in jsonrpc--process-filter (accepting process > output). This runs eglot-handle-notification, and that runs > file-truename. The latter needs to check remote, so Tramp sends a remote > command, and waits for that output (calling accept-process-output again). >=20=20 > Since jsonrpc always accepts output from *all* running processes, there > could be (and is!) the constellation, that process output has been read > already, and Tramp didn't get it, waiting for the output forever. I > could mitigate the problem partly by changing the arguments of > accept-process-output in jsonrpc-request, and eglot could work > successfully, sometimes. And sometimes not. And even then, I ran into > the famous "Forbidden reentrant call" error, see bug#60534. I see the problem more or less, indeed, thanks for reproducing it and clarifying it. Can you try your experiment again after evaluating these two lines? (cl-defmethod eglot-handle-notification :around (_ _ &key &allow-other-ke= ys) (run-at-time 0 nil (lambda () (cl-call-next-method)))) This makes the notification handlers execute "outside" the LSP server's process filter, so maybe it fix it.=20=20 I've given it very little testing and it might have other monumentally severe consequences in non-TRAMP cases, so take it with a grain of salt. If the fix works, maybe it could be done upstream in jsonrpc.el itself. Jo=C3=A3o