apport-autoreport.service fails if autoreporting is disabled

Bug #2069360 reported by Benjamin Drung
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Apport
Fix Released
Medium
Unassigned
apport (Ubuntu)
Fix Released
Medium
Unassigned
Noble
Fix Released
Medium
Unassigned

Bug Description

[ Impact ]

apport-autoreport.service fails if auto-reporting is disabled:

```
$ systemctl status apport-autoreport.service
× apport-autoreport.service - Process error reports when automatic reporting is enabled
     Loaded: loaded (/usr/lib/systemd/system/apport-autoreport.service; static)
     Active: failed (Result: exit-code) since Thu 2024-06-13 21:55:08 CEST; 1h 9min ago
TriggeredBy: ● apport-autoreport.timer
             ● apport-autoreport.path
    Process: 1059564 ExecStart=/usr/share/apport/whoopsie-upload-all --timeout 20 (code=exited, status=1/FAILURE)
   Main PID: 1059564 (code=exited, status=1/FAILURE)
        CPU: 86ms

Jun 13 21:55:08 host systemd[1]: Starting apport-autoreport.service - Process error reports when automatic reporting is enabled...
Jun 13 21:55:08 host whoopsie-upload-all[1059564]: ERROR: whoopsie.path is not enabled
Jun 13 21:55:08 host systemd[1]: apport-autoreport.service: Main process exited, code=exited, status=1/FAILURE
Jun 13 21:55:08 host systemd[1]: apport-autoreport.service: Failed with result 'exit-code'.
Jun 13 21:55:08 host systemd[1]: Failed to start apport-autoreport.service - Process error reports when automatic reporting is enabled.
```

This service failure might mislead user thinking that there is a problem.

[ Test Plan ]

1. Disable auto-reporting in the system setting:
  * open gnome-control-center or unity-control-center
  * Switch to "Security & Privacy" panel
  * Select "Diagnosticts" tab
  * unselect "Send error reports to Canonical"
2. Produce a crash, e.g. by running divide-by-zero from chaos-marmosets
3. Check that apport-autoreport.service is failing as above
4. Upgrade Apport to the fixed version
5. Restart apport-autoreport.service
6. apport-autoreport.service should exit successfully

[ Where problems could occur ]

This code change touches the auto-reporting part. Failures there could lead to less bugs being forwarded to the error tracker. This might be noticeable when looking at the number of submissions.

Benjamin Drung (bdrung)
Changed in apport:
importance: Undecided → Low
Changed in apport (Ubuntu):
importance: Undecided → Medium
Changed in apport:
importance: Low → Medium
milestone: none → 2.30.0
Revision history for this message
Benjamin Drung (bdrung) wrote :
Changed in apport:
status: New → In Progress
Revision history for this message
Benjamin Drung (bdrung) wrote :
Changed in apport:
status: In Progress → Fix Committed
Revision history for this message
Benjamin Drung (bdrung) wrote :

The fix for this bug is staged for the next oracular upload.

description: updated
Changed in apport (Ubuntu):
status: New → Fix Committed
Changed in apport (Ubuntu Noble):
importance: Undecided → Medium
Revision history for this message
Steve Langasek (vorlon) wrote :

> 1. Disable auto-reporting in the system setting

This doesn't look like a test case that can be followed by someone unfamiliar with the software.

Changed in apport (Ubuntu Noble):
status: New → Incomplete
Revision history for this message
Benjamin Drung (bdrung) wrote :

Extended point one with the individual steps.

description: updated
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Benjamin, or anyone else affected,

Accepted apport into noble-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apport/2.28.1-0ubuntu3.1 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, what testing has been performed on the package and change the tag from verification-needed-noble to verification-done-noble. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-noble. 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 for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in apport (Ubuntu Noble):
status: Incomplete → Fix Committed
tags: added: verification-needed verification-needed-noble
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (apport/2.28.1-0ubuntu3.1)

All autopkgtests for the newly accepted apport (2.28.1-0ubuntu3.1) for noble have finished running.
The following regressions have been reported in tests triggered by the package:

apport/2.28.1-0ubuntu3.1 (arm64)
apport/unknown (s390x)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/noble/update_excuses.html#apport

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Chris Peterson (cpete) wrote :

Looks good to me. Booted noble release ISO and followed the steps as described.

Changed "send error reports to canonical" from "manual" to "never".

Produced a crash with `divide-by-zero` from chaos-marmosets. Apport prompt came up but only with a "continue" button. No crash report uploaded.

Before upgrade:

