A Quick Guide to Evolution Bug Hunting

Getting Started

Bug-buddy (included with GNOME) is the simplest way to report a bug in Evolution. However, if you prefer writing detailed bug reports in Bugzilla yourself, this guide is for you.

It's suggested that you first take a look at the Git "master" branch of Evolution, to see if the bug still exists in the latest codebase. If the bug still exists in the latest version of Evolution, the following software will help illuminate what is occuring (and will also give you more information to help make your bug reports to be more useful to the Evolution developers):

Discover What Causes the Bug

Starting Evolution from your terminal with some special environment variables causes Evolution to display more information on what it is currently doing.

The following is a list of variables and what each one tells Evolution to do:

It's easy to start Evolution with custom variables. One would simply run something like the following:

CAMEL_DEBUG=all evolution >& evo.log

How to Report Bugs

Using GNOME Bugzilla is the best way to report bugs. An alternative method is to join the IRC chanel #evolution (on irc.gnome.org) and ask someone there. After talking to the person on IRC, you'll typically want to open a bug in Bugzilla anyway so that the issue can be tracked. (It's most likely that the people on IRC will tell you to report the bug in Bugzilla too.)

Debugging Evolution's Crashes (Getting a backtrace)

If Evolution crashes, and you can reproduce it, than start Evolution in a debugger like gdb:

gdb evolution

Once gdb is running, you can do the following steps:

  1. Type "run" after gdb starts and attempt to reproduce the crash.
  2. Take note of the output in gdb.
  3. Type "thread apply all bt" to see more information about what went wrong.

Including the debugging info acquired through the above method in a bug report in Bugzilla will enable the developers pinpoint where something is going wrong, hopefully making it easier to fix the bug in Evolution.

Extended Information About Evolution Bugs

The bug tracking system for Evolution resides at bugzilla.gnome.org.

Getting a debug backtrace

To get a backtrace of a process, you can either directly run this process under gdb, or attach gdb to a running instance of the process. For getting a debug backtrace for evolution, you would be interested in these process-files.

  1. ${install_prefix}/bin/evolution
  2. ${install_prefix}/libexec/e-calendar-factory
  3. ${install_prefix}/libexec/e-addressbook-factory
  4. ${install_prefix}/libexec/evolution/${version}/evolution-alarm-notify
  5. ${install_prefix}/libexec/evolution/${version}/evolution-exchange-storage

Follow these steps to run the process under gdb

  1. Run the command 'gdb ${install_prefix}/path/of/process-file'
  2. At the gdb prompt type 'run'
  3. To get the backtrace at a particular instant, press ctrl+c, and you should get the gdb prompt. You could also reach the gdb prompt directly, if the process crashes.
  4. At the gdb prompt type 'thread apply all bt' to get the backtrace

To attach gdb to a running process

  1. Get the process id of the process (you can find out by 'ps ax')
  2. Run the command 'gdb -p <process id>'
  3. At the gdb prompt, type 'thread apply all bt' to get the backtrace.

You could also type 'continue' at the gdb prompt and proceed as usual and then press ctrl+c, to get the gdb prompt again.

GroupWise Debug

You can debug the communications with GroupWise server with GROUPWISE_DEBUG environment variable. Evolution Data Server communicates with GroupWise server using SOAP over http for accessing calendar and contacts data. When Evolution Data Server is run with GROUPWISE_DEBUG set, the http headers and body (xml conent) of SOAP request/responses are printed to standard output.

  1. Exit evolution and run the command 'evolution --force-shutdown'
  2. Run the command 'env GROUPWISE_DEBUG=1 ${install_prefix}/libexec/e-calendar-factory >& /tmp/groupwise.out' for Calendar issues, or 'env GROUPWISE_DEBUG=1 ${install_prefix}/libexec/e-addressbook-factory >& /tmp/groupwise.out' for address book issues
  3. start evolution and access GroupWise calendar or contacts

Evolution process also communicates with GroupWise server during Novell GroupWise account setup. One can run evolution after setting the GROUPWISE_DEBUG in the same manner described above to debug any Novell GroupWise account setup related problems.

Evolution Exchange Connector Debug

You can debug the communications with a Microsoft Exchange server 2000 or 2003 using the E2K_DEBUG environment variable. Exchange connector runs as a separate process [evolution-exchange-storage]. You can run evolution-exchange-storage with E2K_DEBUG set to a value from 1 to 5:

E2K_DEBUG=1 => Print each request and response
E2K_DEBUG=2 => #1 plus all request and response headers
E2K_DEBUG=3 => #2 plus bodies (except text/html)
E2K_DEBUG=4 => #3 plus global catalog debug too
E2K_DEBUG=5 => #4 plus text/html bodies too

You can also append 'm' to E2K_DEBUG to see mail stub debugging: it will print out everything read to or written from the stub socket. (You can set E2K_DEBUG=m on evolution itself as well, to see the conversation from the other side.)

Follow these steps to create a log file containing the webdav traffic.

  1. Exit evolution and run the command 'evolution --force-shutdown'
  2. Run the command 'env E2K_DEBUG=4 ${install_prefix}/libexec/evolution-exchange-storage >& /tmp/exchange.out' [ You can replace 4 in the command with any of the digits mentioned earlier ]
  3. Use evolution like usual.