[Mono-dev] Apport, and automated debugging

Jo Shields directhex at apebox.org
Tue Jun 9 11:41:58 EDT 2009


I've got a functionality enhancement which I'd love to see for Mono, and
was told that the best place to discuss it was here on the list.

First, the background. "Apport"[1] is a system which originated in
Ubuntu, and has subsequently been available in other distributions such
as openSUSE[2][3], to catch and process application crashes
automatically. If a user is using, say, a text editor, and it crashes,
then a window pops up offering to send a bug report to a central server.

Currently, Apport in Ubuntu supports applications written in Python, or
Native applications (e.g. C apps). As-is, this is implemented in 2 ways:
For Python, /etc/python*/sitecustomize.py is configured to load Apport's
Python hook[4]. For native apps, /proc/sys/kernel/core_pattern is

That's step 1. I would like Apport to support Managed apps too - which
means there needs to be a magical way for Apport to be triggered, with
useful information (a "core" file, as it were), in the event of an
unhandled exception.

Next is a feature which appears to be used only by Ubuntu, but would be
very useful for any distro which opts to make use of it. Once you upload
an apport report to the distro's bug tracker, in Ubuntu's case, the core
dump is retraced. In essence the debug symbols (usually stripped from
all apps/libs) for the app and libraries are all installed inside a VM,
and a backtrace re-produced from the failed app, with the help of the
user's core file. This produces, in theory, an enormously more useful
stack trace of the app's failure (complete with developer-helping things
like line numbers).

That's step 2. Mono's debugger needs to support purely automated
(noninteractive) use by the distro's retracer service, and that retracer
will need to be able to feed in a user's "core" file (whatever format
that may be in) in order to re-produce the same stack trace, with the
added debug info.

Apport (and debugging in general, truth be told) is meaningless voodoo
to me, but I'm confident that if user apps produced more detailed
debugging output via the established mechanisms already in use by
distributions, that this could be extremely useful for distro
maintainers and app developers alike.

If you have any technical questions about Apport, your best bet is to
ask apport-hackers at lists.launchpad.net, who should actually understand
what's going on.

[1] https://wiki.ubuntu.com/Apport
[2] http://fedoraproject.org/wiki/Releases/FeatureApport
[3] http://en.opensuse.org/Apport
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: This is a digitally signed message part
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090609/ca031b0e/attachment.bin 

More information about the Mono-devel-list mailing list