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: Tue, 28 Feb 2023 19:37:51 +0000 Message-ID: <87k001pomo.fsf@gmail.com> 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> <877cw1swjm.fsf@gmx.de> <87k0016dgo.fsf@gmx.de> 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="10800"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) 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 Tue Feb 28 20:37: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 1pX5mp-0002Xa-5I for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 28 Feb 2023 20:37:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pX5me-0003ey-2d; Tue, 28 Feb 2023 14:37:08 -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 1pX5mZ-0003eQ-JT for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2023 14:37: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 1pX5mY-0000ue-Ce for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2023 14:37:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pX5mX-0001hy-UB for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2023 14:37:01 -0500 X-Loop: help-debbugs@gnu.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: Tue, 28 Feb 2023 19:37: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.16776129656483 (code B ref 61350); Tue, 28 Feb 2023 19:37:01 +0000 Original-Received: (at 61350) by debbugs.gnu.org; 28 Feb 2023 19:36:05 +0000 Original-Received: from localhost ([127.0.0.1]:52040 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pX5lc-0001gV-Ul for submit@debbugs.gnu.org; Tue, 28 Feb 2023 14:36:05 -0500 Original-Received: from mail-wr1-f47.google.com ([209.85.221.47]:41983) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pX5lb-0001g0-Eg for 61350@debbugs.gnu.org; Tue, 28 Feb 2023 14:36:04 -0500 Original-Received: by mail-wr1-f47.google.com with SMTP id bt28so10949258wrb.8 for <61350@debbugs.gnu.org>; Tue, 28 Feb 2023 11:36:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677612957; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=RVy8ZTJy9QNGEJP0Yxkh8eBffj9i6YjCqI47M/75UHs=; b=VHEo9JBXW8lJ20qstXQq1yHfU5UryqXtwiMU9wqdXuhPK1b5tPP/WZ+844ccH6F27u OYIwVulAW/nVIm/wwj6JAVlwRY7c22QqwipWqh6qrTEkJ/kxLtUJACO18lExd3JwsxaS u/kuRpuANp9XxHU96gaO3xXxB/sQDaPf97hJSJL4uOaZWjH0NvTLhl+tiSx+bUMyMbHl p4+/zJZfBHGgz6cB/3DFuCuHGsheD3If8Q+FyLwbg5BA625EML/QXNf1Rp/L3xxV/wpM gl5ge32uWTwft6u5n9SJPhChWcWWe0xM3XIuGsIJ2lULjDF9KK+LHxNuuyf5No4CIdhI wv7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677612957; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=RVy8ZTJy9QNGEJP0Yxkh8eBffj9i6YjCqI47M/75UHs=; b=cq1OFStXCBGVVXhj8kvDJ8bgs/Ut9037rXvn2ZYQ+ADZOJthhFSVEPYEAwFTKut4H1 8cYE1hfxbSXqlIy4Oz4SExcs4GZeXlLb5/tYGwmcV4BDN0e5MHt3OBLDYXLEOU2sEDK3 9X7Ujv/F7PSdWqz1Xc/XZcEfa+dz02b5x9ekDUCUixvUu931R+BcsQHEuvwXISaVicCq ZxxSTYP642KQwkl87L6aQ6SKgA/mV/XjeOj8EJ8CAvgRacz5NsDAJPbAY5oOLxb83wbj qQn39rG77owjezwXYW8lVyjCqBRhFcZB1irQdyBEo9ZtXLZrCgpMs8+OQQ669tgb6G1h lEDw== X-Gm-Message-State: AO0yUKU8wBuwNIAv5bS1ZMZIuH7v1+gDsXnmJ83A7+STmslYaLX9/ciI XXby9PnU3uaNu+N5gfI412qogdcjBjw= X-Google-Smtp-Source: AK7set+VR+I/NlEnNHWeP1qWkx9IIWtcTYiMlEzwGMubi9RPeJB9UioFwuTk0HH6s57+Qhlq1hAJFw== X-Received: by 2002:adf:de89:0:b0:2c9:1a3f:d5f8 with SMTP id w9-20020adfde89000000b002c91a3fd5f8mr2967677wrl.41.1677612957353; Tue, 28 Feb 2023 11:35:57 -0800 (PST) Original-Received: from krug (87-196-72-142.net.novis.pt. [87.196.72.142]) by smtp.gmail.com with ESMTPSA id a18-20020a5d53d2000000b002c70ce264bfsm10981545wrw.76.2023.02.28.11.35.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Feb 2023 11:35:56 -0800 (PST) In-Reply-To: <87k0016dgo.fsf@gmx.de> (Michael Albinus's message of "Tue, 28 Feb 2023 16:01:43 +0100") 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:257008 Archived-At: Michael Albinus writes: > Jo=C3=A3o T=C3=A1vora writes: > > Hi Jo=C3=A3o, > >> Looking at the Tramp code, I think Thomas's idea of using >> >> -o "ControlMaster=3Dno" -o "ControlPath=3Dnone" >> >> would probably be quite effective. It would work with previous >> Tramp versions that Eglot users might be using. > > Yes, that I have also in mind. > >> Thomas, can you try this patch? >> >> diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el >> index e20d209332d..83462633dd9 100644 >> --- a/lisp/progmodes/eglot.el >> +++ b/lisp/progmodes/eglot.el >> @@ -130,6 +130,8 @@ >> (defvar markdown-fontify-code-blocks-natively) >> (defvar company-backends) >> (defvar company-tooltip-align-annotations) >> +(defvar tramp-ssh-controlmaster-options) >> +(defvar tramp-use-ssh-controlmaster-options) >> >> >> >> @@ -1247,7 +1249,15 @@ eglot--connect >> (contact (cl-subseq contact 0 probe))) >> `(:process >> ,(lambda () >> - (let ((default-directory default-directory)) >> + (let ((default-directory default-directory) >> + ;; bug#61350: Tramp turns a feature on >> + ;; by default that can't (yet) handle >> + ;; very much data so we turn it off >> + ;; unconditionally -- just for our >> + ;; process. >> + (tramp-use-ssh-controlmaster-options t) >> + (tramp-ssh-controlmaster-options >> + "-o ControlMaster=3Dno -o ControlPath=3D= none")) >> (make-process >> :name readable-name >> :command (setq server-info (eglot--cmd conta= ct)) > > Even better than my proposal :-) > > There is the small risk that a user runs a local ssh client which is > not aware of the ControlMaster option. For such a user, Eglot on a > remote host might fail. > > Tramp is busy to check, whether ControlMaster could be applied. > > OTOH, I don't know if such ssh clients are still used in the wild, at > least by Eglot users. There is this risk indeed. But considering the two demographics: 1. People who use ControlMaster in ~/.ssh/config 2. People who have very old ssh clients I think that 2 is probably smaller than 1, especially if ControlMaster is such a momentous thing. So i think the risk is worth taking. Especially because an error for people in 2. is easier to recognize, understand and report than an inexplicable Emacs hang. And Eglot is a :core ELPA package, so bugfixes can be expedited. Jo=C3=A3o