From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#73046: 29.4; Emacs 100% CPU usage for several seconds when opening dired buffer over TRAMP Date: Wed, 11 Sep 2024 16:06:46 +0200 Message-ID: <877cbiffnt.fsf@gmx.de> References: <87o75241qh.fsf@gmail.com> <86plpi2ixa.fsf@gnu.org> <87seudke20.fsf@gmail.com> <8634md2vc2.fsf@gnu.org> <87h6asrk42.fsf@gmx.de> <86a5gk28ht.fsf@gnu.org> <87le0450x8.fsf@gmx.de> <865xr8228d.fsf@gnu.org> <87jzfofzcl.fsf@gmail.com> <8634mc1ty0.fsf@gnu.org> <87h6asl3hl.fsf@gmail.com> <86ttesyo1t.fsf@gnu.org> <87bk0zjzt1.fsf@gmx.de> Reply-To: Michael Albinus Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5708"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Suhail Singh , 73046@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 11 16:25:57 2024 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 1soOI8-0001GO-PI for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 Sep 2024 16:25:56 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1soOHe-0004LV-6w; Wed, 11 Sep 2024 10:25:28 -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 1soOGK-0003Jf-5W for bug-gnu-emacs@gnu.org; Wed, 11 Sep 2024 10:24:08 -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 1soOAV-0007jO-St for bug-gnu-emacs@gnu.org; Wed, 11 Sep 2024 10:24:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=i9u3HNkSH6PneQGEWhBJFvdPZhoqq1IrCY5tXaqZmI0=; b=JSeR4dN45x6BdjuRkYiqu8e+LLLUkI0wZWuNt+TrwDUYsyg9+UI8ruI63+mn7NrfkKtCEKMr6DbrB96rD3x82nID9H68md6P3wn+CpOAADfF872oMNrG9VYRx7xtdiECSdM2V3OX2hu2Puu/rt7QTP7iSM1AP1o97tRrw2hM3yROmnUaB/B6DIHiLqGBFFj3IRX9BL6wf2tclRemBl0MoVSsHWsCde4Xlr6FMdrIktr9XgOUfiXLpON62/ohqCeAkB0/QH9hd17NkxkBwkrMo/dgrhNNJsPfZOuYy4xYh//52f1csRJHTu1S99fS1U71GkEpdTqYvN6nzqBzwe70uA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1soO0n-0004Sv-Lf for bug-gnu-emacs@gnu.org; Wed, 11 Sep 2024 10:08: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, 11 Sep 2024 14:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73046 X-GNU-PR-Package: emacs Original-Received: via spool by 73046-submit@debbugs.gnu.org id=B73046.172606363217006 (code B ref 73046); Wed, 11 Sep 2024 14:08:01 +0000 Original-Received: (at 73046) by debbugs.gnu.org; 11 Sep 2024 14:07:12 +0000 Original-Received: from localhost ([127.0.0.1]:39291 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1soNzx-0004QB-EL for submit@debbugs.gnu.org; Wed, 11 Sep 2024 10:07:12 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:50879) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1soNzt-0004PY-BC for 73046@debbugs.gnu.org; Wed, 11 Sep 2024 10:07:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1726063610; x=1726668410; i=michael.albinus@gmx.de; bh=i9u3HNkSH6PneQGEWhBJFvdPZhoqq1IrCY5tXaqZmI0=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=ZQ/kyhEbRAQ/5R4U8WWEz2WON8SiV1/3EUSLURR645N3VFkhFdYZ76PfuW3YZPqE LU7wY5osRT4SFfr+6MnC7DqVIHkZOjunvpMncoIx9UxEbi0x/io9OEvMFlBs24fAv +jqct+88KqaYz9qDhExR+UjNPArRkDInSzUlVJ+graXNVN2OIMD0PTXcjTGMGreI8 9lAH98o/raooS/9Yy8+RojozzyPRX/qVLnZEwSkUIxtmE4O5Uz0NqRHK5H6abxZmS OF2UvrFn+TWPhrh5bBRn1OPBv1UFZAhQd2DTlyqpXVwgma9Tys6HuzGYXWfId2b52 ZFxzcmXSWkC9Ek98dA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([185.89.38.155]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MY6Cl-1sVTWB0Lk5-00HwPb; Wed, 11 Sep 2024 16:06:50 +0200 In-Reply-To: <87bk0zjzt1.fsf@gmx.de> (Michael Albinus's message of "Sat, 07 Sep 2024 16:36:42 +0200") X-Provags-ID: V03:K1:vxkqKcWQM1lbRna+24VGNIT7Lx07oYnX7Q3V+UVYcF7/ZrDWTbK AZkC/lXCwu2kXt8IAMZHtY3kq9xnKuFxgEl6hx+Vo8a+KZcixDGAmylGFeMZioCXNsqajIe PBlKs7niqQJjh2Pi8zcjDhb9mA8eIlOlqwIrS7Gu5sQs2nhBT9N0z6tc0tC4Pi5Hego8zgp oyBoAfLyrcaMYdLHuagDw== UI-OutboundReport: notjunk:1;M01:P0:UNa3E18qQio=;Xt/GH8eGYHwJBISTV7mRZ8zGjeX EtVpez6Ssug9N+kA2Upwg9CHs5wF5x77rIk5wXIfzqgpLRZWTTY9AFByVlwPVQE1f+fV0DdMC k4AoRedJ53Tz0xA0Aczu5Eo3tnfqhFmEKsqI/cuoMkhwBYemwcobTqU5j2jBhDyR4G1QX0XHg EVbKf5XZduXLssd4IXKf1aXtRKKXseaJMRyfiiRDamfe6gPDZAkGaV4EOMDf/zZQ6W3wyPkrz DR9b9Pg5xJTPioojXTNWI7ckyeQ7x9td8bRahK0SCWVNwJA1rxl2KiN5sAG8MjjGqnjHIt8Ad hYk5+/1IT34iEZayrhkNd1/enKKvSo6g0h09aG4Sb3jJ8Kl+FDIhUgl+/laBLmLJH+71Y1i4z jr9eHmkItbCPGZD/5CBwsX0jb83z53RF5d7Pexc4T9ovyuC+RMQwtX/kDFZqmF2yqnAwGobgd QnyWExzCWGI1zjn0KrSt9M62xjKbA3RNoIZTzJxQ8Um3i02/QJnaB5hXX3aXramnh99Wa3awT O6WvtQw/azXLt17ZMZAorlEppygL6CzRH6pEiU3t8FkqkmofoELvOIGtU7JbxwWYveUvWKT54 DwvP2FB1G00dpA7FmtaF5eyBv5oujz3D0nN+2QHBjKJrJAiIbheN/l84W2F/qG9n/EAT8dTrf W69bSbF25HgEJyhNerxcjkMIzfocombatKAPYiphcGt3IMQpbVvlbnzLRccRdat2WzW1oti8S w9Sta/QMxTtGWL5SrUYM03kW2+BYw/E3njZPJSKjcFNlJ+ZsVCVzboSGFuM9cEBJuHfNd2Dz 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:291602 Archived-At: Michael Albinus writes: Hi Eli, > I made a test. In a remote directory I have created a cyclic symlink > "zzz", in order to see what Tramp does when running dired on the > directory. The additional actions are [...] > 15 times the "test -h" command - I guess, Tramp shall do cyclic link > detection better. I've analyzed the case in detail. Tracing file-truename and tramp-sh-handle-file-truename. --8<---------------cut here---------------start------------->8--- ====================================================================== 1 -> (file-truename "/ssh:gandalf:~/tmp/zzz") | 2 -> (tramp-sh-handle-file-truename "/ssh:gandalf:~/tmp/zzz") | 2 <- tramp-sh-handle-file-truename: !non-local\ exit! 1 <- file-truename: !non-local\ exit! ====================================================================== 1 -> (file-truename "/ssh:gandalf:~/tmp/zzz") | 2 -> (tramp-sh-handle-file-truename "/ssh:gandalf:~/tmp/zzz") | 2 <- tramp-sh-handle-file-truename: !non-local\ exit! 1 <- file-truename: !non-local\ exit! ====================================================================== 1 -> (file-truename "/ssh:gandalf:~/tmp/zzz") | 2 -> (tramp-sh-handle-file-truename "/ssh:gandalf:~/tmp/zzz") | 2 <- tramp-sh-handle-file-truename: !non-local\ exit! 1 <- file-truename: !non-local\ exit! ====================================================================== 1 -> (file-truename "/ssh:gandalf:~/tmp/zzz") | 2 -> (tramp-sh-handle-file-truename "/ssh:gandalf:~/tmp/zzz") | 2 <- tramp-sh-handle-file-truename: !non-local\ exit! 1 <- file-truename: !non-local\ exit! ====================================================================== 1 -> (file-truename "/ssh:gandalf:~/tmp/zzz") | 2 -> (tramp-sh-handle-file-truename "/ssh:gandalf:~/tmp/zzz") | 2 <- tramp-sh-handle-file-truename: !non-local\ exit! 1 <- file-truename: !non-local\ exit! ====================================================================== 1 -> (file-truename "/ssh:gandalf:~/tmp/zzz") | 2 -> (tramp-sh-handle-file-truename "/ssh:gandalf:~/tmp/zzz") | 2 <- tramp-sh-handle-file-truename: !non-local\ exit! 1 <- file-truename: !non-local\ exit! ====================================================================== 1 -> (file-truename "/ssh:gandalf:~/tmp/zzz") | 2 -> (tramp-sh-handle-file-truename "/ssh:gandalf:~/tmp/zzz") | 2 <- tramp-sh-handle-file-truename: !non-local\ exit! 1 <- file-truename: !non-local\ exit! ====================================================================== 1 -> (file-truename "/ssh:gandalf:~/tmp/zzz") | 2 -> (tramp-sh-handle-file-truename "/ssh:gandalf:~/tmp/zzz") | 2 <- tramp-sh-handle-file-truename: !non-local\ exit! 1 <- file-truename: !non-local\ exit! ====================================================================== 1 -> (file-truename "/ssh:gandalf:~/tmp/zzz") | 2 -> (tramp-sh-handle-file-truename "/ssh:gandalf:~/tmp/zzz") | 2 <- tramp-sh-handle-file-truename: !non-local\ exit! 1 <- file-truename: !non-local\ exit! ====================================================================== 1 -> (file-truename "/ssh:gandalf:~/tmp/zzz") | 2 -> (tramp-sh-handle-file-truename "/ssh:gandalf:~/tmp/zzz") | 2 <- tramp-sh-handle-file-truename: !non-local\ exit! 1 <- file-truename: !non-local\ exit! ====================================================================== 1 -> (file-truename "/ssh:gandalf:~/tmp/zzz") | 2 -> (tramp-sh-handle-file-truename "/ssh:gandalf:~/tmp/zzz") | 2 <- tramp-sh-handle-file-truename: !non-local\ exit! 1 <- file-truename: !non-local\ exit! ====================================================================== 1 -> (file-truename "/ssh:gandalf:~/tmp/zzz") | 2 -> (tramp-sh-handle-file-truename "/ssh:gandalf:~/tmp/zzz") | 2 <- tramp-sh-handle-file-truename: !non-local\ exit! 1 <- file-truename: !non-local\ exit! ====================================================================== 1 -> (file-truename "/ssh:gandalf:~/tmp/zzz") | 2 -> (tramp-sh-handle-file-truename "/ssh:gandalf:~/tmp/zzz") | 2 <- tramp-sh-handle-file-truename: !non-local\ exit! 1 <- file-truename: !non-local\ exit! ====================================================================== 1 -> (file-truename "/ssh:gandalf:~/tmp/zzz") | 2 -> (tramp-sh-handle-file-truename "/ssh:gandalf:~/tmp/zzz") | 2 <- tramp-sh-handle-file-truename: !non-local\ exit! 1 <- file-truename: !non-local\ exit! ====================================================================== 1 -> (file-truename "/ssh:gandalf:~/tmp/zzz") | 2 -> (tramp-sh-handle-file-truename "/ssh:gandalf:~/tmp/zzz") | 2 <- tramp-sh-handle-file-truename: !non-local\ exit! 1 <- file-truename: !non-local\ exit! --8<---------------cut here---------------end--------------->8--- 15 calls of file-truename (dired fontification), with 1 call of tramp-sh-handle-file-truename each time. That sounds proper. Tramp doesn't cache erroneous results, so it doesn't remember the truename of "/ssh:gandalf:~/tmp/zzz". That's it, we can live with it I guess. Best regards, Michael.