running whoopsie during tests causes test failures

Bug #1478115 reported by Brian Murray
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
Undecided
Martin Pitt

Bug Description

I've switched the apport-noui.path systemd file from:

PathChanged=/var/crash

to

PathExistsGlob=/var/crash/*.crash

I've done this because with PathChanged it seemed to me that the whoopsie-upload-all, called by apport-noui.service, would be called when any file (e.g. .upload, .uploaded) were created in /var/crash. Naturally, this seemed excessive to me and PathExistsGlob seems like a better fit. Additionally, it is worth noting that the following from the systemd.path documentation:

"If a path already exists (in case of PathExists= and PathExistsGlob=) or a directory already is not empty (in case of DirectoryNotEmpty=) at the time the path unit is activated, then the configured unit is immediately activated as well. Something similar does not apply to PathChanged= and PathModified=."

Given that it appears with PathChanged the apport-noui service would never be run during boot up, again not what we want.

However, making these changes seems to have caused some strange test failures with the apport's tests.

https://jenkins.qa.ubuntu.com/job/wily-adt-apport/

runs 47 through 55

Tags: wily
Revision history for this message
Brian Murray (brian-murray) wrote :

I haven't been able to locally recreate the same amd64 test failures, but have run into the following i386 failure (and only this failure which is odd):

======================================================================
FAIL: test_core_dump_packaged (__main__.T)
packaged executables create core dumps on proper ulimits
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./test_signal_crashes.py", line 359, in test_core_dump_packaged
    self.check_report_coredump(self.test_report)
  File "./test_signal_crashes.py", line 918, in check_report_coredump
    self.assertTrue('CoreDump' in r)
AssertionError: False is not true

If I switch back to PathChanged from PathExistsGlob then the test passes.

tags: added: wily
Changed in systemd (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
Revision history for this message
Brian Murray (brian-murray) wrote :

It's actually a combination of the dependency upon whoopsie and the Path change.

If the package depends on whoopsie then tests FAIL if we use PathExistsGlob, if we use PathChanged then test PASS.

If the package does not depend on whoopsie then the tests PASS with either Path setting.

Revision history for this message
Brian Murray (brian-murray) wrote :

I've uploaded apport version 2.18-0ubuntu5 which removes the dependency of apport-noui on whoopsie as a stop gap measure.

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

It's not all that surprising that whoopsie interferes with the test suite. The test suite assumes that new reports stay "unseen" and unprocessed, but whoopsie does process the reports. Also, it seems that whoopsie-upload-all itself crashes sometimes. Also, apport-noui.service is missing Type=oneshot.

We don't have tests for whoopsie and apport-noui, thus I'll just drop that from the test dependencies and restore the "whoopsie" dependency.

Changed in systemd (Ubuntu):
status: New → In Progress
status: In Progress → Fix Committed
affects: systemd (Ubuntu) → apport (Ubuntu)
summary: - using PathExistsGlob in apport-noui.path results in test failures
+ running whoopsie during tests causes test failures
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.18-0ubuntu6

---------------
apport (2.18-0ubuntu6) wily; urgency=medium

  * Drop apport-noui from test dependencies, as whoopsie interferes with the
    test crashes while the test suite runs. (LP: #1478115)
  * Restore whoopsie dependency of apport-noui.
  * apport-noui.service: Add missing Type=oneshot, to fix restart limits with
    crashes happening in rapid succession.
  * Merge test fixes from trunk.
  * data/package-hooks/source_linux.py: Fix PEP-8 error.

 -- Martin Pitt <email address hidden> Mon, 10 Aug 2015 11:25:07 +0200

Changed in apport (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote :

Martin - Thanks for fixing this. Do you have any more information about whoopsie-upload-all crashing?

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 1478115] Re: running whoopsie during tests causes test failures

Brian Murray [2015-08-10 17:14 -0000]:
> Do you have any more information about whoopsie-upload-all crashing?

I'm afraid not, I just noticed the .crash report for it in the
previous test runs.

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.