On Sun, 2009-10-11 at 16:00 -0700, Jonathan Ryshpan wrote:
Description: Description of problem: Several times a day evolution freezes, doesn't respond to input or refresh its window. Generally, if I click on the window decoration to delete the window, the window manager (gnome) puts up an error box that evolution is not responding and asking if I want it killed.
These types of problems almost always require a stack trace of the hung-up process. I have a neat little script which I use to get stack traces: #!/bin/bash # get a stack trace from a running process # where to put the stack trace destfile=/tmp/ThreadStacktrace.txt procname=$1 pid_or_core=$2 if [[ $procname = /var/crash/_* ]]; then dir=$(mktemp -d ~/tmp/apport-unpack-XXXXXX) trap "rm -rf $dir" EXIT apport-unpack $procname $dir ls -l $dir cat $dir/Title $dir/ThreadStacktrace > $destfile #strings $dir/CoreDump | less else if [ -z "$pid_or_core" ]; then pid_or_core=$(pidof $procname) fi if [ -z "$pid_or_core" ]; then echo "Could not find process id of a running $1" exit 1 fi if [[ $pid_or_core =~ ^[0-9][0-9]*$ ]]; then procname=$(lsof -p $pid_or_core | awk "/\/$procname$/ { print \$9 }") elif [[ $procname != /* ]]; then procname=$(which $procname) fi if [ -z "$procname" ]; then echo "Could not find location of $1" exit 1 fi batchfile=$(mktemp /tmp/gdb.XXXXXX) trap "rm -f $batchfile" INT HUP EXIT > $destfile cat <<EOF > $batchfile set logging file $destfile set logging on thread apply all bt full where EOF gdb -batch -x $batchfile $procname $pid_or_core </dev/null sed -i -e 's/---Type <return> to continue, or q <return> to quit---//g' $destfile fi This almost always works, for any process. For a hung up evolution you simply run: $ get_stacktrace evolution and when it's done /tmp/ThreadStacktrace.txt has exactly what you need to paste into your evolution bug report. If evolution actually crashed you can do: $ get_stacktrace evolution /path/to/core and again, you get exactly what you want to paste into bugzilla. Cheers, b.
Attachment:
signature.asc
Description: This is a digitally signed message part