From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#61350: Eglot over Tramp freezes with large project Date: Sun, 26 Feb 2023 16:58:37 +0100 Message-ID: <87h6v8mn9u.fsf@gmx.de> References: <87y1ootw2t.fsf@gmail.com> <69968923.705640.1677163650760@office.mailbox.org> <87a613f0b7.fsf@gmx.de> <87r0udvmzr.fsf@gmx.de> <878rglxrzm.fsf@gmail.com> <1898310314.855305.1677407079921@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="34878"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= , 61350@debbugs.gnu.org To: Thomas Koch Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 26 16:59:22 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 1pWJQn-0008tL-A1 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 26 Feb 2023 16:59:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWJQV-0004Kt-Hd; Sun, 26 Feb 2023 10:59:03 -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 1pWJQU-0004Kg-99 for bug-gnu-emacs@gnu.org; Sun, 26 Feb 2023 10:59: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 1pWJQU-0003FR-17 for bug-gnu-emacs@gnu.org; Sun, 26 Feb 2023 10:59:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pWJQT-0003yW-UF for bug-gnu-emacs@gnu.org; Sun, 26 Feb 2023 10:59:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 Feb 2023 15:59: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.167742713115263 (code B ref 61350); Sun, 26 Feb 2023 15:59:01 +0000 Original-Received: (at 61350) by debbugs.gnu.org; 26 Feb 2023 15:58:51 +0000 Original-Received: from localhost ([127.0.0.1]:44869 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pWJQJ-0003y7-05 for submit@debbugs.gnu.org; Sun, 26 Feb 2023 10:58:51 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:50719) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pWJQF-0003xp-6f for 61350@debbugs.gnu.org; Sun, 26 Feb 2023 10:58:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1677427120; i=michael.albinus@gmx.de; bh=ixQjP+iBysYaG/yayfWNIs3mSziainXWmJrF1nXY+aM=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=SaklybkdH9ftYKH8jEWqvGq4VGMNNwcP2kNvlPTxmfom60bLlB0gd43eozR5f/pw1 Bghshdchf6tBfkm6TaGn4hjfX9eNANTtdpbmD7/X5fK9L1sh1msgZQFORUxghjpKYP LFwHeRuJhq/hgvDW9tSwEd3+EE46WbcnOPoCCUDqOFF1EfmGj780CkeASXTkIZ3gHW jvN8naNoFeOxswHo8xPb1dhxuxfIpz2igS64teVl5T9yeVBK+pugTUpiWP3c6DwLic p8M8NRFxOSdiaTb6vN5hu7G9Ow6XnZ4kM+nOqWbjNkc1UWYBlZ/J0gCrQWWhrJ0gO6 j7dc/1J8NXlnQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([185.89.39.22]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MkYbu-1omZnq0zug-00m4fi; Sun, 26 Feb 2023 16:58:40 +0100 In-Reply-To: <1898310314.855305.1677407079921@office.mailbox.org> (Thomas Koch's message of "Sun, 26 Feb 2023 12:24:39 +0200 (EET)") X-Provags-ID: V03:K1:g2ADn7vxFYyNPtIKHyipfTVwKsZ9yq/3LpAWOSZeKxjxSrt4Cir tOIuqVeMXudY2hXvjYV60kIMtoFdnOccXu7XzOpJGWY5HQc+eHThpMyVWpabGQndJzSmccq 8sJBO2bE9xO5yXRgujYhDjRvr7DEXDqlVtFBd3ghgsEdHul68AdJM6487wrpHnauIylaNSG HSFr1e2gE5oDzCpGrji0A== UI-OutboundReport: notjunk:1;M01:P0:fyDRbmhF9nY=;8T8yzW+1vptGAFX92aDnymHUnD9 jGRwZ/JachHlmg8IoOp9BvwsqDtAJptkbAGkIFzjl3HfgHOPE3OgH+HHptXEGEuf4QBTSaTf7 QcLYd5dMUktngcyav3FWK8AnyCUh3cz6P/vNBSCK5VQjseWti/b5MW8rlhvkjTVoCSFyNT3g9 kMv2aF1Fiy0rBZ8A7AJeL8z7k4jI3Txv3kFlttgsFB7NC2wAsu+IM/OgC+KK6iyPbJfUd01iO orDf8I5yneG71TCVMS0WloSG6559Gfe8jBT9XUq6uDAVzb+MoLZq5GxRKFNEzDNE18U29VFZd i+3vpAsnxdpmj3g5L3BPD5katBVJGDeTucxaJwFNminMHQyY8Fkd7KDSKEtdzhdLSiix8L7Hd /N82DzvTmr4fNtd0nk7cUowbHuTrQcNVb62oeqhdRHHrdI4Qb/FRXQe5kqKyp/fv2dwVMr3Jy YbOCxaUU2ZvIK8Flxb2vysNiBxf38agfsLPMddY4bBwv1JoIzBTfXnEWDrqgl6JiQ704KiiXX 0Xzfeo99pMMtdpJa/hsh9SAGrbb8D3OqVfC7ux//E97ctuhySlLHm5Aik8EVJ9b8MlnHywqIh XPh2nFIyNudcPWJPKU1IuAYg9X/xV/NdlKKcJuHJzVdFvsq5oECBT3CQ5+8l9A6HVAmA8Ci+O 7v5N700TkCb3Drq4dWB5b8gjpSBsbf/BV+ycv+DQAGUxc6p6BoAP6TnAN7B8QaT1xLeTlDuuv rVfJ3+j665xgg1xtvTJwz5EPuPhgvtvvJ1pt4zoi4tItWS9TplbpWafshztsvEr1cDMV/OTd 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:256822 Archived-At: Thomas Koch writes: Hi Thomas, > Michael and I met yesterday for a debugging session. > > Eventually we tried without SSH ControlMaster (via tramp-use-ssh-controlm= aster-options). Eglot did not freeze anymore. Yep. It looks, like neither Eglot nor Tramp do it wrong. > I actually found the hint to ControlMaster already early on but probably = made a mistake when trying it: > > - Either I set tramp-ssh-controlmaster-options to nil, which is the defau= lt and does not have any effect. Do not use this variable, it is Tramp internal. Instead, set the user option tramp-use-ssh-controlmaster-options to nil *prior* establishing a connection, as explained in the Tramp manual. > - Or SSH still used ControlMaster due to my ssh config: > > Host * > ControlMaster auto This shouldn't be set for hosts you're communicating via Eglot. > I still see one > > error in process filter: tramp-error: peculiar error: "Forbidden reentran= t call of Tramp" This is *another* error, it doesn't block Emacs as described in this report. And since we have other bug reports about (bug#49954, bug#60534), I prefer to not discuss it in *this* bug report. > I don't consider this a solution but just a workaround. After all I > had tramp freeze my emacs also before I used eglot. I don't believe it is a workaround only. Using ssh's ControlMaster seems to be problematic for large data to be transferred, for whatever reason. It doesn't look like it is an error in Emacs. I might be wrong, but as I said already, after reading the code again and again (and also after extensive debugging) I have no clue what could be wrong in Eglot or Tramp. Therefore, I recommend that Eglot and Tramp manuals warn about using ssh ControlMaster option when large data are on the wire. > After reading jsonrpc and tramp source code yesterday I also believe > that Jo=C3=A3os proposal might help to make Tramp more stable. I'm not against changes in Eglot or jsonrpc. But I believe this won't help with the "Forbidden reentrant call of Tramp" problem. > I was thinking whether there could be an abstract (and reliable) > process interaction library to be used by tramp, jsonrpc and > others. In my init.el I found at least magit (magit-process.el) and > maybe org-export (ox.el) which also call external processes and need > to reliably parse process output. magit-process.el offers some wrappers for process-file, start-file-process, and even for tramp-sh-handle-process-file and tramp-sh-handle-start-file-process. So the real work is still done in Tramp. In ox.el, start-process is used with a sentinel in org-export-async-start. However, I don't see where accept-process-output is called here, it might be distributed over the Org source tree (which is much too large for me to read). > jsonrpc is special since it needs to match process output by message > id to previous process input. > > Otherwise it seems to me that there is a lot of shared logic? What do you mean by this? Best regards, Michael.