Questions about Bugs and Debugging

Find a bug? Here's how to help us fix it!

Q: Where should I report bugs for Evolution?
Q: What is a stack trace (backtrace) and how do I get one?
Q: A component of evolution crashed, but since the rest of evolution stayed up, I couldn't use bug-buddy to get a stack trace. How can I use gdb to get a stack trace of the component?

Q: Where should I report bugs for Evolution?

A: You can use the GNOME Bug Report Tool (bug-buddy), or report bugs to the Ximian bug reporting system (Bugzilla), located at http://bugzilla.ximian.com.

Please use the query function to check if a bug has been submitted already, so that we avoid duplicate reports.

Q: What is a stack trace (backtrace) and how do I get one?

A: A stack trace is a list of the chain of function calls that lead to some point in the program. Typically, you want to get a stack trace when Evolution crashes or hangs and you want to try to figure out where in the code that happened and why. For this reason, stack traces are extremely useful for the Evolution developers, so it's important that you learn how to get them, and include them in crash reports. The bug-buddy tool can get and submit a stack trace for you. If you want to do it by yourself, here's how:

First of all, in order to get a stack trace, your executable (and possibly the libraries) must be compiled with debugging symbols. Debugging symbols are created by default if you compile from CVS, and are included in the snapshot builds. If you decide to compile by yourself with some custom CFLAGS value, make sure -g is included in them.

Finally, you must put the component that crashes through gdb, the GNU debugging tool. To do so, make sure all the components are dead (exit Evolution and run killev), then run the following command:

                   gdb name-of-component
                
Where "name-of-component" is the name of the component that crashed.

Then, at the gdb prompt, type r (for "run") and wait a few seconds to make sure the component has registered with the name service. Then start Evolution normally from a different terminal.

When you have started Evolution, reproduce the crash, and go back to the terminal where you ran gdb. If the component crashed, you should have a prompt there; otherwise, just hit Control+C. At the prompt, type info threads. This will give you a screen that looks like this:

(gdb) info threads
  8 Thread 6151 (LWP 14908)  0x409778fe in sigsuspend () from /lib/libc.so.6
  7 Thread 5126 (LWP 14907)  0x409778fe in sigsuspend () from /lib/libc.so.6
  6 Thread 4101 (LWP 1007)  0x409778fe in sigsuspend () from /lib/libc.so.6
  5 Thread 3076 (LWP 1006)  0x409778fe in sigsuspend () from /lib/libc.so.6
  4 Thread 2051 (LWP 1005)  0x409778fe in sigsuspend () from /lib/libc.so.6
  3 Thread 1026 (LWP 1004)  0x409778fe in sigsuspend () from /lib/libc.so.6
  2 Thread 2049 (LWP 1003)  0x40a10d90 in poll () from /lib/libc.so.6
  1 Thread 1024 (LWP 995)  0x40a10d90 in poll () from /lib/libc.so.6
            
For the most part, only evolution-mail will have more than one thread.

Now, for each of the threads listed, type the following commands:

thread N
bt
Where 'N' is the number of the thread (in this example, 1 through 8).

Cut and paste all the output gdb gives you into a text file. You can quit gdb by typing quit

If you prefer, you can start gdb while a process is running. You'll want to do this right after a crash dialog appears, but before hitting "OK" or "Submit bug report". Start gdb as above, but instead of using r, type attach PID where PID is the process ID of the component you want to debug.

If that sounds too complicated, you can always use bug-buddy to get and submit the stack trace.

Q: A component of evolution crashed, but since the rest of evolution stayed up, I couldn't use bug-buddy to get a stack trace. How can I use gdb to get a stack trace of the component?

A: To trace a failing component (in this example, evolution-mail):

  1. Open two terminals.

  2. In one, type gdb evolution-mail . Replace "evolution-mail" with the name of the component that is crashing: evolution-addressbook, evolution-calendar, etc.)

  3. Once gdb starts, type r and hit enter. Give it a few seconds, to make sure it starts up completely.

  4. In the second terminal, type evolution. Do whatever you did to cause the crash in the component you used in step two.

  5. When the crash occurs, type 'bt' in the first terminal.

  6. Cut and paste the output into your bug report.