Subject: bug#20995: 24.5; uncomment XML file results in high CPU utilisation / hanging

From: Sam Halliday <[email-masked]>
Date: Mon, 06 Jul 2015 21:04:00 +0100

I just upgraded from 24.4 to 24.5 on Debian Jessie (self compiled) and
if I open an XML file containing the below information, and attempt to
M-: uncomment the last comment line in the file, Emacs eats 100%
CPU and I have to kill it. I can confirm that it works OK in 24.4:

=======================
<configuration scan="true" scanPeriod="3 seconds"> 
  <property name="PATTERN" value="%d{dd MMM yy HH:mm:ss.SSS} %logger{0} [%X{CONTEXT_ID} %thread] %-5level - %msg%n" /> 
  <turboFilter class="ch.qos.logback.classic.turbo.DuplicateMessageFilter"> 
    <cacheSize>1048576</cacheSize> 
  </turboFilter> 
  <appender name="file" class="ch.qos.logback.core.FileAppender"> 
    <file>test-output.log</file> 
    <append>false</append> 
    <encoder> 
      <pattern>${PATTERN}</pattern> 
    </encoder> 
  </appender> 
  <root level="${root-level:-INFO}"> 
    <appender-ref ref="file" /> 
  </root> 
  <logger name="org.apache" level="WARN" /> 
  <!-- <logger name="akka" level="DEBUG" /> --> 
  <!-- <logger name="testing" level="DEBUG" /> --> 

  <!-- <logger name="foo.bar" level="DEBUG" /> --> 
</configuration> 
=======================

The debugging below is probably useless. I encourage you to try this
yourself, ensuring that nXML mode is enabled.

I share my Emacs configuration, it is available here:

  https://github.com/fommil/dotfiles/tree/master/.emacs.d

In GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.5)
 of 2015-07-05 on Samskara
Windowing system distributor `The X.Org Foundation', version 11.0.11604000
System Description:	Debian GNU/Linux 8.1 (jessie)

Configured using:
 `configure --prefix=/opt/emacs-24.5'

