Apport

From openSUSE


Geeko Apport is an automatic application crash reporting system. It has origins in the Ubuntu distribution and was ported and extended for openSUSE during the Google Summer of Code 2008 with the help of Nikolay Derkach.


Many application crashes remain unreported due to different reasons:

  • the crash is silently ignored since no core file is produced
  • existing crash handlers like bug-buddy or Dr. Konqi are desktop application specific
  • the crash is not easy to reproduce
  • the location to report the crash is unknown

What Apport does is:

  • it intercepts application crashes with the help of the kernel
  • it gathers potential useful information about the process environment and the operating system
  • it notifies the user about the crash and lets him review the crash report
  • if the user wants to it sends the crash report to a central server for further processing


How does it work?

If a process dies the kernel sends a signal (segmentation fault, bus error, etc.) and invokes the Apport backend automatically. The backend generates an initial crash report that is stored to the /var/crash directory. If the crashing application belongs to the user currently logged in the Apport applet informs the user and offers him to send the report to the crash database server.

In Gnome, `update-notifier` keeps an inotify watch on `/var/crash`. Whenever there is something new, it calls `/usr/bin/apport-checkreports`. If there are new reports, it calls `/usr/bin/apport-gtk`, which is the frontend shown in the screenshots above. The frontend then collects additional information like package versions, package file checksums, or OS version, and calls all matching package hooks.

What about KDE?

Image:Apport_sorry.png

Now Apport collects various information that should help the developer to identify and fix the root cause of the crashing process. The user is asked what to do with the report afterwards.

Image:Apport_send.png

At this point the user can take a look and review the data that is included in the report before its being send. Due to security concerns the core file is not send to the openSUSE crash database.

Image:Apport_content.png

After uploading the report to the crash database the user can file a bug report at the Novell bugzilla and include the reference to the crash report in the bug description.


Where do the crash reports end up?

All crash reports coming from openSUSE installation are uploaded to the crash database server. After sending the report a browser window opens and you will be directed to the uploaded report. The crash database servers functionality is described on Apport Crash Database.


Installation

Image:susemini.png
Version:
11.0 or later
Apport can work only on openSUSE 11.0 or later due to the kernel limitations

NOTE: Apport crash notification works only with KDE4 and GNOME. There is no commandline notification yet.

Packages

openSUSE 11.1

openSUSE 11.1 already includes Apport on the media. If you would like to install the latest version use the one-click installation from below.

For the GNOME Desktop Environment :
Oneclick.png


For the KDE Desktop Environment :
Oneclick.png


openSUSE 11.0

This is an old version of openSUSE Apport for openSUSE 11.0. To run newer versions somebody needs to port recent libzypp python bindings to 11.0.

For the GNOME Desktop Environment :

zypper ar http://download.opensuse.org/repositories/home:/nderkach:/apport/openSUSE_11.0/ apport

zypper ar http://download.opensuse.org/repositories/home:/nderkach:/branches:/openSUSE:/11.0/standard/ apport-gsd

zypper ref

zypper in apport python-apport apport-gtk gnome-settings-daemon


NOTE: GNOME users have to update the gnome-settings-daemon package. Don't worry, this patched version doesn't contatain anything that can break your system. If you want to deactivate apport crash monitoring you can simply set GCONF key /apps/gnome_settings_daemon/plugins/apport/active to false.

For the KDE Desktop Environment :

zypper ar http://download.opensuse.org/repositories/home:/nderkach:/apport/openSUSE_11.0/ apport

zypper ref

zypper in apport python-apport apport-qt apport-kde


Latest Development Snapshot

openSUSE adaptation of Apport is developed with using Bazaar RCS, the project is hosted on Launchpad.

To get the most recent version you need to install bzr client and the run the following command:

bzr co lp:~apport-opensuse/apport/opensuse

How to enable Apport

Apport is not automatically enabled after installation. To enable it, run the following command:

sudo /etc/init.d/apport start

To automatically enable it during boot, run the following command:

sudo chkconfig --add apport

NOTE: You have to restart your GNOME or KDE session to make crash report notification work.

KDE users can enable Apport report notification without relogin: just issue dbus-send --session --type=method_call --dest=org.kde.kded /kded org.kde.kded.loadModule string:'kdedapport'. To disable KDE built-in crash notification run as user: export KDE_DEBUG=1.


Security Concerns

Core files may contain sensitive user data like login names and passwords. Due to that reason the core file that is included in the initial crash report is removed before sending it to the crash database.

Still the user must be aware that because of the automatic collection of data there might be cases where the final report contains information that the user doesn't want to share with the openSUSE community respectively the internet. Users are strongly encouraged to review the report before it is send to the crash database server.


Tips & Tricks

Blacklist for Apport

If an executable path appears on any line in any file in /etc/apport/blacklist.d/, apport will not generate a crash report for it. Matches are exact only at the moment (no globbing etc.).

This will be extended for our buildsystem later because testsuites, e.g. for GCC or binutils, often contain tests that are crashing on purpose.

Information for Developers

Developers can find more information on the Apport for Developers page.

Contact

If you are interested are in the project, have any questions, want to provide feedback, feel free to write your comments in this page discussion or contact Jan Blunck or Nikolay Derkach directly (please use 'Apport' in a email subject).

Passed QA check: Fsundermeyer 14:48, 15 June 2009 (UTC)