GNU bug report logs - #61942
28.2; uninterruptible hang in vc-diff buffer

Previous Next

Package: emacs;

Reported by: Tom Tromey <tom <at> tromey.com>

Date: Fri, 3 Mar 2023 18:14:02 UTC

Severity: normal

Found in version 28.2

To reply to this bug, email your comments to 61942 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#61942; Package emacs. (Fri, 03 Mar 2023 18:14:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tom Tromey <tom <at> tromey.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 03 Mar 2023 18:14:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tom Tromey <tom <at> tromey.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.2; uninterruptible hang in vc-diff buffer
Date: Fri, 03 Mar 2023 11:13:27 -0700
From *vc-outgoing*, I used '=' to see a diff.

The diff in question is pretty large.

Emacs showed this in the echo area:

Finding changes in ....

This was not interruptible -- I tried C-g, C-], and 'kill -USR1'

I don't know exactly what this is doing, but whatever it is should be
interruptible.

Tom




In GNU Emacs 28.2 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.24.35, cairo version 1.17.6)
 of 2022-12-31 built on buildvm-x86-18.iad2.fedoraproject.org
Windowing system distributor 'The X.Org Foundation', version 11.0.12201007
System Description: Fedora Linux 36 (Workstation Edition)

Configured using:
 'configure --build=x86_64-redhat-linux-gnu
 --host=x86_64-redhat-linux-gnu --program-prefix=
 --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr
 --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
 --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
 --libexecdir=/usr/libexec --localstatedir=/var
 --sharedstatedir=/var/lib --mandir=/usr/share/man
 --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png
 --with-rsvg --with-tiff --with-xpm --with-x-toolkit=gtk3 --with-gpm=no
 --with-xwidgets --with-modules --with-harfbuzz --with-cairo --with-json
 --with-native-compilation build_alias=x86_64-redhat-linux-gnu
 host_alias=x86_64-redhat-linux-gnu CC=gcc 'CFLAGS=-DMAIL_USE_LOCKF -O2
 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches
 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
 -Wp,-D_GLIBCXX_ASSERTIONS
 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
 LDFLAGS=-Wl,-z,relro
 PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS
X11 XDBE XIM XPM XWIDGETS GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Git-Log-View

Minor modes in effect:
  vc-parent-buffer: *vc-dir*<gcc>
  bug-reference-mode: t
  erc-list-mode: t
  erc-menu-mode: t
  erc-autojoin-mode: t
  erc-ring-mode: t
  erc-pcomplete-mode: t
  erc-netsplit-mode: t
  erc-spelling-mode: t
  erc-truncate-mode: t
  shell-dirtrack-mode: t
  which-function-mode: t
  erc-track-mode: t
  erc-track-minor-mode: t
  erc-notify-mode: t
  erc-notifications-mode: t
  erc-match-mode: t
  erc-services-mode: t
  erc-networks-mode: t
  erc-hl-nicks-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  savehist-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow emacsbug f90 descr-text reposition asm-mode gnus-draft rust-mode
