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#62194: 30.0.50; Two Eglot-over-Tramp tests are failing on master, passing on emacs-29 Date: Wed, 15 Mar 2023 12:45:23 +0100 Message-ID: <874jqmjl0s.fsf@gmx.de> References: <87wn3jue1q.fsf@gmail.com> <87edpqjqsv.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="29607"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 62194@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 Wed Mar 15 12:46:26 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 1pcPaM-0007WO-02 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 15 Mar 2023 12:46:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pcPZz-0001M9-Uk; Wed, 15 Mar 2023 07:46:03 -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 1pcPZy-0001Lf-E1 for bug-gnu-emacs@gnu.org; Wed, 15 Mar 2023 07:46:02 -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 1pcPZx-0003jj-Ux for bug-gnu-emacs@gnu.org; Wed, 15 Mar 2023 07:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pcPZx-00083S-R6 for bug-gnu-emacs@gnu.org; Wed, 15 Mar 2023 07:46:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Mar 2023 11:46:01 +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.167888073430925 (code B ref 62194); Wed, 15 Mar 2023 11:46:01 +0000 Original-Received: (at 62194) by debbugs.gnu.org; 15 Mar 2023 11:45:34 +0000 Original-Received: from localhost ([127.0.0.1]:39201 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pcPZV-00082i-Ko for submit@debbugs.gnu.org; Wed, 15 Mar 2023 07:45:34 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:33095) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pcPZS-00082R-KT for 62194@debbugs.gnu.org; Wed, 15 Mar 2023 07:45:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1678880724; i=michael.albinus@gmx.de; bh=nl6GsrCr905ERSwxy4/bLsSUoMmHZ5yGfpTfInlsGkU=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=uWjxwcYc02xywn9ef7kY+D9Gqd9nFaK+KpnjYXXyvkSN4dgr98qGR/j5XqNZbu/th nIK+qJlCRNNRdX19V884S5tUTk+2dIfnm++5Y4gqpaPYTZust5d3cSROgQEByRxINZ SKI/awUKHhs2pBvh+V6/qsEEHOxgUVkaDZPRGqrT9pXy0yQSdbDqVN/xppCN0L78NY IunJW4hyI3NsvpD2tVw9NC5NV/m9c7LS2fb9nfrZpEAjp50ZAX/aQ9LPXCjCLvj9+I QBssushB8YZUpFyINkaLUm9rtpuWjTkY84wAUexuelry+ULsnGxmBdZS30Fj270Q4J JfIV80oGGYslA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([185.89.39.22]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MybKf-1qRlbK3qTV-00yxbu; Wed, 15 Mar 2023 12:45:24 +0100 In-Reply-To: <87edpqjqsv.fsf@gmx.de> (Michael Albinus's message of "Wed, 15 Mar 2023 10:40:32 +0100") X-Provags-ID: V03:K1:Oc7jUB4f3hHKX2Qb4shyOh86eYKTMluBk8GuXhPnnpig2k59OOQ uJU3RvYETKF7n5ghzj+V2ztv37zGaoqqTtXN+AAkFoxB5lnPqwR/LAEQpI7AMOaU7Y9wlLv VGtJpapUwuQa7IUdfpZCpDIl4m1zQ6ALHvYXlcdWQLR5NwNfZ7il3X5tLCxpwfrxL4QOghL rP72kk/epMEVcQ7XHRPkw== UI-OutboundReport: notjunk:1;M01:P0:FznHgYyRTZo=;YBvVKPaxGWW5LYCqC8luOyhj9Of Tf1Im0k6xaNt+HtR5cOd7NriroMudh9q7bx/gi7l9BCV2PasFuWZajJ4fObt0drUEn3NVwHmD 6kqV8X/P7w1mrKdLmowNOlIa2hWKa2i02Gn1EJjMEs7SXqDFrujgbiHH/p4odR2toLwXHRdlX DbHBehsTwylGiinnIfecTg1nJCiZkv2Lu8kCzCCp6h8fdG++8Hjue9UwWjA83BEEI5FA/4xxm nmG0ZS+Ht8OM/MDJfZOxNkHILP2nwYc+1nUNHMNDP485Y53UWWwTAfk5PKdCE3sJYZLYY59BB BDegeFBOSkrz+kDwrG9Nda1OuG7DpMehwQXQSS6b21u9NMu69Lo4zq++KTT1u5v1+ekP/1ZrG gjbFcDz9ISr6soluDsiQBApE10uRy4cBeHWDjiJ//aF3J4tPiV0ajejLoakfFIDZI2HhvowoN 8aLEwXY56PwmptyyfS13EntCEBPea+i3MbQpFs+QplfGd2CRWYsVkzov14vRV8JO2PN0iGwKm AWM1LuDgVBuTKj8lSU9Rqhx0wUEUFdp0EHmGtl967zV8ojppntU/ERWvAh6k07+jDg2Qb/9fZ Z6FL5IbVsjbj3NAHi5Fy+3QVGL9MwcpbGpgf21SqvQXfRVfWYZWxWsesCZUabJpRNPeFOdA5b 6pY6liXIlkpqml6us7Ovw4SoCx25m9S1ApyUCb2wSS3Gq3RYN+PFgzOF3CFA/k//9uw1Pak4p F34uz9N3LzVksGtCe58O2CmLcGwvfRP52efSRpFY/5WcHbW4KcpJZJ426i2DlvNboG21raOb 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:257955 Archived-At: Michael Albinus writes: Hi Jo=C3=A3o, > This might not be the canonical path, but at least the local tests shall > find it. I'm running Fedora 37. Could you, pls, check? The log file is ap= pended. In order to force analysis, I have used as remote server another one, which runs Ubuntu 22.10. clangd is installed there at a canonical location: --8<---------------cut here---------------start------------->8--- # which clangd /usr/bin/clangd --8<---------------cut here---------------end--------------->8--- And I run the tests from my Fedora laptop like --8<---------------cut here---------------start------------->8--- env REMOTE_TEMPORARY_FILE_DIRECTORY=3D'/ssh:albinus@detlef:/tmp' make -C te= st eglot-tests.log SELECTOR=3D'"tramp"' --8<---------------cut here---------------end--------------->8--- Sometimes the tests pass, sometimes not. In the latter case, it is the same picture as you have reported. But I wanted to reproduce it locally. The most interesting part is the backtrace: --8<---------------cut here---------------start------------->8--- Test eglot-test-tramp-test backtrace: tramp-sh-handle-file-attributes("/ssh:albinus@detlef:/tmp/eglot--fix apply(tramp-sh-handle-file-attributes "/ssh:albinus@detlef:/tmp/eglo tramp-vc-file-name-handler(file-attributes "/ssh:albinus@detlef:/tmp file-attributes("/ssh:albinus@detlef:/tmp/eglot--fixture2kRNPt/proj. tramp-handle-file-symlink-p("/ssh:albinus@detlef:/tmp/eglot--fixture apply(tramp-handle-file-symlink-p "/ssh:albinus@detlef:/tmp/eglot--f tramp-vc-file-name-handler(file-symlink-p "/ssh:albinus@detlef:/tmp/ file-symlink-p("/ssh:albinus@detlef:/tmp/eglot--fixture2kRNPt/proj.. tramp-sh-handle-file-truename("/ssh:albinus@detlef:/tmp/eglot--fixtu apply(tramp-sh-handle-file-truename "/ssh:albinus@detlef:/tmp/eglot- tramp-vc-file-name-handler(file-truename "/ssh:albinus@detlef:/tmp/e file-truename("/ssh:albinus@detlef:/tmp/eglot--fixture2kRNPt/proj... find-buffer-visiting("/ssh:albinus@detlef:/tmp/eglot--fixture2kRNPt/ #f(compiled-function (arg1 arg2 &rest rest) "Handle notification pub apply(#f(compiled-function (arg1 arg2 &rest rest) "Handle notificati eglot-handle-notification(#) 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 apply(tramp-sh-handle-file-directory-p "/ssh:albinus@detlef:/tmp/egl tramp-vc-file-name-handler(file-directory-p "/ssh:albinus@detlef:/tm file-directory-p("/ssh:albinus@detlef:/tmp/eglot--fixture2kRNPt/") locate-dominating-file("/ssh:albinus@detlef:/tmp/eglot--fixture2kRNP vc-find-root("/ssh:albinus@detlef:/tmp/eglot--fixture2kRNPt/proj..." vc-svn-registered("/ssh:albinus@detlef:/tmp/eglot--fixture2kRNPt/pro apply(vc-svn-registered "/ssh:albinus@detlef:/tmp/eglot--fixture2kRN vc-call-backend(SVN registered "/ssh:albinus@detlef:/tmp/eglot--fixt #f(compiled-function (b) #)(SVN) mapc(#f(compiled-function (b) #) (RCS C vc-registered("/ssh:albinus@detlef:/tmp/eglot--fixture2kRNPt/proj... apply(vc-registered "/ssh:albinus@detlef:/tmp/eglot--fixture2kRNPt/p tramp-run-real-handler(vc-registered ("/ssh:albinus@detlef:/tmp/eglo tramp-sh-handle-vc-registered("/ssh:albinus@detlef:/tmp/eglot--fixtu apply(tramp-sh-handle-vc-registered "/ssh:albinus@detlef:/tmp/eglot- tramp-sh-file-name-handler(vc-registered "/ssh:albinus@detlef:/tmp/e apply(tramp-sh-file-name-handler vc-registered "/ssh:albinus@detlef: tramp-file-name-handler(vc-registered "/ssh:albinus@detlef:/tmp/eglo vc-registered("/ssh:albinus@detlef:/tmp/eglot--fixture2kRNPt/proj... vc-backend("/ssh:albinus@detlef:/tmp/eglot--fixture2kRNPt/proj...") vc-refresh-state() run-hooks(find-file-hook) after-find-file(nil t) find-file-noselect-1(# "/ssh:albinus@detlef:/tmp/eglo find-file-noselect("project/merdix.c") eglot--find-file-noselect("project/merdix.c") (set-buffer (eglot--find-file-noselect "project/merdix.c")) (save-current-buffer (set-buffer (eglot--find-file-noselect "project (closure ((server . #)) ni funcall((closure ((server . #8--- Let's analyze bottom up. The very first time Tramp is involved is here: --8<---------------cut here---------------start------------->8--- tramp-file-name-handler(vc-registered "/ssh:albinus@detlef:/tmp/eglo vc-registered("/ssh:albinus@detlef:/tmp/eglot--fixture2kRNPt/proj... vc-backend("/ssh:albinus@detlef:/tmp/eglot--fixture2kRNPt/proj...") vc-refresh-state() run-hooks(find-file-hook) after-find-file(nil t) find-file-noselect-1(# "/ssh:albinus@detlef:/tmp/eglo find-file-noselect("project/merdix.c") eglot--find-file-noselect("project/merdix.c") --8<---------------cut here---------------end--------------->8--- 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(#) 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(#8--- tramp-sh-handle-file-attributes("/ssh:albinus@detlef:/tmp/eglot--fix apply(tramp-sh-handle-file-attributes "/ssh:albinus@detlef:/tmp/eglo tramp-vc-file-name-handler(file-attributes "/ssh:albinus@detlef:/tmp file-attributes("/ssh:albinus@detlef:/tmp/eglot--fixture2kRNPt/proj. --8<---------------cut here---------------end--------------->8--- It isn't visible in the backtrace, but it is for sure the famous "Forbidden reentrant call of Tramp" error. So I reommend the following: - At least in 'eglot--call-with-tramp-test', better in your Eglot package, suppress vc related checks, by binding --8<---------------cut here---------------start------------->8--- (let ((vc-ignore-dir-regexp (format "\\(%s\\)\\|\\(%s\\)" vc-ignore-dir-regexp tramp-file-name-regexp))) ...) --8<---------------cut here---------------end--------------->8--- - If this works sufficiently, this bug shall be either closed, or merged with bug#60534, which tracks this error. Best regards, Michael.