GNU bug report logs - #79924
31.0.50; nxml-mode + diff don't clean the timers

Previous Next

Package: emacs;

Reported by: OGAWA Hirofumi <hirofumi <at> mail.parknet.co.jp>

Date: Mon, 1 Dec 2025 05:40:04 UTC

Severity: normal

Found in version 31.0.50

To reply to this bug, email your comments to 79924 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#79924; Package emacs. (Mon, 01 Dec 2025 05:40:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to OGAWA Hirofumi <hirofumi <at> mail.parknet.co.jp>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 01 Dec 2025 05:40:05 GMT) Full text and rfc822 format available.

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

From: OGAWA Hirofumi <hirofumi <at> mail.parknet.co.jp>
To: bug-gnu-emacs <at> gnu.org
Subject: 31.0.50; nxml-mode + diff don't clean the timers
Date: Mon, 01 Dec 2025 14:38:41 +0900
Hi,

I noticed emacs became slower much when I diff xml files repeatedly. And
after some investigate, there are so many timers in the output of
`list-timers'.

(with-temp-buffer
  (message "before: %S"
           (mapcar (lambda (x)
                     (timer--function x))
                   (append timer-idle-list)))
  (nxml-mode)
  (insert "<item>\n</item>")
  (let ((buf-a (current-buffer)))
    (with-temp-buffer
      (nxml-mode)
      (let ((diff-win (diff-buffers buf-a (current-buffer))))
        (sit-for 1)
        (let ((kill-buf (window-buffer diff-win)))
          (delete-window diff-win)
          (kill-buffer kill-buf)))))
  (message "after: %S"
           (mapcar (lambda (x)
                     (timer--function x))
                   (append timer-idle-list))))

The above code is to reproduce the issue. With evaluating the code,
`rng-validate-quick-while-idle' and `rng-validate-while-idle' are left
in `timer-idle-list' without cleaning up. (diff buffers or files don't
matter.)

Thanks.


In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.51, cairo version 1.18.4) of 2025-11-30 built on devron
Repository revision: ef903e0f5ac27c80a2d3429392a82c3d24795c55
Repository branch: master
System Description: Debian GNU/Linux forky/sid

Configured using:
 'configure --with-x-toolkit=gtk3 --without-xim --with-imagemagick
 --with-wide-int --with-native-compilation=aot --with-pgtk'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ
IMAGEMAGICK JPEG 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 GTK3 ZLIB

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

Major mode: Group

Minor modes in effect:
  gnus-topic-mode: t
  gnus-undo-mode: t
  bug-reference-mode: t
  server-mode: t
  editorconfig-mode: t
  flycheck-pos-tip-mode: t
  global-flycheck-mode: t
  global-company-mode: t
  company-mode: t
  auto-insert-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  electric-pair-mode: t
  icomplete-mode: t
  which-key-mode: t
  savehist-mode: t
  repeat-mode: t
  tty-tip-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  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
  minibuffer-nonselected-mode: t
  minibuffer-regexp-mode: t
  buffer-read-only: t
  column-number-mode: 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 emacsbug lisp-mnt bbdb-message mailalias cursor-sensor cl-print
display-line-numbers timer-list novice smerge-mode diff sort gnus-cite
shr-color color mm-archive mail-extr gnus-bcklg bbdb-gnus-aux qp gnus-ml
disp-table mule-util ibuffer ibuffer-loaddefs textsec uni-scripts
idna-mapping ucs-normalize uni-confusable textsec-check go-mode
find-file ffap hl-line elfeed-show elfeed-search bookmark elfeed-csv
elfeed elfeed-curl elfeed-log elfeed-db elfeed-lib avl-tree url-queue
xml-query gnus-topic url-http url-gw url-cache utf-7 auth-source-kpxc
secrets network-stream nsm nnfolder bbdb-gnus nnnil bbdb-mua spam
spam-stat bbdb-com crm bbdb bbdb-site timezone gnus-uu yenc gnus-demon
gnus-async gnus-delay gnus-draft gnus-agent gnus-srvr gnus-score
score-mode nnvirtual nntp gnus-cache gnus-msg gnus-art mm-uu mml2015
mm-view mml-smime smime gnutls dig gnus-sum shr pixel-fill kinsoku
url-file svg dom nndraft nnmh gnus-xoauth2 oauth2-ext plstore
auth-source-pass gnus-group gnus-undo gnus-start gnus-dbus dbus xml
gnus-cloud nnimap nnmail mail-source utf7 nnoo parse-time iso8601
gnus-spec gnus-int gnus-range message sendmail yank-media puny rfc822
mml mml-sec epa derived epg rfc6068 epg-config mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev
gmm-utils mailheader gnus-win gnus nnheader gnus-util time-date
mail-utils range mm-util mail-prsvr dired-aux grep-context dash flyspell
ispell vc-hg vc-git diff-mode track-changes files-x vc-bzr vc-src
vc-sccs vc-svn vc-cvs vc-rcs log-view log-edit add-log easy-mmode
pcvs-util vc vc-dispatcher bug-reference thingatpt server url-auth
generic-x editorconfig editorconfig-core editorconfig-core-handle
editorconfig-fnmatch flycheck-relint relint compile text-property-search
comint ansi-osc xr flycheck-pos-tip pos-tip flycheck find-func
company-oddmuse company-keywords company-etags etags fileloop generator
xref project ring company-cscope company-gtags company-dabbrev-code
company-dabbrev company-files company-clang company-capf company-cmake
company-semantic company-template company-yasnippet company-bbdb company
pcase autoinsert yasnippet elec-pair icomplete which-key dircolors-faces
ansi-color dired-x savehist advice browse-kill-ring delsel
tab-bar-session desktop frameset repeat tty-tip comp comp-cstr cl-extra
help-mode warnings comp-run comp-common rx mozc-im-plus
mozc-cand-posframe s posframe mozc magit-mini-autoloads llama-autoloads
cond-let-autoloads packages-autoloads pdd-autoloads vcard-autoloads
startup-elisp-autoloads rfc-autoloads mozc-im-plus-autoloads
misc-autoloads lookup-autoloads gt-autoloads gnus-xoauth2-autoloads
cxrefs-autoloads company-cscope-autoloads bbdb-loaddefs cus-edit pp
cus-start cus-load wid-edit browse-kill-ring-autoloads
cmake-mode-autoloads company-autoloads coterm-autoloads
csv-mode-autoloads dockerfile-mode-autoloads dpkg-dev-el-autoloads
debian-el-autoloads debian-el dired dired-loaddefs dumb-jump-autoloads
elfeed-autoloads expand-region-autoloads flycheck-relint-autoloads
flycheck-rust-autoloads dash-autoloads flycheck-autoloads
git-modes-autoloads info gnuplot-autoloads go-mode-autoloads
gptel-autoloads graphviz-dot-mode-autoloads grep-context-autoloads
markdown-mode-autoloads meson-mode-autoloads
mozc-cand-posframe-autoloads mozc-autoloads php-mode-autoloads
po-mode-autoloads popup-autoloads pos-tip-autoloads posframe-autoloads
relint-autoloads rpm-spec-mode-autoloads rust-mode-autoloads s-autoloads
vundo-autoloads xr-autoloads yaml-mode-autoloads yasnippet-autoloads
package browse-url xdg url url-proxy url-privacy url-expand url-methods
url-history url-cookie generate-lisp-file url-domsuf url-util mailcap
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs icons
password-cache json subr-x map byte-opt gv bytecomp byte-compile
url-vars cl-loaddefs cl-lib japan-util rmc 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 touch-screen
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 dbusbind inotify dynamic-setting system-font-setting
font-render-setting cairo gtk pgtk lcms2 multi-tty move-toolbar
make-network-process tty-child-frames native-compile emacs)

Memory information:
((conses 16 671168 380413) (symbols 48 31926 8)
 (strings 32 247784 36331) (string-bytes 1 9086180)
 (vectors 16 124050) (vector-slots 8 1721099 150050)
 (floats 8 10182 35256) (intervals 56 4707 1242) (buffers 1064 34))

-- 
OGAWA Hirofumi <hirofumi <at> mail.parknet.co.jp>




This bug report was last modified today.

Previous Next


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