$ systemctl status apport-autoreport.service
○ apport-autoreport.service - Process error reports when automatic reporting is enabled
     Loaded: loaded (/usr/lib/systemd/system/apport-autoreport.service; static)
     Active: inactive (dead)
TriggeredBy: ○ apport-autoreport.path
             ○ apport-autoreport.timer

After upgrade:

$ systemctl status apport-autoreport.service
○ apport-autoreport.service - Process error reports when automatic reporting is enabled
     Loaded: loaded (/usr/lib/systemd/system/apport-autoreport.service; static)
     Active: inactive (dead)
TriggeredBy: ○ apport-autoreport.timer
             ○ apport-autoreport.path
  Condition: start condition unmet at Wed 2024-08-07 23:43:41 UTC; 13s ago
             └─ ConditionPathExists=/var/lib/apport/autoreport was not met

Aug 07 23:43:41 ubuntu systemd[1]: apport-autoreport.service - Process error reports when automatic reporting is enabled was skipped because of an unmet condition check (ConditionPathExists=/var/lib/apport/autoreport).

Revision history for this message
Benjamin Drung (bdrung) wrote :

Followed the test plan on my desktop machine. After upgrading apport via "sudo apt install -t noble-proposed apport" (to version 2.28.1-0ubuntu3.1) the apport-autoreport.service does not fail any more. "systemctl status apport-autoreport.service" shows:

```
whoopsie-upload-all[3478458]: INFO:root:whoopsie.path is not enabled, doing nothing
systemd[1]: apport-autoreport.service: Deactivated successfully.
```

tags: added: verification-done verification-done-noble
removed: verification-needed verification-needed-noble
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

What's the status of this in oracular? I don't see it in oracular-proposed, nor is it in 2.29.0-0ubuntu1 currently in oracular release.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I got a committment that the oracular fix would be uploaded by tomorrow.

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

This bug was fixed in the package apport - 2.28.1-0ubuntu3.1

---------------
apport (2.28.1-0ubuntu3.1) noble; urgency=medium

  [ Chris Peterson ]
  * d/package-hooks/subiquity.py: update information collection (LP: #2067775)
    - Add information about snap update/refresh state
    - Attach logs and change key names to align with the information
      attached by subiquity's self-collection
    - Attach hardware information
    - Ensure bug reports are always private since there may be private
      information in the logs
    - Don't require sudo for logs collection
    - Add journal logs
    - Ensure snap revision is included in both deb and snap collection
      style
    - Handle version information when permission elevation fails.

  [ Benjamin Drung ]
  * apport: do not modify permission of existing /var/crash or
    create /var/crash with setgid permission (mode 3777) (LP: #2066995)
  * apport.postinst: Create /var/crash with mode 3777 (LP: #2066995)
  * whoopsie-upload-all: exit with 0 if whoopsie is disabled (LP: #2069360)
  * Fix retracing crashes on Ubuntu 24.04 (noble) and add chaos-marmosets as
    dependency for the newly added system-tests (LP: #2067120)

  [ Sebastien Bacher ]
  * Fix some issues in the hook for ubuntu-desktop-bootstrap (LP: #2072751)

 -- Benjamin Drung <email address hidden> Mon, 22 Jul 2024 16:59:07 +0200

Changed in apport (Ubuntu Noble):
status: Fix Committed → Fix Released
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Update Released

The verification of the Stable Release Update for apport has completed successfully and the package is now being 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.

Benjamin Drung (bdrung)
Changed in apport:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.30.0-0ubuntu1

---------------
apport (2.30.0-0ubuntu1) oracular; urgency=medium

  [ Benjamin Drung ]
  * New upstream release:
    - whoopsie-upload-all: exit with 0 if whoopsie is disabled (LP: #2069360)
    - launchpad: don't systematically order retrace on private reports
      (LP: #2068933)
    - recent-syslog: read stdout after process completion (LP: #2073935)
    - Fix apport-retrace system tests on non-amd64 (LP: #2069815)
    - fix race condition in wait_for_gdb_sleeping_child_process (LP: #2073933)
    - fix flaky test_crash_system_slice (LP: #2076186)
  * Depend on gdb-multiarch and python3-psutil for system tests

  [ Chris Peterson ]
  * subiquity: handle missing log for version inspect (LP: #2067775)

  [ Sebastien Bacher ]
  * Fix some issues in the hook for ubuntu-desktop-bootstrap (LP: #2072751)

 -- Benjamin Drung <email address hidden> Fri, 09 Aug 2024 16:57:32 +0200

Changed in apport (Ubuntu):
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.