Important settings:
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  persistent-scratch-autosave-mode: t
  global-auto-revert-mode: t
  global-subword-mode: t
  subword-mode: t
  show-paren-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Loading /home/fommil/.emacs.d/local.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-compat hides /opt/emacs-24.5/lisp/org/org-compat
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ox-odt hides /opt/emacs-24.5/lisp/org/ox-odt
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-keys hides /opt/emacs-24.5/lisp/org/ob-keys
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-mobile hides /opt/emacs-24.5/lisp/org/org-mobile
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-exp hides /opt/emacs-24.5/lisp/org/ob-exp
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-maxima hides /opt/emacs-24.5/lisp/org/ob-maxima
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-ruby hides /opt/emacs-24.5/lisp/org/ob-ruby
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-docview hides /opt/emacs-24.5/lisp/org/org-docview
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-bibtex hides /opt/emacs-24.5/lisp/org/org-bibtex
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-lob hides /opt/emacs-24.5/lisp/org/ob-lob
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-datetree hides /opt/emacs-24.5/lisp/org/org-datetree
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ox-icalendar hides /opt/emacs-24.5/lisp/org/ox-icalendar
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-rmail hides /opt/emacs-24.5/lisp/org/org-rmail
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-picolisp hides /opt/emacs-24.5/lisp/org/ob-picolisp
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-scheme hides /opt/emacs-24.5/lisp/org/ob-scheme
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-mhe hides /opt/emacs-24.5/lisp/org/org-mhe
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-C hides /opt/emacs-24.5/lisp/org/ob-C
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-footnote hides /opt/emacs-24.5/lisp/org/org-footnote
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-js hides /opt/emacs-24.5/lisp/org/ob-js
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ox-ascii hides /opt/emacs-24.5/lisp/org/ox-ascii
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-sql hides /opt/emacs-24.5/lisp/org/ob-sql
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-R hides /opt/emacs-24.5/lisp/org/ob-R
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-list hides /opt/emacs-24.5/lisp/org/org-list
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-shen hides /opt/emacs-24.5/lisp/org/ob-shen
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-faces hides /opt/emacs-24.5/lisp/org/org-faces
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-plantuml hides /opt/emacs-24.5/lisp/org/ob-plantuml
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ox-texinfo hides /opt/emacs-24.5/lisp/org/ox-texinfo
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-sqlite hides /opt/emacs-24.5/lisp/org/ob-sqlite
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ox-man hides /opt/emacs-24.5/lisp/org/ox-man
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ox-publish hides /opt/emacs-24.5/lisp/org/ox-publish
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-habit hides /opt/emacs-24.5/lisp/org/org-habit
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-w3m hides /opt/emacs-24.5/lisp/org/org-w3m
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-bbdb hides /opt/emacs-24.5/lisp/org/org-bbdb
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-inlinetask hides /opt/emacs-24.5/lisp/org/org-inlinetask
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-perl hides /opt/emacs-24.5/lisp/org/ob-perl
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-lisp hides /opt/emacs-24.5/lisp/org/ob-lisp
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-protocol hides /opt/emacs-24.5/lisp/org/org-protocol
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-pcomplete hides /opt/emacs-24.5/lisp/org/org-pcomplete
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ox hides /opt/emacs-24.5/lisp/org/ox
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-plot hides /opt/emacs-24.5/lisp/org/org-plot
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-ledger hides /opt/emacs-24.5/lisp/org/ob-ledger
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-asymptote hides /opt/emacs-24.5/lisp/org/ob-asymptote
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-scala hides /opt/emacs-24.5/lisp/org/ob-scala
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-table hides /opt/emacs-24.5/lisp/org/ob-table
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-python hides /opt/emacs-24.5/lisp/org/ob-python
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-awk hides /opt/emacs-24.5/lisp/org/ob-awk
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-capture hides /opt/emacs-24.5/lisp/org/org-capture
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-src hides /opt/emacs-24.5/lisp/org/org-src
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-ditaa hides /opt/emacs-24.5/lisp/org/ob-ditaa
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-colview hides /opt/emacs-24.5/lisp/org/org-colview
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-ref hides /opt/emacs-24.5/lisp/org/ob-ref
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-sh hides /opt/emacs-24.5/lisp/org/ob-sh
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-calc hides /opt/emacs-24.5/lisp/org/ob-calc
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-latex hides /opt/emacs-24.5/lisp/org/ob-latex
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-dot hides /opt/emacs-24.5/lisp/org/ob-dot
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-macro hides /opt/emacs-24.5/lisp/org/org-macro
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-crypt hides /opt/emacs-24.5/lisp/org/org-crypt
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-css hides /opt/emacs-24.5/lisp/org/ob-css
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-agenda hides /opt/emacs-24.5/lisp/org/org-agenda
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-comint hides /opt/emacs-24.5/lisp/org/ob-comint
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-feed hides /opt/emacs-24.5/lisp/org/org-feed
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ox-md hides /opt/emacs-24.5/lisp/org/ox-md
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-attach hides /opt/emacs-24.5/lisp/org/org-attach
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob hides /opt/emacs-24.5/lisp/org/ob
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-id hides /opt/emacs-24.5/lisp/org/org-id
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-ocaml hides /opt/emacs-24.5/lisp/org/ob-ocaml
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-eshell hides /opt/emacs-24.5/lisp/org/org-eshell
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-tangle hides /opt/emacs-24.5/lisp/org/ob-tangle
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-matlab hides /opt/emacs-24.5/lisp/org/ob-matlab
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-entities hides /opt/emacs-24.5/lisp/org/org-entities
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-mscgen hides /opt/emacs-24.5/lisp/org/ob-mscgen
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-version hides /opt/emacs-24.5/lisp/org/org-version
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-gnus hides /opt/emacs-24.5/lisp/org/org-gnus
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-irc hides /opt/emacs-24.5/lisp/org/org-irc
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-screen hides /opt/emacs-24.5/lisp/org/ob-screen
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ox-html hides /opt/emacs-24.5/lisp/org/ox-html
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ox-latex hides /opt/emacs-24.5/lisp/org/ox-latex
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ox-beamer hides /opt/emacs-24.5/lisp/org/ox-beamer
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-eval hides /opt/emacs-24.5/lisp/org/ob-eval
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-mouse hides /opt/emacs-24.5/lisp/org/org-mouse
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-emacs-lisp hides /opt/emacs-24.5/lisp/org/ob-emacs-lisp
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-archive hides /opt/emacs-24.5/lisp/org/org-archive
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-element hides /opt/emacs-24.5/lisp/org/org-element
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-info hides /opt/emacs-24.5/lisp/org/org-info
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ox-org hides /opt/emacs-24.5/lisp/org/ox-org
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-java hides /opt/emacs-24.5/lisp/org/ob-java
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-clock hides /opt/emacs-24.5/lisp/org/org-clock
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-loaddefs hides /opt/emacs-24.5/lisp/org/org-loaddefs
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-ctags hides /opt/emacs-24.5/lisp/org/org-ctags
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-table hides /opt/emacs-24.5/lisp/org/org-table
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org hides /opt/emacs-24.5/lisp/org/org
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-core hides /opt/emacs-24.5/lisp/org/ob-core
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-io hides /opt/emacs-24.5/lisp/org/ob-io
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-fortran hides /opt/emacs-24.5/lisp/org/ob-fortran
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-install hides /opt/emacs-24.5/lisp/org/org-install
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-octave hides /opt/emacs-24.5/lisp/org/ob-octave
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-timer hides /opt/emacs-24.5/lisp/org/org-timer
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-clojure hides /opt/emacs-24.5/lisp/org/ob-clojure
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-indent hides /opt/emacs-24.5/lisp/org/org-indent
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-gnuplot hides /opt/emacs-24.5/lisp/org/ob-gnuplot
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-sass hides /opt/emacs-24.5/lisp/org/ob-sass
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-lilypond hides /opt/emacs-24.5/lisp/org/ob-lilypond
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-org hides /opt/emacs-24.5/lisp/org/ob-org
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-makefile hides /opt/emacs-24.5/lisp/org/ob-makefile
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/org-macs hides /opt/emacs-24.5/lisp/org/org-macs
/home/fommil/.emacs.d/elpa/org-plus-contrib-20150629/ob-haskell hides /opt/emacs-24.5/lisp/org/ob-haskell

Features:
(shadow sort face-remap darkroom flyspell ispell gnus-util mail-extr
emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils
darcula-theme edmacro kmacro cl-loaddefs cl-lib highlight-symbol
thingatpt persistent-scratch midnight malabar-mode-autoloads eieio-core
info easymenu package epg-config autorevert filenotify superword subword
paren time-date tooltip electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
gfilenotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 135483 8631)
 (symbols 48 23118 0)
 (miscs 40 54 139)
 (strings 32 30491 17032)
 (string-bytes 1 881960)
 (vectors 16 14011)
 (vector-slots 8 440483 4179)
 (floats 8 82 73)
 (intervals 56 187 0)
 (buffers 960 11)
 (heap 1024 45124 1209))

-- 
Best regards,
Sam