In autoreport mode in whoopsie-preferences API, reports are not sent by whoopsie

Bug #1778694 reported by Didier Roche-Tolomelli
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
High
Didier Roche-Tolomelli
Bionic
Fix Released
High
Didier Roche-Tolomelli

Bug Description

[ Impact ]
* The goal for autoreporting via whoopsie is to have a silent mode where whoopsie automatically reports crashes. However, this one requires apport-noui to be installed, which we don't by default.
apport-noui is just a set of systemd unit starting whoopsie-upload-all (part of apport binary package).
We should move the unit to apport package itself.

[ Test Case ]
* Install the new apport package from proposed
* Set in g-c-c, privacy panel, to report bugs automatically
* Make one program dumping a core dump
* Wait for a while, you should have a .upload and .uploaded files in addition to the .crash one in /var/crash

[ Regression potential ]
The systemd units were in apport-noui previously, we moved them and made them conditional to whoopsie being installed.
apport-noui is still useful by turning autoreport on, so people upgrading shouldn't have any impact or difference.
The units have been renamed to make sense and avoid package files overwrite.

-------------------------
There are 2 possible solutions:
- promoting apport-noui to main, and seeding it.
- or considering there is no reason anymore to have a separate apport-noui pacakge (no more phone factor), and so move the systemd units to apport, having a conditional file on whoopsie installed (no more dependency) and autoreport enabled, shipping those units binary package shipping those units (renamed to apport-autoreport.*) directly.

description: updated
affects: whoopsie (Ubuntu) → apport (Ubuntu)
Revision history for this message
Sebastien Bacher (seb128) wrote :

It's not clear from the changelog/package history why -noui was a split package. It does depends on "apport" so doesn't pull in less components, if there is a config API and a way to use/not use the service I don't see the point of splitting the binary, I would just merge it back with apport. (unless the point was that installing the binary would mean enabling the feature and that the change result in a behaviour change for users who rely on that?)
Note that apport-noui depens on watershed which is currently in universe, but it looks like that was in main in the past so should be just a matter of re-promoting.

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

FTR, discussed with Brian, my proposed solution sounds to make sense, keeping an unseeded apport-noui:
- have the systemd units (path and service) moved to apport binary package
- let apport-noui only touching/remove in maintainerscript script the autoreport file (this is the same file created by whoopsie when using its API for autoreporting)
- as we loose the dep on whoopsie, ensure the script detects whoopsie presence (even if disabled) for autoreporting, otherwise, fallback to showing the UI.

Revision history for this message
Sebastien Bacher (seb128) wrote :

The changes described make sense to me, thanks.

I'm not convinced that "apport-noui" is right/makes sense (if you install it and use the API to disable autoreporting you end up with the package installed but the service no started which is inconsistent with the definition) but it's a different topic that the problem discussed here

Note that my previous comment about watershed can be ignored, that was used only in the upstart job which is deprecated, the depends can be removed at the same time as the job in cosmic.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.20.10-0ubuntu5

---------------
apport (2.20.10-0ubuntu5) cosmic; urgency=medium

  * Assume if no whoopsie that crash reporting is enabled:
     As the old configuration that was a whoopsie configuration file that was
     that was never updated by the whoopsie API, we assume that no
     whoopsie installed (not the default) == manual send report is allowed.
     If people want to disable crash reporting:
     - get whoopsie installed and disable crash reporting in g-c-c
     - uninstall apport

 -- Didier Roche <email address hidden> Mon, 02 Jul 2018 10:59:22 +0200

Changed in apport (Ubuntu):
status: New → Fix Released
description: updated
Changed in apport (Ubuntu):
assignee: nobody → Didier Roche (didrocks)
Changed in apport (Ubuntu Bionic):
assignee: nobody → Didier Roche (didrocks)
Changed in apport (Ubuntu):
importance: Undecided → High
Changed in apport (Ubuntu Bionic):
importance: Undecided → High
Revision history for this message
Brian Murray (brian-murray) wrote :

sil2100 asked me to look at the SRU of this for Ubuntu 18.04 and I tested something in Cosmic that I have a concern about.

On a cosmic server I installed apport-noui, which also installed whoopsie, I then used kill -11 and a .crash file was created in /var/crash but no .upload and .uploaded file were.

I tried the same process again, but rebooted after installing apport-noui and that time the .upload and .uploaded files were created automatically. I haven't looked closely (I'll have a look later this week) but it seems like apport-autoreport should be restarted when whoopsie is installed.

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Thanks! I indeed didn't try the server side, I don't see how this is a new issue though compared to apport-noui.service? The same service files start/restart/stop rules are just moved to apport package via apport-autoreport.service. So, if there is a race on install until the next reboot, the same rule should apply with current systemd service.

You have more expertise than I on that one anyway, so I'll let you dig deeper this week. Keep me posted :)

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Didier, or anyone else affected,

Accepted apport into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apport/2.20.9-0ubuntu7.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in apport (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed verification-needed-bionic
Revision history for this message
Brian Murray (brian-murray) wrote :

When is the apport-autoreport.path service started? I was testing this and noticed that when switching the mode to automatic in g-c-c the file /var/lib/apport/autoreport is created but apport-autoreport.path does not seem to be started so crash reports would sit around until the next reboot when apport-autoreport.path is restarted.

I don't think is a deal breaker for this SRU but it should be fixed in cosmic.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

SRU verification for Bionic:
I have reproduced the problem on Ubuntu Desktop with apport 2.20.9-0ubuntu7.2 in bionic-updates and have verified that the version of apport 2.20.9-0ubuntu7.3 in -proposed fixes the issue.

Marking as verification-done

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for apport has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.20.9-0ubuntu7.3

---------------
apport (2.20.9-0ubuntu7.3) bionic; urgency=medium

  [ Didier Roche ]
  * Add a remember option to whoopsie so that users can diminish
    crash interactions (LP: #1778497)
  * Move apport autoreport service files to apport binary package.
    Having them in apport-noui was creating a bug where autoreport
    wasn't working on desktop. As we check in the launched script
    for whoopsie and autoreport file, we don't autoreport by default.
    (LP: #1778694)
    apport-noui still touches the file to enable autoreport on install.
  * Remove upstart service and watershed dependency.
  * Assume if no whoopsie that crash reporting is enabled:
    As the old configuration that was a whoopsie configuration file that was
    that was never updated by the whoopsie API, we assume that no
    whoopsie installed (not the default) == manual send report is allowed.
    If people want to disable crash reporting:
    - get whoopsie installed and disable crash reporting in g-c-c
    - uninstall apport

  [ Brian Murray ]
  * Start apport-autoreport after installing apport-noui which is part of
    improving apport's automatic crash reporing feature. (LP: #1778694)

 -- Didier Roche <email address hidden> Tue, 10 Jul 2018 11:10:15 +0200

Changed in apport (Ubuntu Bionic):
status: Fix Committed → 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.