ubuntu general hook should check to see if package install failure has already happened

Bug #1007637 reported by Brian Murray on 2012-06-01
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
High
Brian Murray
Precise
High
Brian Murray

Bug Description

[Impact]
Apport notifies you and asks you to file a bug for every package installation failure. If you try and install a broken package 20 times you can be lead to report that bug 20 times. This is wasteful and clutters bug lists.

[Test Case]
1) modify your /etc/default/grub configuration file so that is incorrect for example change the following:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

and remove the trailing quote.

2) sudo apt-get install --reninstall memtest86+
3) This should fail and you will receive an apport dialog indicating that there was a system problem and that memtest86+ failed to install.
4) Remove any memtest86+ files from /var/crash/
5) sudo apt-get install --reinstall memtest86+
6) With the version of apport from precise-proposed as you proceed through the bug filing screens (for the 2nd time) you will be presented with an Unreportable Reason message indicating that you have already encountered this package installation failure.

[Regression potential]
It is possible that other types of apport-package bug reports will be blocked. But as this has been in quantal since July and we are still regularly receiving apport-package bugs it doesn't look like that is the case.

In bug 991282, and its duplicates, we can see a bug reporter (its the same person) running into the same package installation failure at least 48 times. The duplicates here are misleading in that you may thing this bug is really grave until you discover that all the duplicates are from the same reporter. Additionally, the duplicates don't provide any useful information and are wasetful.

We can see that bug 991282 has a DuplicateSignature in it and this is how the apport retracer was able to mark duplicates of it. The DuplicateSignature is created in the general ubuntu hook, ubuntu.py, and I think when this is being created the rest of the DpkgTerminalLog should be scanned for earlier occurences of this error. In the event that we discover the same error we should assume that it has already been reported and not report another bug about it.

Changed in apport (Ubuntu):
status: New → Triaged
importance: Undecided → High
assignee: nobody → Brian Murray (brian-murray)
Changed in apport (Ubuntu):
status: Triaged → In Progress
Brian Murray (brian-murray) wrote :

An easy way to test this is to modify your /etc/default/grub configuration file so that is syntactically incorrect for example change the following:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

and remove the trailing quote. Then if you try to execute:

sudo apt-get install --reninstall memtest86+

you'll have a package installation failure. If you do this two times you'll be prompted to report two package installation failures - which as previously discussed isn't really useful.

With the attached patch we create a copy of the DpkgTerminalLog without the most recent failure (created by trim_dpkg_log) and then check to see if the duplicate signature is found in the original version of the DpkgTerminalLog. If it is we prevent bug reporting.

This should be SRU'ed to Precise at least.

tags: added: patch
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.4-0ubuntu4

---------------
apport (2.4-0ubuntu4) quantal; urgency=low

  * data/general/ubuntu.py: check to see if a package installation duplicate
    signature has been encountered previously and if so prevent bug reporting
    (LP: #1007637)
  * data/general/ubuntu.py: properly decode DpkgTerminalLog lines
 -- Brian Murray <email address hidden> Fri, 20 Jul 2012 11:39:06 -0700

Changed in apport (Ubuntu):
status: In Progress → Fix Released
Changed in apport (Ubuntu Precise):
status: New → Triaged
importance: Undecided → High
description: updated
description: updated
Changed in apport (Ubuntu Precise):
status: Triaged → In Progress
assignee: nobody → Brian Murray (brian-murray)

Hello Brian, or anyone else affected,

Accepted into precise-proposed. The package will build now and be available in a few hours in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation 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 change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

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

Changed in apport (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
C de-Avillez (hggdh2) wrote :

verified, following Brian's steps, that without the upgrade I can report the issue again and again. After installing apport 2.0.1-0ubuntu1, the second time I get a pop-up stating "This problem cannot be reported: You have already encountered this package installation failure."

Tagging verification-done.

tags: added: verification-done
removed: verification-needed

The verification of this Stable Release Update 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 regresssions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.0.1-0ubuntu14

---------------
apport (2.0.1-0ubuntu14) precise-proposed; urgency=low

  [ Brian Murray ]
  * data/general/ubuntu.py: check to see if a package installation duplicate
    signature has been encountered previously and if so prevent bug reporting
    (LP: #1007637)

  [ Martin Pitt ]
  * data/general-hooks/ubuntu.py: Add "package-from-proposed" tag if the
    installed package version is available from -proposed, but not from
    -security and -updates. Backported from Ubuntu branch r2088.
    (LP: #1050853)
 -- Martin Pitt <email address hidden> Thu, 20 Sep 2012 21:45:51 +0200

Changed in apport (Ubuntu Precise):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers