I'm using GNU Emacs 220.127.116.11 (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 eating 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.
strace, but this generates too much output. Strace output of an editing session could easily fill my whole hard drive. Running Emacs inside gdb would also not work, because if I remember correctly Ubuntu builds the software without debugging symbols. So do you have any advice on how I can find the (possible) bug? What would you suggest?