Subject: 23.1.50; emacs daemon high CPU load even while ununsed

From: [email-masked]
Date: Sat, 06 Feb 2010 17:57:18 +0200

I noted that Emacs (emacs --daemon) takes a lot of of CPU (up to 80%), even
when I am not using it. I am starting emacs --daemon from my ~/.gnomerc, which
is invoked when I start my X session.

I used strace to see what was going on:

gettimeofday({1265471350, 42334}, NULL) = 0
read(0, "", 4096)                       = 0
write(2, "Back to top level.", 18)      = 18
write(2, "\n", 1)                       = 1
poll([{fd=7, events=POLLIN}], 1, 0)     = 0 (Timeout)
gettimeofday({1265471350, 42538}, NULL) = 0
read(0, "", 4096)                       = 0
write(2, "Back to top level.", 18)      = 18
write(2, "\n", 1)                       = 1
poll([{fd=7, events=POLLIN}], 1, 0)     = 0 (Timeout)
gettimeofday({1265471350, 42736}, NULL) = 0
read(0, "", 4096)                       = 0
write(2, "Back to top level.", 18)      = 18
write(2, "\n", 1)                       = 1

[...]

and this continues at high speed. Apparently, emacs calling the lisp function
normal-top-level in lisp/startup.el many, many times.

Hope this helps tracking down the issue.

Best wishes,
Dirk.

If you would like to further debug the crash, please read the file
/usr/share/emacs/23.1.50/etc/DEBUG for instructions.

In GNU Emacs 23.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 2.18.0)
 of 2009-09-27 on crested, modified by Debian
 (emacs-snapshot package, version 1:20090909-1)
Windowing system distributor `The X.Org Foundation', version 11.0.10604000
configured using `configure  '--build' 'x86_64-linux-gnu' '--host' 'x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/23.1.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1.50/site-lisp:/usr/share/emacs/site-lisp' '--with-x=yes' '--with-x-toolkit=gtk' 'build_alias=x86_64-linux-gnu' 'host_alias=x86_64-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: C
  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: C
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8
  default enable-multibyte-characters: t

Major mode: ELisp

Minor modes in effect:
  erc-track-mode: t
  erc-autojoin-mode: t
  tabkey2-mode: t
  show-paren-mode: t
  global-hl-line-mode: t
  shell-dirtrack-mode: t
  recentf-mode: t
  savehist-mode: t
  cua-mode: t
  icomplete-mode: t
  display-time-mode: t
  tooltip-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Recent input:
<down-mouse-1> <mouse-movement> <mouse-1> <help-echo> 
<help-echo> M-x e m a <tab> r e <tab> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> r e p o <tab> r t <tab> <return>

Recent messages:
Loading /home/djcb/.emacs.d/elpa/package.el (source)...done
Loading /home/djcb/.emacs.tmp/recentf...done
Cleaning up the recentf list...done (0 removed)
Ido mode enabled
Preparing diary...
Loading vc-svn...done
Loading vc-git...done
No diary entries for Saturday, February 6, 2010
Autoloading failed to define function linum-mode
Making completion list...

