Submitting error report asks confounding questions

Bug #1084979 reported by Matthew Paul Thomas on 2012-11-30
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Apport
Medium
Unassigned
apport (Ubuntu)
Medium
Brian Murray
Trusty
Medium
Brian Murray
Utopic
Medium
Brian Murray

Bug Description

Test Case
---------
1) start totem in a terminal
2) pkill -11 totem
3) observe apport crash dialog
4) make sure send an error report is checked
5) click Leave Closed
6) Observe an apport dialog about "How would you describe the issue?"

With the version of apport from -proposed the apport dialog will not appear.

Original report
---------------
Ubuntu 12.04
apport 2.6.1-0ubuntu10, Ubuntu 12.10
apport 2.12.5-0ubuntu2.2, Ubuntu 13.10

1. In a release version of Ubuntu, trigger an error in something that has Apport hooks.

What happens: You are asked questions which are often false and usually not understandable. For example:

"It seems you have modified the contents of '/etc/cups/cupsd.conf'. Would you like to add the contents of it to your bug report?" https://launchpadlibrarian.net/124496439/apport-question.png -- You haven't, and there is no bug report.

"Thanks for reporting this bug on unity. Is the issue you are reporting purely graphical (will report more information about your graphic configuration and will report the bug against compiz)?"
https://launchpadlibrarian.net/117922627/apport%20%28ubuntu-bug%20unity%20%231%29.png -- "Purely grapical" is unexplained, and there is no bug report.

"Did your system recently lock up or require a hard reboot?" -- What's a "hard reboot"?

What should happen: You are not asked any questions.

If all reporters of actual bugs are expected to use English, hiding these questions from non-reporters might also resolve bug 855337.

[Originally reported by Katie Taylor.]

Related branches

Matthew Paul Thomas (mpt) wrote :
Evan (ev) on 2012-11-30
Changed in apport:
importance: Undecided → Medium
status: New → Confirmed
Evan (ev) wrote :

Bug 1063189 offers further evidence that we should never let package hooks ask questions:
https://launchpadlibrarian.net/118790019/Screenshot%20from%202012-09-14%2009%3A53%3A21.png

Evan Dandrea [2012-11-30 14:37 -0000]:
> Bug 1063189 offers further evidence that we should never let package hooks ask questions:
> https://launchpadlibrarian.net/118790019/Screenshot%20from%202012-09-14%2009%3A53%3A21.png

This is a very reasonable question for a development release IMHO, and
such questions (also about attaching X.org and lightdm logs which need
root privs) can greatly improve the utility of Launchpad reports
during a development release.

I do agree that questions should not be asked in stable releases when
only submitting to errors.u.c.

Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

Brian Murray (brian-murray) wrote :

