Generate reports for testing programmatically

Bug #1086014 reported by Evan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Error Tracker deployment
Fix Released
Medium
Martin Pitt

Bug Description

We need to generate two types of reports.

The first set will be created by taking a set of often-used applications on each Ubuntu release, running them in a chroot, and sending SIGSEGV to them after some time. These can be packaged up and live in the branch responsible for testing the error tracker. We'll test that these always generate a complete stacktrace and are inserted into the database in the correct manner. If we want to test that multiple instances of these crashes increment the counter for their respective bucket, we'll have to just send them twice, since there's no way of predicting what function the program will be in at the time of crash.

We'll generate a second type of crash to test that different StacktraceAddressSignatures for the same resulting stacktrace get bucketed together, and that the crash signature always looks the same given a StacktraceAddressSignature. These reports will be generated by creating a new package of binaries that cause a signal that drops a core file. This package will be published in a PPA [1] with armhr and ddeb support and included in the production retracer configuration. This means that we can not only test these in our local unit tests against development branches, but also against production using Nagios at regular intervals. It also makes it easy to filter these out of statistics, since we can key against a testing package name.

1: https://launchpad.net/~daisy-pluckers/+archive/daisy-seeds

Evan (ev)
Changed in daisy:
importance: Undecided → Medium
status: New → Confirmed
description: updated
Revision history for this message
Martin Pitt (pitti) wrote :

Another possibility is to generate the "well known programs" .crash files during package build and ship them in the debs in the PPA. That way it is very easy to generate them on all supported architectures for multiple releases. So the "daisy-test" source package would then ship one .deb with the pregenerated .crash files, and another with the /usr/bin/crash binary which crashes in multiple different ways, depending on CLI arguments or environment variables. The latter would then have an automatically generated .ddeb in the PPA as well.

Changed in daisy:
assignee: nobody → Martin Pitt (pitti)
status: Confirmed → In Progress
Martin Pitt (pitti)
affects: daisy → error-tracker-deployment
Revision history for this message
Martin Pitt (pitti) wrote :

The armhf builds reproducably fail on Launchpad with:

Setting up at-spi2-core (2.7.2-0ubuntu1) ...
Setting up libgtk-3-0:armhf (3.6.2-0ubuntu1) ...
qemu-arm-static: /build/buildd/qemu-linaro-1.0.50-2012.03/user-exec.c:100: handle_cpu_signal: Assertion `({ unsigned long __guest = (unsigned long)(address) - guest_base; (__guest < (1ul << 32)) && (!reserved_va || (__guest < reserved_va)); })' failed.

i. e. on installing package dependencies. (Raring build)

Revision history for this message
Martin Pitt (pitti) wrote :

On uploading the very same version to quantal, the PPA armhf builder now eternally hangs after:

(gdb) Starting program: /bin/sleep 10
qemu: Unsupported syscall: 26
Traceback (most recent call last):
  File "./generate-sigsegv-crash.py", line 87, in <module>
    gen_crash(workdir)
  File "./generate-sigsegv-crash.py", line 53, in gen_crash
    prog_pids = [int(p) for p in subprocess.check_output(['pidof', sys.argv[1]]).split()]
  File "/usr/lib/python3.2/subprocess.py", line 522, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['pidof', 'sleep']' returned non-zero exit status 1
make[1]: *** [_bin_sleep.1000.crash] Error 1
make[1]: Leaving directory `/build/buildd/apport-test-crashes-0.20121202~3~quantal'
dh_auto_build: make -j1 returned exit code 2
make: *** [build-arch] Error 2
dpkg-buildpackage: error: debian/rules build-arch gave error exit status 2
qemu: Unsupported syscall: 26
During startup program exited normally.
(gdb) quit

Revision history for this message
Martin Pitt (pitti) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

https://launchpad.net/~daisy-pluckers/+archive/daisy-seeds/+packages now has raring builds for all three architectures, including ddebs. I set up a package recipe https://code.launchpad.net/~daisy-pluckers/+recipe/apport-test-crashes so that we can get fresh builds with just two clicks.

Revision history for this message
Martin Pitt (pitti) wrote :

https://code.launchpad.net/~daisy-pluckers/+recipe/apport-test-crashes now successfully builds for all three architectures and releases.

Revision history for this message
Martin Pitt (pitti) wrote :

https://code.launchpad.net/~pitti/error-tracker-deployment/fetch-test-crashes/+merge/138113 adds a fetch-test-crashes script to conveniently retrieve them.

Revision history for this message
Martin Pitt (pitti) wrote :

We now have a fully working recipe and PPA, a script to fetch them, and a script to feed them to whoopsie, as documented in https://wiki.ubuntu.com/ErrorTracker/Deployment . I think this sufficiently solves this request; please reopen if you need something else.

Changed in error-tracker-deployment:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.