arc-mode archive-mode js edmacro pcmpl-unix pcmpl-gnu conf-mode
compare-w gnus-icalendar org-capture org-refile icalendar webjump
sh-script smie executable rng-xsd xsd-regexp rng-cmpct rng-nxml
rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util
rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap sgml-mode facemenu
nxml-util nxml-enc xmltok term ehelp nroff-mode cmake-mode rst autoconf
autoconf-mode texinfo texinfo-loaddefs pulse ada-light-mode eglot array
jsonrpc ert flymake-proc flymake vc-annotate cus-edit cus-start url-http
url-gw url-auth python tramp-sh pcase autoload lisp-mnt gud mule-util
debug backtrace kmacro two-column dwarf-mode tabify man tcl make-mode
cl-print shortdoc goto-addr log-edit yaml-mode log-view pcvs-util
find-dired copyright ffap grep find-file ggtags etags fileloop xref
project compile bug-reference cc-mode cc-fonts cc-guess cc-menus cc-cmds
supercite regi bbdb-message mailalias mail-hist term/xterm xterm
smerge-mode diff dabbrev gnus-html help-fns radix-tree url-cache
flow-fill erc-imenu erc-list erc-menu erc-join erc-ring erc-pcomplete
erc-netsplit erc-spelling erc-truncate shr-color mm-archive sort smiley
gnus-cite mail-extr gnus-bcklg gnus-async qp gnus-ml disp-table misearch
multi-isearch vc-mtn vc-hg vc-git diff-mode vc-bzr vc-src vc-sccs vc-svn
vc-cvs vc-rcs org-element avl-tree generator ol-eww eww xdg url-queue
mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-search
eieio-opt speedbar ezimage dframe ol-docview doc-view jka-compr
image-mode exif ol-bibtex ol-bbdb ol-w3m ol-doi org-link-doi org ob
ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src
ob-comint org-pcomplete org-list org-faces org-entities noutline outline
easy-mmode org-version ob-emacs-lisp ob-core ob-eval org-table oc-basic
bibtex ol org-keys oc org-compat org-macs org-loaddefs gnus-topic
nndraft nnmh nnfolder utf-7 bbdb-gnus bbdb-mua bbdb-com crm gnutls
network-stream nsm gnus-agent gnus-srvr gnus-score score-mode nnvirtual
gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig nntp
gnus-cache gnus-sum shr kinsoku svg dom gnus-group gnus-undo smtpmail
sendmail gnus-start gnus-dbus gnus-cloud nnimap nnmail mail-source utf7
netrc nnoo gnus-spec gnus-int gnus-range message rmc puny rfc822 mml
mml-sec epa derived epg rfc6068 epg-config mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus-win gnus
nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums
text-property-search mail-utils mm-util mail-prsvr add-log
display-fill-column-indicator flyspell ispell diminish appt diary-lib
diary-loaddefs cal-menu calendar cal-loaddefs tramp tramp-loaddefs
trampver tramp-integration files-x tramp-compat shell pcomplete
parse-time ls-lisp which-func imenu autorevert filenotify desktop
frameset cus-load git-link erc-track erc-notify
erc-desktop-notifications erc-match erc-services erc-networks
notifications dbus erc-hl-nicks color erc-button erc-fill erc-stamp
wid-edit erc-goodies erc erc-backend iso8601 thingatpt pp format-spec
erc-loaddefs dired-aux dired-x dired dired-loaddefs time-date advice
vc-dir ewoc vc vc-dispatcher flycheck find-func dash cc-styles cc-align
cc-engine cc-vars cc-defs bbdb comp comp-cstr warnings rx cl-extra
help-mode bbdb-site timezone ange-ftp comint ansi-color ring server
savehist finder-inf clang-rename clang-include-fixer let-alist
clang-format xml info package browse-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util
mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core
cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq
byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib iso-transl
tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-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 cl-generic
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 simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads
xwidget-internal dbusbind inotify dynamic-setting system-font-setting
font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty
make-network-process native-compile emacs)

Memory information:
((conses 16 5826176 675973)
 (symbols 48 118086 157)
 (strings 32 663988 63985)
 (string-bytes 1 24860746)
 (vectors 16 247905)
 (vector-slots 8 5951617 919156)
 (floats 8 621 871)
 (intervals 56 1006709 5268)
 (buffers 992 1662))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61942; Package emacs. (Mon, 17 Jun 2024 01:16:01 GMT) Full text and rfc822 format available.

Message #8 received at 61942 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Tom Tromey <tom <at> tromey.com>, 61942 <at> debbugs.gnu.org,
 Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#61942: 28.2; uninterruptible hang in vc-diff buffer
Date: Mon, 17 Jun 2024 04:15:00 +0300
Hi!

Late reply here.

On 03/03/2023 20:13, Tom Tromey wrote:
> From*vc-outgoing*, I used '=' to see a diff.
> 
> The diff in question is pretty large.
> 
> Emacs showed this in the echo area:
> 
> Finding changes in ....
> 
> This was not interruptible -- I tried C-g, C-], and 'kill -USR1'
> 
> I don't know exactly what this is doing, but whatever it is should be
> interruptible.

I've been doing some performance debugging for vc-diff, and the same 
thing has happened once when c-ts-mode was associated with *.c files.

That time I also turned off the cache for diff's revision syntax 
highlighting and repeated a 'vc-diff' for one revision several times.

Profiling this scenario gets me to

        7940  85%             - diff--get-revision-properties
        7940  85%              - let*
        5637  61%               - if
        5637  61%                - condition-case
        5637  61%                 - vc-find-revision-no-save
        5622  60%                  - decode-coding-inserted-region
           3   0%                   - set-auto-coding
           3   0%                    - find-auto-coding
           3   0%                     + set-auto-mode-1
          12   0%                  + set-auto-mode
           3   0%                  + vc-call-backend

and if we're talking about tree-sitter based modes, it might be due to 
memory usage (or not).

Anyway, if you're seeing this regularly

  (setq diff-font-lock-syntax 'hunk-only)

should help as a workaround.




This bug report was last modified 162 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.