Another reason that this should not happen is because the fields uploaded by whoopsie (http://bazaar.launchpad.net/~daisy-pluckers/whoopsie/trunk/view/head:/src/whoopsie.c#L87) are from apport proper and from apport package hooks.

Changed in apport (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Brian Murray (brian-murray) wrote :

Of course I meant "and not from apport package hooks".

description: updated
Brian Murray (brian-murray) wrote :

Looking at the code I think we'd want the common hooks to run but not the package hooks. I've tested the following and it works, but the test test_report.py fails because it passes a string for ui.

=== modified file 'apport/report.py'
--- apport/report.py 2013-09-27 03:56:13 +0000
+++ apport/report.py 2013-10-14 22:23:24 +0000
@@ -829,6 +829,10 @@
             if _run_hook(self, ui, hook):
                 return True

+ # LP: #1084979 - don't run package hooks if not sending to the crashdb
+ if not ui.ui.crashdb.accepts(self):
+ return False
+
         # binary package hook
         if package:
             for hook_dir in hook_dirs:

Martin Pitt (pitti) wrote :

This is a nice hack, but not something which I'd like to put upstream (as this is quite specific how we bolted on whoopsie support in the ubuntu branch) or even into the Ubuntu package.

I'd rather not pass an UI object to the hooks but call them anyway, as they usually do other things than just asking questions; some, like rhythmbox, even change the affected package. Not passing an UI object will crash those hooks which don't check for it, but that doesn't matter that much.

description: updated
Brian Murray (brian-murray) wrote :

Some apport package hooks, like totem's, will need to be modified so that they still collect data even if ui is None.

def add_info(report, ui):

    response = ui.choice("How would you describe the issue?", ["The totem interface is not working correctly", "No sound is being played", "Some audio files or videos are not being played correctly"], False)

    if response == None: # user cancelled
        raise StopIteration
    .....
    report["LogAlsaMixer"] = apport.hookutils.command_output(["/usr/bin/amixer"])

Because ui is None, then response crashes and the addition of AlsaMixer never happens. However, this can be fixed by either checking for ui or reorganizing the order of operations.

Changed in apport (Ubuntu):
assignee: nobody → Brian Murray (brian-murray)
status: Triaged → In Progress
Martin Pitt (pitti) wrote :

As I said, this is a hack which I don't want to put into upstream, but https://code.launchpad.net/~brian-murray/apport/bug-1084979/+merge/248685 looks ok for the Ubuntu package.

Changed in apport:
status: Confirmed → Won't Fix
Martin Pitt (pitti) wrote :

I merged Brian's MP to trunk now, as it doesn't break anything on the Debian side. The conditional provision of UI looks fine. Thanks!

Changed in apport:
status: Won't Fix → Fix Released
Changed in apport (Ubuntu):
status: In Progress → Fix Committed
Changed in apport (Ubuntu Trusty):
status: New → Triaged
Changed in apport (Ubuntu Utopic):
status: New → Triaged
Changed in apport (Ubuntu Trusty):
importance: Undecided → Medium
Changed in apport (Ubuntu Utopic):
importance: Undecided → Medium
Changed in apport (Ubuntu Trusty):
assignee: nobody → Brian Murray (brian-murray)
Changed in apport (Ubuntu Utopic):
assignee: nobody → Brian Murray (brian-murray)
Changed in apport (Ubuntu Trusty):
status: Triaged → In Progress
Changed in apport (Ubuntu Utopic):
status: Triaged → In Progress
Timo Aaltonen (tjaalton) wrote :

Please add the SRU header as mentioned on https://wiki.ubuntu.com/StableReleaseUpdates

description: updated
Launchpad Janitor (janitor) wrote :

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

---------------
apport (2.16-0ubuntu1) vivid; urgency=medium

  * New upstream release:
    - Add a new method ProblemReport.extract_keys() which writes binary keys
      (which can be very large) directly to files without loading them all
      into memory first. Use that in apport-unpack. Thanks Louis Bouchard!
      (LP: #1307413)
    - launchpad backend: Work with Python 3, now that launchpadlib exists for
      Python 3. (LP: #1153671)
    - apport-bug, apport-gtk: Also check for $WAYLAND_SESSION, to use
      apport-gtk instead of apport-cli under Wayland. Thanks Tim Lunn.
      (LP: #1418766)
    - apport-gtk: When running under Wayland, avoid Gdk/Wnck operation for
      setting crash window modal to the PID of the crashed window; these only
      work under X11.
    - Don't install the test suite any more, to save 1 MB of installed space.
      It can be run out of trunk easily enough, and distributions can install
      it from tests/ if they desire.
    - hookutils, attach_root_command_outputs(): Fix UnicodeDecodeError crash
      for non-textual values. (LP: #1370259)
    - ui.py: Only provide a UI to hooks if the crash db will accept the
      report. This avoids asking questions if the report is merely sent to
      whoopsie for Ubuntu stable releases. Thanks Brian Murrary.
      (LP: #1084979)
    - whoopsie-upload-all: Add package information to the report before
      calling package hooks. Thanks Brian Murray.
    - Fix check for available terminal when checking whether to display the
      "Examine locally" button.
  * Add general hook for detecting Wayland sessions and tagging them with
    "wayland-session". Thanks Timm Lunn! (LP: #1418262)
  * debian/tests/upstream-system: Copy tests from source tree, as
    /usr/share/apport/testsuite/ does not exist any more.
 -- Martin Pitt <email address hidden> Fri, 06 Feb 2015 10:11:30 +0100

Changed in apport (Ubuntu):
status: Fix Committed → Fix Released

Hello Matthew, or anyone else affected,

Accepted apport into utopic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apport/2.14.7-0ubuntu8.2 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 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 to verification-done. If it does not fix the bug for you, please add a comment stating that, and 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 Utopic):
status: In Progress → Fix Committed
tags: added: verification-needed
Brian Murray (brian-murray) wrote :

Hello Matthew, or anyone else affected,

Accepted apport into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apport/2.14.1-0ubuntu3.7 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 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 to verification-done. If it does not fix the bug for you, please add a comment stating that, and 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 Trusty):
status: In Progress → Fix Committed
Brian Murray (brian-murray) wrote :

I tested apport version 2.14.1-0ubuntu3.7 from trusty-proposed and confirm that questions are no longer asked by the totem (and subsequently any) source package hook.

tags: added: verification-done-trusty
tags: added: verification-needed-utopic
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.14.1-0ubuntu3.7

---------------
apport (2.14.1-0ubuntu3.7) trusty-proposed; urgency=medium

  * apport/ui.py: Only provide a UI to hooks if the crash db will accept the
    report. This avoids asking questions if the report is merely sent to
    whoopsie for Ubuntu stable releases. (LP: #1084979)
 -- Brian Murray <email address hidden> Thu, 05 Feb 2015 10:09:15 -0800

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

Brian Murray (brian-murray) wrote :

I tested apport version 2.14.7-0ubuntu8.2 from utopic-proposed and confirm that apport no longer asks questions.

tags: added: verification-done-utopic
removed: verification-needed-utopic
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.14.7-0ubuntu8.2

---------------
apport (2.14.7-0ubuntu8.2) utopic-proposed; urgency=medium

  * apport/ui.py: Only provide a UI to hooks if the crash db will accept the
    report. This avoids asking questions if the report is merely sent to
    whoopsie for Ubuntu stable releases. (LP: #1084979)
 -- Brian Murray <email address hidden> Thu, 05 Feb 2015 09:39:32 -0800

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

Duplicates of this bug

Other bug subscribers

Bug attachments