From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Suhail Singh" Newsgroups: gmane.emacs.bugs Subject: bug#73046: 29.4; Emacs 100% CPU usage for several seconds when opening dired buffer over TRAMP Date: Thu, 05 Sep 2024 10:24:54 -0400 Message-ID: <87o75241qh.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6264"; mail-complaints-to="usenet@ciao.gmane.io" To: 73046@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 05 16:55:39 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 1smDtb-0001SX-7z for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Sep 2024 16:55:39 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1smDsw-0000oz-Tp; Thu, 05 Sep 2024 10:54:58 -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 1smDsv-0000gx-1S for bug-gnu-emacs@gnu.org; Thu, 05 Sep 2024 10:54:57 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1smDsu-0007GH-Ni for bug-gnu-emacs@gnu.org; Thu, 05 Sep 2024 10:54:56 -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:From:To:Subject; bh=QRH1uESyYGutXmCSR9rIpWUIBsbbvYxhaweWeJCOhhE=; b=TxxBODfmPoEc7+hnr46SXew2HfdnXhy8iC9EigZX82ZfzPvOBnFx1Nmo+9yBezrAKK0oLqLCVFMtEyY409N2QarI7U6j7TBCkGfJ52BjIfrSpo4O/Fu1DFPQTTZP7Fxz7j3In045F3NaQUCsa3PVCLW659rH4+MRyDx6v8YEfJrSVv0FzQ3kB1aDryKZtn7GRVkvEqa2bSKYe9QQg5iDrcwzmx5DJMhU15QVHVpXzX/UIjMGCZu5ZAoJOlXWOB58e+HAzAaEuB+pRVudU5vWfRXG2sxARC97owwZBkYeoLxgIEyv0tNFhgGQpfMb6l/06Knx3O3n6Nz9kKCIV2EK8g==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1smDtx-0007v5-Oz for bug-gnu-emacs@gnu.org; Thu, 05 Sep 2024 10:56:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Suhail Singh" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Sep 2024 14:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73046 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.172554811030276 (code B ref -1); Thu, 05 Sep 2024 14:56:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Sep 2024 14:55:10 +0000 Original-Received: from localhost ([127.0.0.1]:37823 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smDt7-0007sE-Hn for submit@debbugs.gnu.org; Thu, 05 Sep 2024 10:55:10 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:51022) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smDRL-0005mv-Du for submit@debbugs.gnu.org; Thu, 05 Sep 2024 10:26: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 1smDQG-0000wA-40 for bug-gnu-emacs@gnu.org; Thu, 05 Sep 2024 10:25:21 -0400 Original-Received: from mail-qv1-xf42.google.com ([2607:f8b0:4864:20::f42]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1smDQD-00020D-C4 for bug-gnu-emacs@gnu.org; Thu, 05 Sep 2024 10:25:19 -0400 Original-Received: by mail-qv1-xf42.google.com with SMTP id 6a1803df08f44-6c34c02ff1cso5164666d6.2 for ; Thu, 05 Sep 2024 07:25:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725546315; x=1726151115; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=QRH1uESyYGutXmCSR9rIpWUIBsbbvYxhaweWeJCOhhE=; b=dmuh0oiCZLjWggKGqs/lSlFLGdlncK9nbL6F2tbjszeaUB11bTBztrHq0TcttDtnSt qxhXpLaj8I2SUlVlfqrW633asDOW96SrXBw/xbJy1j8v70noVM8SqVlWC/6h05H7Rxkv kf3TnWljpsywj2O2jayKUDJFWKqWslQ3KnxhaHhRwbOJRC+7Nid45FJXW+b8/sLgFLCe a1uMpIKMAheIo1Q2rSru8Kd9OyO0HDTTeTvyQxGRwrMsJnM9D7ILB+a3psVbYUxOI1Ms GdK1jz2TxnZQd+aEG5MYLBONfDmFcB0lbwtCCFu6c1hmmkFJYf+6Px0PWwiEVEx9GKts Is4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725546315; x=1726151115; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=QRH1uESyYGutXmCSR9rIpWUIBsbbvYxhaweWeJCOhhE=; b=LJ/k16BRa7R8OK7c9F9Wem5pKSIk0ngb8ZHmti8fZS3FmqbP3kWGOGS8g6u4r1DYnI 6DAzfkM74KR915fPVWhMmoSO21ccsSHvcz1WiA4M1hrdWzhoW/BER2tV/e+fDxnBZsWB dwDn40BsNKCG3xcy+CVBP+oGpWSFl67+e3efFFwpc1raY+gLV9HWZNHkPuzJORAENGdz R7xEAqC9iHyh+QIe/wL/5Qlasi4Lf9xb/JjQn857QENZOIENpPfQCT++iToqf5MXQaSJ 6qPbG18shVgep7ebU2WnHTjQflaxR4A5QBgT3q8tDRTX2IamrD1Y3Lhq9di3kdrQDwER rksw== X-Gm-Message-State: AOJu0YzLkkMho6tx94jLApbOXnHOUVBDI6jOkdk4mdxPZfMM/NXAxKK6 QoV1mp6OWkcLlJX2dXo2aKPTckS73qiqy+l5ZrXZEYgHkph9wfxRGCnm2Hz2 X-Google-Smtp-Source: AGHT+IHyuiG8ytUrAE09B+Kg0HVkIPDLQTynG5da20J3lPC57RCx9IC56n3Lj8gWXSMXbEU8IYYgrQ== X-Received: by 2002:a05:6214:4988:b0:6c3:67d5:aa1 with SMTP id 6a1803df08f44-6c367d50e15mr157959676d6.10.1725546314634; Thu, 05 Sep 2024 07:25:14 -0700 (PDT) Original-Received: from gnus ([65.94.70.53]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6c5201e415fsm7910826d6.33.2024.09.05.07.25.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2024 07:25:13 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::f42; envelope-from=suhailsingh247@gmail.com; helo=mail-qv1-xf42.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:291262 Archived-At: I observe 100% CPU usage for several seconds when invoking dired for a directory on one of the remote machines I connect to. This doesn't seem to happen for another host. The connection to the affected host is slower, and on that host the issue is worse when the directory has several symlinks. To reproduce via =emacs -Q=: - Invoke `find-file' and connect to problematic host over ssh. - Once connection is established, open dired pointing to a directory on the affected host. - Observe bug: it takes _several_ seconds for the dired buffer to show. During that time, Emacs CPU usage is 100%. - Once dired buffer is open, invoke `revert-buffer' and observe issue again. Disabling global-font-lock-mode, makes the situation better. Given that rudimentary font-locking should be possible via, simply, the output of `ls --dired', it is unclear why enabling font-locking makes things so much worse. If there are some aspects of font-locking that perform much worse over a slower connection, it would help if there were a user configuration to disable them. It would also help if being over a slow connection didn't result in Emacs consuming 100% of the CPU via functions such as `tramp-wait-for-regexp' (based on profiler-report). Could some of this be done asynchronously? In GNU Emacs 29.4 (build 2, x86_64-suse-linux-gnu, GTK+ Version 3.24.43, cairo version 1.18.0) System Description: openSUSE Tumbleweed Configured using: 'configure --disable-build-details --without-pop --with-mailutils --with-native-compilation --without-hesiod --with-gameuser=:games --with-kerberos --with-kerberos5 --with-file-notification=inotify --with-modules --enable-autodepend --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --localstatedir=/var --sharedstatedir=/var/lib --libexecdir=/usr/libexec --with-file-notification=yes --libdir=/usr/lib64 --enable-locallisppath=/usr/share/emacs/29.4/site-lisp:/usr/share/emacs/site-lisp --with-x --with-xim --with-sound --with-xpm --with-jpeg --with-tiff --with-gif --with-png --with-rsvg --with-dbus --with-webp --with-xft --with-imagemagick --without-gpm --with-x-toolkit=gtk3 --with-pgtk --with-toolkit-scroll-bars --x-includes=/usr/include --x-libraries=/usr/lib64 --with-libotf --with-m17n-flt --with-cairo --with-xwidgets --build=x86_64-suse-linux --with-dumping=pdumper 'CFLAGS=-O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -D_GNU_SOURCE -DGDK_DISABLE_DEPRECATION_WARNINGS -DGLIB_DISABLE_DEPRECATION_WARNINGS -pipe -Wno-pointer-sign -Wno-unused-variable -Wno-unused-label -fno-optimize-sibling-calls -DPDMP_BASE='\''"emacs-wayland"'\''' LDFLAGS=-Wl,-O2' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ IMAGEMAGICK JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM XWIDGETS GTK3 ZLIB Important settings: value of $LC_NUMERIC: POSIX value of $LC_TIME: en_US.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Dired by name Minor modes in effect: shell-dirtrack-mode: t tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t buffer-read-only: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message mailcap yank-media puny rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util text-property-search mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils dired-aux dired dired-loaddefs tramp-sh tramp-cache time-stamp tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat rx shell pcomplete comint ansi-osc ring parse-time iso8601 time-date format-spec auth-source cl-seq eieio eieio-core cl-macs cl-loaddefs cl-lib password-cache json subr-x map byte-opt gv bytecomp byte-compile ansi-color rmc delsel lpr easy-mmode pcase iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win term/common-win pgtk-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads xwidget-internal dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo gtk pgtk lcms2 multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 94415 10209) (symbols 48 8472 0) (strings 32 27423 1593) (string-bytes 1 934096) (vectors 16 17482) (vector-slots 8 388602 12097) (floats 8 33 35) (intervals 56 549 0) (buffers 984 12)) -- Suhail