Take the 2-minute tour ×

I'm using GNU Emacs (x86_64-pc-linux-gnu, GTK+ Version 2.18.0) and start my Emacs session inside GNU screen. Since I upgraded to Ubuntu 10.04 and the version of emacs-snapshot there I encounter some problems. Sometimes Emacs hogs all RAM plus the same amount of swap space (2+2GB) and also eats all CPU time. When I send the process a SIGTERM the process stops to eat CPU time, but the huge allocated amount of memory stays. Emacs itself doesn't take any key sequences. So usually I send the process a SIGKILL and it dies.

Now I want to find out where the bug (if there is one) is located and want to do some debugging. I can see no special reason for this behavior. Sometimes it starts after Emacs is freshly started, sometimes I can work a whole day without problems, sometimes it happens in between. So I'm looking for a kind of debugging or monitoring the process. I tried strace, but this generates too much output. Strace output of a editing session should easily fill my whole harddrive. Running Emacs inside gdb should also not work, because if I remember correctly Ubuntu builds the software without debugging symbols. So do you have any advice how I can find the (possible) bug? What would you suggest?

share|improve this question
GNU Emacs 23.2 was released in May; if you are not satisfied with Ubuntu's default 23.1, good chances are that the bug has already been fixed upstream. –  Riccardo Murri Aug 9 '10 at 8:53
It seems that there are no Ubuntu packages for 23.2, so I'll have to check out CVS. –  qbi Aug 9 '10 at 21:56
I strongly suspect that emacs-snapshot is lagging behind now and just plain emacs package will bring you more recent version. At least it did that to me a while back ago. –  vava Sep 12 '10 at 9:44
emacs-snapshot has version and emacs 23.1.1. –  qbi Sep 12 '10 at 19:14

3 Answers 3

Perhaps the package emacs-snapshot-dbg might be of interest?

"This package contains the debugging symbols useful for debugging Emacs."

share|improve this answer
up vote 1 down vote accepted

I found the answer to this by accident. The problem was not emacs, but a malfunctioning GNOME keyring. When I start Emacs without the keyring daemon all is fine. So disabling it resolved my issue here.

share|improve this answer

At the moment I'm trying to save all content of Messages-buffer to a file and hope to find something useful:

(with-current-buffer "*Messages*" (auto-save-mode t))
share|improve this answer

Your Answer


