whoopsie test failure since glib2.0 2.41.2-1 uploaded

Bug #1381804 reported by Brian Murray
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
whoopsie (Ubuntu)
Fix Released
High
Iain Lane

Bug Description

The whoopsie test callback-triggered-once started to fail, on every architecture except amd64, after whoopsie version 0.2.37 was uploaded to utopic on 2014-08-29. That upload contains no changes to test_monitor or monitor. (https://launchpadlibrarian.net/183527163/whoopsie_0.2.36_0.2.37.diff.gz)

We can see the test failure here: https://launchpadlibrarian.net/183527214/buildlog_ubuntu-utopic-i386.whoopsie_0.2.37_UPLOADING.txt.gz

Previously the test passed: https://launchpadlibrarian.net/181010654/buildlog_ubuntu-utopic-i386.whoopsie_0.2.36_UPLOADING.txt.gz

Looking at the utopic-changes mailing list it looks like glib2.0 was uploaded between 2014-07-29 (0.2.36 upload) and 2014-08-29 (0.2.37 upload). Running the tests from whoopsie version 0.2.37 in a trusty chroot I've discovered that callback-triggered-once does pass.

Related branches

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

Here we can see the test passing in a trusty-i386 chroot. (I've added some g_message calls to the test_monitor.c and monitor.c.)

/whoopsie/callback-triggered-once: ** Message: g_signal_connecting.
** Message: Callback registered.
** Message: crash file created: /tmp/whoopsie-test-7SOTNX/fake.crash
** Message: upload file work done: /tmp/whoopsie-test-7SOTNX/fake.upload
** Message: In changed_event.
** Message: In changed_event.
** Message: In changed_event.
** Message: In test_callback.
** Message: In changed_event.
** Message: In changed_event.
** Message: In test_callback.
** Message: Monitoring successful.
OK
(trusty-i386)root@impulse:/home/bdmurray/source-trees/whoopsie/upstream/src/tests#

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

And here we can see the test failing in a utopic-i386 chroot.

/whoopsie/callback-triggered-once: ** Message: g_signal_connecting.
** Message: Callback registered.
** Message: crash file created: /tmp/whoopsie-test-SLNTNX/fake.crash
** Message: upload file work done: /tmp/whoopsie-test-SLNTNX/fake.upload
** Message: Monitoring successful.

** (./test_monitor:9220): WARNING **: Expected file /tmp/whoopsie-test-SLNTNX/fake.uploaded doesn't exist.
Trace/breakpoint trap (core dumped)
(utopic-i386)root@impulse:/home/bdmurray/source-trees/whoopsie/upstream/src/tests#

Revision history for this message
Steve Langasek (vorlon) wrote :

Seb, can I ask that you (or someone on desktop) look at this, please? The whoopsie tests clearly need to be made autopkgtests, so that they're run at the right moment for catching glib2.0 regressions, but as that didn't happen, it's rather urgent now to figure out the cause of this problem.

Changed in glib2.0 (Ubuntu):
assignee: nobody → Sebastien Bacher (seb128)
importance: Undecided → High
Revision history for this message
Sebastien Bacher (seb128) wrote :

Ryan said he's going to have a look, thanks!

Changed in glib2.0 (Ubuntu):
assignee: Sebastien Bacher (seb128) → Ryan Lortie (desrt)
Revision history for this message
Lars Karlitski (larsu) wrote :

Posting on behalf of Ryan, who cannot log in right now.

He found out that the problem is in the test case itself. It uses g_main_loop_quit() as a source callback from test_callback_never_triggered. Source callbacks are supposed to return bool for if they get issued again or not. Apparently on amd64 we randomly end up with 0 in the return value register so the source function gets unregistered. On x386 it's random junk, so the callback gets run again, with the already freed mainloop.

Also, g_timeout_add_seconds (0.5) is bogus - the first argument is a uint. Please change that to g_timeout_add(500).

affects: glib2.0 (Ubuntu) → whoopsie (Ubuntu)
Changed in whoopsie (Ubuntu):
assignee: Ryan Lortie (desrt) → nobody
Iain Lane (laney)
Changed in whoopsie (Ubuntu):
assignee: nobody → Iain Lane (laney)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package whoopsie - 0.2.39

---------------
whoopsie (0.2.39) utopic; urgency=medium

  * Use G_SOURCE_CONTINUE and G_SOURCE_REMOVE for GSourceFunc return values,
    for clarity
  * tests/monitor: Call g_main_loop_quit from a callback function which
    removes the source instead of directly. GSourceFuncs need to return a
    boolean to say if they should be executed again or not. (LP: #1381804)
 -- Iain Lane <email address hidden> Thu, 16 Oct 2014 10:32:22 +0100

Changed in whoopsie (Ubuntu):
status: New → 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.