From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: miha--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#62194: 30.0.50; Two Eglot-over-Tramp tests are failing on master, passing on emacs-29 Date: Wed, 15 Mar 2023 21:36:05 +0100 Message-ID: <875yb1pxai.fsf@miha-pc> References: <87wn3jue1q.fsf@gmail.com> <87edpqjqsv.fsf@gmx.de> <874jqmjl0s.fsf@gmx.de> Reply-To: miha@kamnitnik.top Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1588"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 62194@debbugs.gnu.org To: Michael Albinus , =?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 Wed Mar 15 21:32:18 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 1pcXnF-0000BN-8s for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 15 Mar 2023 21:32:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pcXn2-00052D-0e; Wed, 15 Mar 2023 16:32:04 -0400 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 1pcXn1-00051y-7Q for bug-gnu-emacs@gnu.org; Wed, 15 Mar 2023 16:32:03 -0400 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 1pcXn0-0005uT-Sm for bug-gnu-emacs@gnu.org; Wed, 15 Mar 2023 16:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pcXn0-0000yf-DE for bug-gnu-emacs@gnu.org; Wed, 15 Mar 2023 16:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: miha@kamnitnik.top Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Mar 2023 20:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62194 X-GNU-PR-Package: emacs Original-Received: via spool by 62194-submit@debbugs.gnu.org id=B62194.16789122833702 (code B ref 62194); Wed, 15 Mar 2023 20:32:02 +0000 Original-Received: (at 62194) by debbugs.gnu.org; 15 Mar 2023 20:31:23 +0000 Original-Received: from localhost ([127.0.0.1]:40614 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pcXmM-0000xd-EX for submit@debbugs.gnu.org; Wed, 15 Mar 2023 16:31:22 -0400 Original-Received: from mail.kamnitnik.top ([209.250.245.214]:42554) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pcXmJ-0000xU-Q0 for 62194@debbugs.gnu.org; Wed, 15 Mar 2023 16:31:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kamnitnik.top; s=mail; t=1678912278; bh=Z/SlBDQSfYv9lWj5DDK0WwiftGy2mU+SwS5Fsgf8wc0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=nU6RJhjj6qQqpGuUZ8mprDvKFfJMfkGOfVisnJ0Fz9SmPUFXmU7+j6rUUo7iwCIiy RZLiR10AEiSdCIzYKSNoIWc2NWaShZJs0PHw0aTtYbYDMMAZ5b8R7XzS11CcKDUpDS mO7E37mWB3j7CvRwm5hdjhvqHbINVrvZ72htdWf29oAGgvcPR4JiKP2iK4Fr4w+80r s6nvy/steFoWX5SiCtT9E/fGY2yYZMKrvj5LkgoLMMeiiLbytSQLNHfQgGhrBelVzC fB6darWzt++2xaZwqfeXwqit50iAPqJDMSI8GaueqcKOS/K1fKG4lcb4CP2Icp+nM+ sw19FbALeL+Mg== In-Reply-To: <874jqmjl0s.fsf@gmx.de> 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:257985 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Michael Albinus writes: > That is, file "project/merdix.c" is viewed, which has the absolute path > "/ssh:albinus@detlef:/tmp/eglot--fixture2kRNPt/project/merdix.c". It has > been loaded into the buffer successfully, and 'run-hooks(find-file-hook)' > is applied. Since the file is under vc control, 'vc-registerd' is invoked. > Some lines up in the backtrace, we see > > --8<---------------cut here---------------start------------->8--- > jsonrpc--process-filter(# accept-process-output(# tramp-accept-process-output(#) > tramp-wait-for-regexp(# nil "\\( > tramp-wait-for-output(#) > tramp-send-command((tramp-file-name "ssh" "albinus" nil "detlef" nil > tramp-send-command-and-check((tramp-file-name "ssh" "albinus" nil "d > tramp-run-test("-d" "/ssh:albinus@detlef:/tmp/eglot--fixture2kRNPt") > tramp-sh-handle-file-directory-p("/ssh:albinus@detlef:/tmp/eglot--fi > --8<---------------cut here---------------end--------------->8--- > > Tramp needs to know, whether a remote file is a directory, and it > sends the command "test -d /tmp/eglot--fixture2kRNPt". It waits for the > result in 'tramp-accept-process-output(#)' > However, 'tramp-accept-process-output' reads also the jsonrpc output by=20 > 'accept-process-output(# (accept-process-output p 0 nil t)))) I'm somewhat against these additional accept-process-output calls. While we do limit them to processes from the same ssh connection, I'd argue that usually, such processes aren't really related to the main tramp ssh process. They could be a random *shell* process that doesn't really belong to tramp.el any more IMO. Or in this case, eglot's jsonrpc process. On a bright note, I've been playing around with the original Eglot freeze bug#61350. It seems that, given two ControlMaster ssh processes where one refuses to produce output due to the other filling up the shared ssh connection, we can unblock the blocked process by sending it SIGWINCH. Here is a POC tramp-accept-process-output implementation that does this, and it seems to fix the freeze bug: (defun tramp-accept-process-output (proc &optional _timeout) "Like `accept-process-output' for Tramp processes. This is needed in order to hide `last-coding-system-used', which is set for process communication also. If the user quits via `C-g', it is propagated up to `tramp-file-name-ha= ndler'." (declare (advertised-calling-convention (proc) "29.2")) (with-current-buffer (process-buffer proc) (let ((inhibit-read-only t) last-coding-system-used result) ;; This must be protected by the "locked" property. (with-tramp-locked-connection proc ;; JUST-THIS-ONE is set due to Bug#12145. `with-local-quit' ;; returns t in order to report success. (if (with-local-quit (setq result (accept-process-output proc 0 nil t)) (when (and (not result) (process-get proc 'shared-socket)) ;; bug#62194 (tramp-message proc 10 "%s: Trying to unblock process with SIGWINCH" = proc) (internal-default-signal-process proc 'sigwinch)) t) (tramp-message proc 10 "%s %s %s\n%s" proc (process-status proc) result (buffer-string)) ;; Propagate quit. (keyboard-quit))) result))) Best regards. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJHBAEBCAAxFiEEmxVnesoT5rQXvVXnswkaGpIVmT8FAmQSLDUTHG1paGFAa2Ft bml0bmlrLnRvcAAKCRCzCRoakhWZPzP2D/9UP0tqtg9rxHlOdrEM4nuLHQUnXikT gTVEHLIhrJzDiKHblQVhJEayADbfYB/VX6VTDAqPohaX1/dLWhswMN3fvBghJfdg zJnDN+Qa4BBytLtcYgw+IXo3hk4nDahol6bph5QvkH+n10T5VTs75xzP3fl4NaMt oBB8Hh+l7qMw8g4YRL5ayPbvESE/w9fAI1by6oBam+JQhcXWkksv7GtlJDeNPJN/ 3gI95HTlGefmwTTO0vMlFYsd4GsvJnIS/zFW4NXZS360VkClH62ZGhF37xE0vK8S d01refIXY/mz6NZiKZs0fwY/TcaEbBeSPHlbtrqoA0HMlaHHr2mQBYwBrF19YKLg BjAei0kZ5zRPciYPToKZF7/0wC4a7HqNAHw+jXPM2OQMVPYPrwqyDHnXenoXuL5T zEpLTEBugAqCYM2Z24Z80H7WL6GYuE5/0pFtTx16YTPr3tPgpQpfRV35D3SthAhM 6mzNMh5MNopQtypf3INCLKEc85CurvUimXllgABO76tr7WIBKZJl5ht+b79XvLFb rSZvFR8rJhwGyFzgIA5Ga+4kecqI7hUBiMwyWVXlLMyA/t6RU6AOaGFdFFC32s0H 9L6HPx6glsMb2DaEO/6eSZ2HDktpg1gu3OMwgFbVkE2oVRu8pdpzf7BRLL1M5Gr6 6sep36Ju76k/xQ== =8wiR -----END PGP SIGNATURE----- --=-=-=--