GNU bug report logs - #6942
24.0.50; Uses 100% CPU and eats memory with trivial C++ code

Previous Next

Packages: cc-mode, emacs;

Reported by: Óscar Fuentes <ofv <at> wanadoo.es>

Date: Mon, 30 Aug 2010 00:38:02 UTC

Severity: normal

Found in version 24.0.50

Done: Óscar Fuentes <ofv <at> wanadoo.es>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6942 in the body.
You can then email your comments to 6942 AT debbugs.gnu.org in the normal way.

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

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


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6942; Package emacs. (Mon, 30 Aug 2010 00:38:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Óscar Fuentes <ofv <at> wanadoo.es>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 30 Aug 2010 00:38:02 GMT) Full text and rfc822 format available.

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

From: Óscar Fuentes <ofv <at> wanadoo.es>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.50; Uses 100% CPU and eats memory with trivial C++ code
Date: Mon, 30 Aug 2010 02:38:46 +0200
emacs -Q [ENTER]
C-x C-f foo.cpp [ENTER]
template <typename T,

As soon as the comma is typed, Emacs hangs and starts eating several MB
of RAM per second. Pressing C-g takes effect after a few seconds.


In GNU Emacs 24.0.50.3 (x86_64-unknown-linux-gnu, X toolkit)
 of 2010-08-12 on qcore
Windowing system distributor `The X.Org Foundation', version 11.0.10706000
configured using `configure  '--without-toolkit-scroll-bars' '--with-x-toolkit=lucid''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  whitespace-mode: t
  TeX-PDF-mode: t
  show-paren-mode: t
  diff-auto-refine-mode: t
  ido-everywhere: t
  tooltip-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
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t

Recent input:
M-x g n u s <return> C-x C-g q y <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <menu-bar> 
<help-menu> <send-emacs-bug-report>

Recent messages:
Reading active file from archive via nnfolder...
Opening nnfolder server on archive...done
Reading active file from archive via nnfolder...done
No new newsgroups
Checking new news...
Opening nntp server on news.gmane.org...done
Checking new news...done
No more unread newsgroups
Are you sure you want to quit reading news? (y or n) 
(No changes need to be saved)

Load-path shadows:
~/elisp/magit hides /usr/local/share/emacs/site-lisp/magit

Features:
(shadow sort mail-extr emacsbug parse-time nnfolder pop3 nnml nndraft
nnmh auth-source netrc gnus-agent gnus-srvr gnus-score score-mode
nnvirtual gnus-msg gnus-art mm-uu mml2015 epg-config mm-view smime
password-cache dig mailcap nntp gnus-cache gnus-sum nnoo gnus-group
time-date gnus-undo nnmail mail-source format-spec smtpmail sendmail
gnus-start gnus-spec gnus-int gnus-range message rfc822 mml mml-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus gnus-ems
nnheader gnus-util mail-utils mm-util mail-prsvr package org-install
whitespace jka-compr find-func timeclock timeclock-x vc-git compile
comint lp0-mode preview prv-emacs info reporter desktop latex tex-style
tex-buf tex tex-site auto-loads paren uniquify magit ediff server
pcomplete psvn byte-opt warnings bytecomp byte-compile derived edmacro
kmacro wid-edit cl cl-19 log-edit ring pcvs-util add-log diff-mode pp
elp ediff-merg ediff-diff ediff-wind ediff-mult ediff-help ediff-init
ediff-util dired easymenu bbdb-autoloads bbdb regexp-opt timezone
easy-mmode ido advice help-fns advice-preload tooltip ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
fringe lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mldrag 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 loaddefs button minibuffer faces cus-face files
text-properties overlay md5 base64 format env code-pages mule custom
widget hashtable-print-readable backquote make-network-process
dynamic-setting font-render-setting x-toolkit x multi-tty emacs)




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org:
bug#6942; Package emacs,cc-mode. (Sat, 04 Sep 2010 18:42:01 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Alan Mackenzie <acm <at> muc.de>, Nathaniel Flath <flat0103 <at> gmail.com>
Cc: Óscar Fuentes <ofv <at> wanadoo.es>, 6942 <at> debbugs.gnu.org
Subject: Re: bug#6942: 24.0.50;
	Uses 100% CPU and eats memory with trivial C++ code
Date: Sat, 04 Sep 2010 14:43:12 -0400
Óscar Fuentes <ofv <at> wanadoo.es> writes:

> emacs -Q [ENTER]
> C-x C-f foo.cpp [ENTER]
> template <typename T,
>
> As soon as the comma is typed, Emacs hangs and starts eating several MB
> of RAM per second. Pressing C-g takes effect after a few seconds.

Thanks, I can reproduce the bug.  It seems to a regression due to the
2010-07-31 template changes in CC mode.  Alan or Nathaniel, could either
of you please take a look?  Thanks.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org:
bug#6942; Package emacs,cc-mode. (Sun, 05 Sep 2010 12:52:01 GMT) Full text and rfc822 format available.

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

From: Alan Mackenzie <acm <at> muc.de>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: Óscar Fuentes <ofv <at> wanadoo.es>,
	Nathaniel Flath <flat0103 <at> gmail.com>, 6942 <at> debbugs.gnu.org
