Introducing apport bug patterns

Martin Pitt martin.pitt at
Thu Oct 5 18:24:40 BST 2006


Back in Wiesbaden Colin and I talked about duplicate bug reports, as
they often happen for ubiquity, and certainly also for other packages.
We came up with the idea of bug patterns, i. e. a set of rules which
map an apport crash report to a particular bug.

I implemented that ages ago, but I forgot to announce it until now.
Whenever you encounter a crash that has many duplicate bugs filed,
check if the bug can be uniquely identified with regular expressions
on the apport report keys. Most useful fields are certainly
Stacktrace, Package/Dependencies (for checking particular versions),
and ProcCmdline, but in general you can match any field that seems

To avoid inventing a new file format and to be able to extend the
functionality in the future (e. g. other operators than just regexp
matching) the bug patterns are stored as XML files, named after the
binary package, currently on [1].

The general syntax is:

    root element := <patterns>
    patterns := <pattern url="http://bug.url"> *
    pattern := <re key="report_key">regular expression*</re> +

For example:

    <?xml version="1.0"?>
        <pattern url="">
            <re key="Foo">ba.*r</re>
        <pattern url="">
            <re key="Foo">write_(hello|goodbye)</re>
            <re key="Package">^\S* 1-2$</re> <!-- test for a particular version -->

I put a working example on [2] so that you can play around with it:

  $ sleep 50 &
  $ kill -SEGV %1

This should cause apport-gtk to claim that the bug was already
reported and open bug #1 in your web browser.


Adding or changing a bug pattern requires the assistance of someone
from the distro team since it requires access to rookery. However,
anyone should feel welcome to propose bug patterns and ask one of us
to review and add them.


Martin Pitt
Ubuntu Developer
Debian Developer

In a world without walls and fences, who needs Windows and Gates?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : 

More information about the ubuntu-devel mailing list