Load-path shadows:
/home/djcb/.emacs.d/elpa/facebook-0.0.1/facebook hides /home/djcb/.emacs.d/elisp/facebook
/home/djcb/.emacs.d/elisp/elscreen hides /usr/share/emacs-snapshot/site-lisp/elscreen/elscreen
/home/djcb/.emacs.d/elisp/htmlize hides /usr/share/emacs-snapshot/site-lisp/emacs-goodies-el/htmlize
/home/djcb/.emacs.d/elisp/color-theme hides /usr/share/emacs-snapshot/site-lisp/emacs-goodies-el/color-theme
/home/djcb/.emacs.d/elisp/thinks hides /usr/share/emacs-snapshot/site-lisp/emacs-goodies-el/thinks
/home/djcb/.emacs.d/elisp/boxquote hides /usr/share/emacs-snapshot/site-lisp/emacs-goodies-el/boxquote
/home/djcb/.emacs.d/elisp/muttrc-mode hides /usr/share/emacs-snapshot/site-lisp/emacs-goodies-el/muttrc-mode
/home/djcb/.emacs.d/elisp/quack hides /usr/share/emacs-snapshot/site-lisp/emacs-goodies-el/quack
/home/djcb/.emacs.d/elisp/slang-mode hides /usr/share/emacs-snapshot/site-lisp/emacs-goodies-el/slang-mode
/usr/share/emacs-snapshot/site-lisp/mailcrypt/mc-gpg hides /usr/share/emacs/site-lisp/mailcrypt/mc-gpg
/usr/share/emacs-snapshot/site-lisp/mailcrypt/expect hides /usr/share/emacs/site-lisp/mailcrypt/expect
/usr/share/emacs-snapshot/site-lisp/mailcrypt/mc-toplev hides /usr/share/emacs/site-lisp/mailcrypt/mc-toplev
/usr/share/emacs-snapshot/site-lisp/mailcrypt/mc-pgp5 hides /usr/share/emacs/site-lisp/mailcrypt/mc-pgp5
/usr/share/emacs-snapshot/site-lisp/mailcrypt/mc-pgp6 hides /usr/share/emacs/site-lisp/mailcrypt/mc-pgp6
/usr/share/emacs-snapshot/site-lisp/mailcrypt/mc-setversion hides /usr/share/emacs/site-lisp/mailcrypt/mc-setversion
/usr/share/emacs-snapshot/site-lisp/mailcrypt/mailcrypt hides /usr/share/emacs/site-lisp/mailcrypt/mailcrypt
/usr/share/emacs-snapshot/site-lisp/mailcrypt/mc-pgp hides /usr/share/emacs/site-lisp/mailcrypt/mc-pgp
/usr/share/emacs-snapshot/site-lisp/mailcrypt/mc-remail hides /usr/share/emacs/site-lisp/mailcrypt/mc-remail
/usr/share/emacs/23.1.50/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs-snapshot/site-lisp/semi/pgg-parse hides /usr/share/emacs/23.1.50/lisp/pgg-parse
/usr/share/emacs-snapshot/site-lisp/semi/pgg-pgp5 hides /usr/share/emacs/23.1.50/lisp/pgg-pgp5
/usr/share/emacs-snapshot/site-lisp/semi/pgg-pgp hides /usr/share/emacs/23.1.50/lisp/pgg-pgp
/usr/share/emacs-snapshot/site-lisp/semi/pgg-def hides /usr/share/emacs/23.1.50/lisp/pgg-def
/home/djcb/.emacs.d/elpa/json-1.2/json hides /usr/share/emacs/23.1.50/lisp/json
/usr/share/emacs-snapshot/site-lisp/semi/pgg-gpg hides /usr/share/emacs/23.1.50/lisp/pgg-gpg
/usr/share/emacs-snapshot/site-lisp/flim/hex-util hides /usr/share/emacs/23.1.50/lisp/hex-util
/usr/share/emacs-snapshot/site-lisp/flim/sha1 hides /usr/share/emacs/23.1.50/lisp/sha1
/usr/share/emacs-snapshot/site-lisp/semi/pgg hides /usr/share/emacs/23.1.50/lisp/pgg
/usr/share/emacs-snapshot/site-lisp/flim/md4 hides /usr/share/emacs/23.1.50/lisp/md4
/usr/share/emacs-snapshot/site-lisp/cedet-common/ezimage hides /usr/share/emacs/23.1.50/lisp/ezimage
/home/djcb/.emacs.d/elisp/linum hides /usr/share/emacs/23.1.50/lisp/linum
/usr/share/emacs-snapshot/site-lisp/css-mode/css-mode hides /usr/share/emacs/23.1.50/lisp/textmodes/css-mode
/usr/local/share/emacs/site-lisp/org-vm hides /usr/share/emacs/23.1.50/lisp/org/org-vm
/usr/local/share/emacs/site-lisp/org-rmail hides /usr/share/emacs/23.1.50/lisp/org/org-rmail
/usr/local/share/emacs/site-lisp/org-indent hides /usr/share/emacs/23.1.50/lisp/org/org-indent
/usr/local/share/emacs/site-lisp/org-bbdb hides /usr/share/emacs/23.1.50/lisp/org/org-bbdb
/usr/local/share/emacs/site-lisp/org-install hides /usr/share/emacs/23.1.50/lisp/org/org-install
/usr/local/share/emacs/site-lisp/org-faces hides /usr/share/emacs/23.1.50/lisp/org/org-faces
/usr/local/share/emacs/site-lisp/org-feed hides /usr/share/emacs/23.1.50/lisp/org/org-feed
/usr/local/share/emacs/site-lisp/org-gnus hides /usr/share/emacs/23.1.50/lisp/org/org-gnus
/usr/local/share/emacs/site-lisp/org-docbook hides /usr/share/emacs/23.1.50/lisp/org/org-docbook
/usr/local/share/emacs/site-lisp/org-ascii hides /usr/share/emacs/23.1.50/lisp/org/org-ascii
/usr/local/share/emacs/site-lisp/org-wl hides /usr/share/emacs/23.1.50/lisp/org/org-wl
/usr/local/share/emacs/site-lisp/org-irc hides /usr/share/emacs/23.1.50/lisp/org/org-irc
/usr/local/share/emacs/site-lisp/org-footnote hides /usr/share/emacs/23.1.50/lisp/org/org-footnote
/usr/local/share/emacs/site-lisp/org-mew hides /usr/share/emacs/23.1.50/lisp/org/org-mew
/usr/local/share/emacs/site-lisp/org-mhe hides /usr/share/emacs/23.1.50/lisp/org/org-mhe
/usr/local/share/emacs/site-lisp/org-latex hides /usr/share/emacs/23.1.50/lisp/org/org-latex
/usr/local/share/emacs/site-lisp/org-exp hides /usr/share/emacs/23.1.50/lisp/org/org-exp
/usr/local/share/emacs/site-lisp/org hides /usr/share/emacs/23.1.50/lisp/org/org
/usr/local/share/emacs/site-lisp/org-info hides /usr/share/emacs/23.1.50/lisp/org/org-info
/usr/local/share/emacs/site-lisp/org-attach hides /usr/share/emacs/23.1.50/lisp/org/org-attach
/usr/local/share/emacs/site-lisp/org-compat hides /usr/share/emacs/23.1.50/lisp/org/org-compat
/usr/local/share/emacs/site-lisp/org-archive hides /usr/share/emacs/23.1.50/lisp/org/org-archive
/usr/local/share/emacs/site-lisp/org-inlinetask hides /usr/share/emacs/23.1.50/lisp/org/org-inlinetask
/usr/local/share/emacs/site-lisp/org-mac-message hides /usr/share/emacs/23.1.50/lisp/org/org-mac-message
/usr/local/share/emacs/site-lisp/org-icalendar hides /usr/share/emacs/23.1.50/lisp/org/org-icalendar
/usr/local/share/emacs/site-lisp/org-id hides /usr/share/emacs/23.1.50/lisp/org/org-id
/usr/local/share/emacs/site-lisp/org-list hides /usr/share/emacs/23.1.50/lisp/org/org-list
/usr/local/share/emacs/site-lisp/org-protocol hides /usr/share/emacs/23.1.50/lisp/org/org-protocol
/usr/local/share/emacs/site-lisp/org-table hides /usr/share/emacs/23.1.50/lisp/org/org-table
/usr/local/share/emacs/site-lisp/org-jsinfo hides /usr/share/emacs/23.1.50/lisp/org/org-jsinfo
/usr/local/share/emacs/site-lisp/org-timer hides /usr/share/emacs/23.1.50/lisp/org/org-timer
/usr/local/share/emacs/site-lisp/org-remember hides /usr/share/emacs/23.1.50/lisp/org/org-remember
/usr/local/share/emacs/site-lisp/org-agenda hides /usr/share/emacs/23.1.50/lisp/org/org-agenda
/usr/local/share/emacs/site-lisp/org-mouse hides /usr/share/emacs/23.1.50/lisp/org/org-mouse
/usr/local/share/emacs/site-lisp/org-w3m hides /usr/share/emacs/23.1.50/lisp/org/org-w3m
/usr/local/share/emacs/site-lisp/org-macs hides /usr/share/emacs/23.1.50/lisp/org/org-macs
/usr/local/share/emacs/site-lisp/org-plot hides /usr/share/emacs/23.1.50/lisp/org/org-plot
/usr/local/share/emacs/site-lisp/org-xoxo hides /usr/share/emacs/23.1.50/lisp/org/org-xoxo
/usr/local/share/emacs/site-lisp/org-html hides /usr/share/emacs/23.1.50/lisp/org/org-html
/usr/local/share/emacs/site-lisp/org-src hides /usr/share/emacs/23.1.50/lisp/org/org-src
/usr/local/share/emacs/site-lisp/org-clock hides /usr/share/emacs/23.1.50/lisp/org/org-clock
/usr/local/share/emacs/site-lisp/org-publish hides /usr/share/emacs/23.1.50/lisp/org/org-publish
/usr/local/share/emacs/site-lisp/org-bibtex hides /usr/share/emacs/23.1.50/lisp/org/org-bibtex
/usr/local/share/emacs/site-lisp/org-colview hides /usr/share/emacs/23.1.50/lisp/org/org-colview
/usr/local/share/emacs/site-lisp/org-exp-blocks hides /usr/share/emacs/23.1.50/lisp/org/org-exp-blocks
/usr/share/emacs-snapshot/site-lisp/flim/sasl-digest hides /usr/share/emacs/23.1.50/lisp/net/sasl-digest
/usr/share/emacs-snapshot/site-lisp/flim/hmac-def hides /usr/share/emacs/23.1.50/lisp/net/hmac-def
/usr/share/emacs-snapshot/site-lisp/flim/sasl hides /usr/share/emacs/23.1.50/lisp/net/sasl
/usr/share/emacs-snapshot/site-lisp/flim/sasl-ntlm hides /usr/share/emacs/23.1.50/lisp/net/sasl-ntlm
/usr/share/emacs-snapshot/site-lisp/flim/ntlm hides /usr/share/emacs/23.1.50/lisp/net/ntlm
/home/djcb/.emacs.d/config/newsticker hides /usr/share/emacs/23.1.50/lisp/net/newsticker
/usr/share/emacs-snapshot/site-lisp/flim/hmac-md5 hides /usr/share/emacs/23.1.50/lisp/net/hmac-md5
/usr/share/emacs-snapshot/site-lisp/flim/sasl-cram hides /usr/share/emacs/23.1.50/lisp/net/sasl-cram
/usr/share/emacs-snapshot/site-lisp/wl/rfc2368 hides /usr/share/emacs/23.1.50/lisp/mail/rfc2368