Apport

James Westby jw+debian at jameswestby.net
Fri May 2 13:58:23 PDT 2008


Hi all,

I just wanted to let you all know about a little package that we
use in Ubuntu that may benefit other distributions. This package
is called "apport".

Apport is an automatic bug reporting tool. It does a number of things,
the main one of which is to pop up on crashes of system programs.
To do this it installs a kernel core pattern in
/proc/sys/kernel/core_pattern that pipes core files to it (available
since the .23 kernel I believe). This writes out a .crash file to
/var/crash. The user is then notified with a notification icon and
libnotify message that something has crashed. Clicking on the icon
tells them what and offers to report a bug.

For Ubuntu this opens a new bug in launchpad with all the information,
and then opens the page in the users web browser for them to provide
more details.

It also hooks in to python failures somehow to provide the same service,
and also has intergration with update-manager so that you can report a
bug if a package installation/upgrade fails.

Some people may be disturbed by the thought of the flood of bugs that
would be generated. You're right, it does generate a lot of
bug reports, but there are a few things that make it worthwhile.

Firstly, it's only active for development releases, as it's easiest
to fix the bugs then, and those users will generally be more equipped
to provide the necessary information.

Secondly, and this is what makes apport so great, it can detect 
duplicates by itself. It takes the core file, enters a chroot,
and using some magic it "retraces" the bug report, using full symbol
table information.

This means that it can detect duplicates on it's own and mark them as
such, and also that without the users having to have debugging symbols
in their executable, or know what gdb is, provide full backtraces.

In addition to this a package can provide an apport script that gathers
information from a user's system before reporting the bugs. For instance
Firefox can report all of the extensions that the user has installed.

It is obviously currently quite specific to Ubuntu, however it is surely
possible to make it work on other systems as well, and I'm sure Martin
would be happy to merge patches that did that. You can find more details
about the project at

  https://wiki.ubuntu.com/Apport

and the code at

  https://launchpad.net/apport

I think other distributions would do well to look at it, and even if you
don't want to use it in your distribution there may be ideas that you
want to take.

Does anyone else already have a system like this? Are there any aspects
that are covered by other tools used in your distro? Can anyone see
anything that would make it even better?

Thanks,

James




More information about the Distributions mailing list