Apport - Automatic crash reports
What is this all about?
Debugging program crashes without any automated tools has pretty time consuming and hard for both developers and users. Many program crashes remain unreported or unfixed because:
- Many crashes are not easily reproducible.
End users do not know how to prepare a report that is really useful for developers, like building a package with debug symbols, operating gdb, etc.
- A considerable part of bug triage is spent with collecting relevant information about the crash itself, package versions, hardware architecture, operating system version, etc.
- There is no easy frontend which allow users to submit detailed problem reports.
- Existing solutions like bug-buddy or krash are specific to a particular desktop environment, are nontrivial to adapt to the needs of a distribution developer, and do not work for crashes of background servers (like a database or an email server).
Apport is a system which
- intercepts crashes right when they happen the first time,
- gathers potentially useful information about the crash and the OS environment,
- and presents an UI that informs about the crash and instructs the user how to proceed.
We hope that this will lead to a much better level of quality assurance in the future.
How does it look like for users?
The user side of apport is designed to be extremely simple and as unannoying as possible.
If any process in the system dies due to a signal that is commonly refered to as 'crash' (segmentation violation, bus error, floating point exception, etc.), the apport backend is automatically invoked. It produces an initial crash report in a file in /var/crash (the file name is composed from the name of the crashed executable and the user id). If the crashed process belongs to the user who is currently logged in, apport informs the user about the crash and offers to report the problem:
If an user process crashes while the user is not currently logged in, update-notifier will present a notification when the user starts a desktop session the next time:
Clicking on the bomb icon will cause the same frontend to appear.
There currently is no automatic way to submit a crash report to the distribution developers (see "Future plans" below). For now, if the user chooses "Report bug", apport-gtk opens the packages' bug tracking page in the web browser and asks the user to create a bug and attach the apport report:
Experienced can also take a look into the report content:
I'm a developer. How to I use these crash reports?
report format, apport-retrace
How does it work internally?
kernel patch, crashdump-helper, report, update-notifier, inotify, apport-gtk
port to upstream kernels, separate database, automatic submission
Use the source, Luke!
On Ubuntu, you can use apt-get source apport to get the complete source package.
You can download the source tarball from the [http://archive.ubuntu.com/ubuntu/pool/main/a/apport/ Ubuntu archive].
apport is developed with the [http://bazaar-vcs.org bazaar] RCS on [https://launchpad.net/products/apport Launchpad]. If you want to contribute to it or develop your own system based on it, you can get your own branch with
bzr get http://bazaar.launchpad.net/~ubuntu-core-dev/apport/ubuntu/
Please do not hesitate to report bugs and feature requests to the [https://launchpad.net/distros/ubuntu/+source/apport/+bug bug tracker].