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: Tue, 28 Feb 2023 13:59:19 +0100 Message-ID: <87ilfmrlnc.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> <87cz5wmjbx.fsf@gmx.de> <87h6v8f7u9.fsf@gmail.com> <87o7pflfcd.fsf@gmx.de> <87wn43e9ht.fsf@gmail.com> <874jr6oont.fsf@gmx.de> <87sfeqd4zi.fsf@gmail.com> <877cw2m5wm.fsf@gmx.de> <871qmarplp.fsf@gmail.com> 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="9199"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Thomas Koch , eliz@gnu.org, 61350@debbugs.gnu.org To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 28 14:00:52 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 1pWzb9-0002H5-MS for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 28 Feb 2023 14:00:51 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWzaO-0008KL-RD; Tue, 28 Feb 2023 08:00: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 1pWzaN-0008FI-7G for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2023 08:00:03 -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 1pWzaM-0006bW-JT for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2023 08:00:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pWzaM-00079p-Dz for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2023 08:00:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Feb 2023 13:00:02 +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.167758917627452 (code B ref 61350); Tue, 28 Feb 2023 13:00:02 +0000 Original-Received: (at 61350) by debbugs.gnu.org; 28 Feb 2023 12:59:36 +0000 Original-Received: from localhost ([127.0.0.1]:49907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pWzZw-00078i-0D for submit@debbugs.gnu.org; Tue, 28 Feb 2023 07:59:36 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:33987) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pWzZu-00078V-Jv for 61350@debbugs.gnu.org; Tue, 28 Feb 2023 07:59:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1677589167; i=michael.albinus@gmx.de; bh=lwwEvtokdQ5kQXwm83b9elnPvHCfGnLSNNkyi+Z9NDk=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=DNF/HudcTrb4QRqqds4SfyGupZEzP+GIQtoPp7Nqc+/vTisnynuoWKc79R1cz4iP7 OiFxNoBRN+WlwDR2/EqoXuTjvPlq4lLDUHRCbuKLu3zB0d9rexkZjO3N7K3jrWyVb3 c6/p0ukgefus47q9MOhR9NgrGiLxdZO89yTeaNPoFoIuDQKsJ27A2ajUjOokcUk1vF F+RLX2hlM0HbM1s+4QKVG0lazvhUanWGmBXVPvh/MsZQfHUDgWhz+fk+ikdeJ1qqQy rFrA7GKVakwJLb1sn1m5wrK+HF5B6iuN5+nGwYuoAGkvL0Iykk2NOZcf2aLNKKwzQt QN2DDymTJm9cw== 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 1MJVHU-1pD7H51v1k-00Jqw6; Tue, 28 Feb 2023 13:59:27 +0100 In-Reply-To: <871qmarplp.fsf@gmail.com> ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Tue, 28 Feb 2023 11:33:54 +0000") X-Provags-ID: V03:K1:7RXE5X0SJmOqe0NADfXtVKtAIG/Pq35ZEOnqkHgtj0163LABfm6 na+cpGn5hnOq32LBgdTgdeJmQ8MAuksUep8PG5aXzC8bCS9HF0drk/uHOJmdhsrFAF5ydmW DXfNG24OrlhKriTJfesc2rShyGj1ruoOdbCljh3ClzSlyPmHCtN5A4z+GmfM4T3YjisvV/4 rFHXkk2z9lyQsv2MvNiTw== UI-OutboundReport: notjunk:1;M01:P0:wpi5KNx1+JQ=;T7RJe22+j+vCNjvB84MPgBw6yDo KnKessFzAnhKI9vFzcW0dwzM1Yh39iren+lBWiDxYMB4TduaJoMaxCYhzgrFMCVLHvdnCIAGg NjxVzZGd5ZQa/mY5/sjjSV7jGwALuG4JC7fPy2mOLVJey5LAybQ7ZW9tUwZ8OH+BbM9/gFgD/ 9Avp4qCr5mUpOxXVxGBLdl13iIFfMe1EqSnQ6h8lEg05su3nwHmKyYdN2lHJXRMYKcNOIOXf0 LOQ8ncjjVqv8KDNyu83IXKuecbziY4JkD/mFnBiGVfB7uhm66rgWNGtrXwy4GSKx1xQaW59jJ vlHEmugoScty4mHF05yRehu4sUwRGFzn8OvKZIRlm2UMjvhYuPxo6WoYwJyGkCxUncW5gJlXi hh6FlX6AqBdahBqp7bNFuvPOsk7XP2Hhcbypo6GvDYMbZppgbvm7oiI9Mn+HBfNUIuxsKweXV 6klP/MhcehPEJmwdJ8xWTBG5K7FIEc6pnk/tpMB1HP9/q+Sie54Ovy5FKBSRGf+FyqcYfOyIo w3tLRd7QK9Vid0hSZvDtRLyuOv/Wh+z+WVDqLS/B737pNMOjt2/7LnXi8VBtG4S+WcB/wr3Yz OaEsKk8DuHJVJT0x+CeNKR2rkYeigDZEYO1xsiVhTFts5AOALxkOpYC6qTV6+FgpPTzI1BKqw ujwkqLLqxlLTxb75o+02zRiK2lOsO/vgyAGJkuO3N8oByWjuFcFNHIPnn+4p1JHfbhMIYlQIl sGeOcD/Z7mloL9Mpy81bO9txeynIsPud9r0fAlsoB0dV+y+kg/U4I1tk1vG/M6Co3Rt6uDuF 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:256956 Archived-At: Jo=C3=A3o T=C3=A1vora writes: Hi Jo=C3=A3o, >>> ...is it though? :-) Can a feature that hangs when presented with more >>> data than usual (however one defines that) be considered stable? >> Tramp supports ControlMaster since Emacs 24. Eglot is the first case >> I've heard of problems. I don't deny it > > That could be because, as far as I understand, Eglot is the first > "major" package to use the transparent (make-process ... :file-handler > t) which, AFAIU, means that Eglot's process, which doesn't really > transmit _that_ much data, is piped transparently through Tramp's > process managing the remote file whose buffer M-x eglot is executed in. Eglot is not the first user of this. But Eglot sends a huge amount of data over the wire, which seems to trigger the problem. For example, lsp-mode uses start-file-process-shell-command, which calls under the hood make-process similarly. >>>> It is essential. I have been beaten by many Tramp users to support it. >>> I'd say something "essential" is something you can't live without. But >>> that doesn't seem to be the case here. >> Ohh. You haven't seen how much Tramp has been blamed because it doesn't >> support it out of the box. > > I understand, but it's the occasionally-exploding racecar all over > again. I understand your reasoning: you're betting that it's acceptable > for the ocassionally-exploded user to learn opt-out for a slightly > slower car. > > The thing is they will probably blame the steering wheel, Eglot, > because -- Tramp being "transparent" -- that's what they see. > > Ideally, we would just fix this. It would be nice to understand what > actually happen and what information is lost, presumably to > ControlMaster's gremlins. I think bringing in Eli's knowledge of > process.c internals could be beneficial here. I'm not against changing Tramp, really. But first I must understand what's the problem, and why a change will solve it. Without other collateral damages. > Here are some questions. Apologies in advance if some of them are in > the "FM". The Tramp manual misses detailed implementation notes. On my TODO for years, but it didn't happen until now. > 1. When I open a single remote file on a remote host, I am creating > Tramp process, I presume. Yes. In Tramp slang, this is the (main) connection process. > 2. If I kill this buffer and re-visit it, is the Tramp process re-used > somehow or is a new one created? The same connection process is used. > 3. If I open another nearby file on the same host, I am sharing that > Tramp process? Yes, as long as the remote identification (method, user, host) are the same. > 4. What about in a different host? A new connection process. Also if just the method or user changes. "/ssh::" and "/scp::" use different connection processes. > 5. Is there any way to get an overview of which Tramp processes are > "responsible" for each set of remote files? The so called connection buffers. This is always a buffer with the name "*tramp/METHOD HOST*" or "*tramp/METHOD USER@HOST*", depending whether there is a user name, or not. See function tramp-buffer-name. The Tramp connection processes are bound to these buffers. > 6. Now if I M-x eglot in a Tramp remote file that I had been working on > Eglot-less for a while, is the Eglot process tunneled through the > existing Tramp process, reusing it, or is a new one started? It depends. A synchronous process, created by process-file, is tunnelled through the connection process. An asynchronous process, created by make-process or start-file-process, is a new one. > 7. If an existing process is reused, is there any way to force Tramp to > open a new one, perhaps with slightly different configuration > options? No need for synchronous processes. And for asynchronous processes, they have their own process. If configuration options are changed prior the make-process call, they apply. > Jo=C3=A3o Best regards, Michael.