Subject: Re: bug#6942: 24.0.50;
	Uses 100% CPU and eats memory with trivial C++ code
Date: Sun, 5 Sep 2010 13:05:16 +0000
Hi, everybody!

On Sat, Sep 04, 2010 at 02:43:12PM -0400, Chong Yidong wrote:
> Óscar Fuentes <ofv <at> wanadoo.es> writes:

> > emacs -Q [ENTER]
> > C-x C-f foo.cpp [ENTER]
> > template <typename T,

> > As soon as the comma is typed, Emacs hangs and starts eating several MB
> > of RAM per second. Pressing C-g takes effect after a few seconds.

When the comma is typed?  You should be so lucky!  I get an infinite
recursion on typing the <, after which nothing should surprise.  ;-)

> Thanks, I can reproduce the bug.  It seems to a regression due to the
> 2010-07-31 template changes in CC mode.  Alan or Nathaniel, could either
> of you please take a look?  Thanks.

The infinite recursion is in c-forward-<>-arglist-recur, a function which
has been changed quite a bit recently.

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org:
bug#6942; Package emacs,cc-mode. (Wed, 15 Sep 2010 18:13:02 GMT) Full text and rfc822 format available.

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

From: Alan Mackenzie <acm <at> muc.de>
To: Chong Yidong <cyd <at> stupidchicken.com>,
	Óscar Fuentes <ofv <at> wanadoo.es>
Cc: Nathaniel Flath <flat0103 <at> gmail.com>, 6942 <at> debbugs.gnu.org
Subject: Re: bug#6942: 24.0.50;
	Uses 100% CPU and eats memory with trivial C++ code
Date: Wed, 15 Sep 2010 18:26:46 +0000
Hi, Yidong, Hi, Óscar,

On Sat, Sep 04, 2010 at 02:43:12PM -0400, Chong Yidong wrote:
> Óscar Fuentes <ofv <at> wanadoo.es> writes:

> > emacs -Q [ENTER]
> > C-x C-f foo.cpp [ENTER]
> > template <typename T,

> > As soon as the comma is typed, Emacs hangs and starts eating several MB
> > of RAM per second. Pressing C-g takes effect after a few seconds.

> Thanks, I can reproduce the bug.  It seems to a regression due to the
> 2010-07-31 template changes in CC mode.  Alan or Nathaniel, could either
> of you please take a look?  Thanks.

I've just committed a fix, though I wasn't able to test it as thoroughly
as I would like, because the trunk currently won't build.  :-(

I'd appreciate a confirmation from you that the bug is actually fixed.
Thanks in advance!

-- 
Alan Mackenzie (Nuremberg, Germany).




Reply sent to Óscar Fuentes <ofv <at> wanadoo.es>:
You have taken responsibility. (Wed, 15 Sep 2010 19:38:01 GMT) Full text and rfc822 format available.

Notification sent to Óscar Fuentes <ofv <at> wanadoo.es>:
bug acknowledged by developer. (Wed, 15 Sep 2010 19:38:02 GMT) Full text and rfc822 format available.

Message #19 received at 6942-done <at> debbugs.gnu.org (full text, mbox):

From: Óscar Fuentes <ofv <at> wanadoo.es>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 6942-done <at> debbugs.gnu.org, Chong Yidong <cyd <at> stupidchicken.com>,
	Nathaniel Flath <flat0103 <at> gmail.com>
Subject: Re: bug#6942: 24.0.50;
	Uses 100% CPU and eats memory with trivial C++ code
Date: Wed, 15 Sep 2010 21:39:27 +0200
Hello Alan.

Alan Mackenzie <acm <at> muc.de> writes:

>> > emacs -Q [ENTER]
>> > C-x C-f foo.cpp [ENTER]
>> > template <typename T,
>
>> > As soon as the comma is typed, Emacs hangs and starts eating several MB
>> > of RAM per second. Pressing C-g takes effect after a few seconds.
>
> I've just committed a fix, though I wasn't able to test it as thoroughly
> as I would like, because the trunk currently won't build.  :-(

Boostrapping did the trick for me.

> I'd appreciate a confirmation from you that the bug is actually fixed.
> Thanks in advance!

Yep, it works. Thanks!




Message #20 received at 6942-done <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: 6942-done <at> debbugs.gnu.org
Subject: Re: bug#6942: 24.0.50;
	Uses 100% CPU and eats memory with trivial C++ code
Date: Wed, 15 Sep 2010 20:15:58 +0000
On Mon, Aug 30, 2010 at 02:38:46AM +0200, Óscar Fuentes wrote:
> emacs -Q [ENTER]
> C-x C-f foo.cpp [ENTER]
> template <typename T,

> As soon as the comma is typed, Emacs hangs and starts eating several MB
> of RAM per second. Pressing C-g takes effect after a few seconds.

This bug has been fixed, revision 101443.

-- 
Alan Mackenzie (Nuremberg, Germany).




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 14 Oct 2010 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 311 days ago.

Previous Next


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