thread_collect_info can leave out information in .crash files

Bug #1360417 reported by Brian Murray
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
Martin Pitt
Fix Released
Brian Murray

Bug Description

I noticed there were some crash reports in the Ubuntu Error Tracker with incomplete information in them (bug 1355546) and ended up creating a test case that recreates one way the problem can occur.

1) in a terminal run 'sudo chmod 600 /etc/apt/sources.list'
2) run 'update-manager'
3) observe a crash and click "Leave Closed" on the crash notification dialog
4) confirm that there is in /var/crash/ a .upload and .uploaded file for the update-manager crash

If you inspect the update-manager crash file you'll notice it is missing Dependencies and DistroRelease so the additional apport data collection was never done. Additionally, some information from "Show Details" of apport dialog does not appear in the report.

UnreportableReason: E: Opening /etc/apt/sources.list...
DistroRelease: Ubuntu 14.04

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

I've tracked this down to the following in apport/

    except ValueError:
        # this happens if we are collecting information on an uninstalled
        # package
        if not ignore_uninstalled:
    except SystemError as e:
        report['UnreportableReason'] = excstr(e)

We are returning from thread_collect_info() before we've written the collected information to the report. Removing the return works but then 'UnreportableReason' was changed to 'This package does not seem to be installed correctly'. I think that any information gathered by apport should be written to the report and we shouldn't return so early from collecting info.

With the Error Tracker we've made a design decision to send reports that are "unreportable" to Launchpad and it seems like this, the case of /etc/apt/source.list being unreadable, is one of the crashes we'd want reported.

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

This also happened to me with the oneconf-service:

/etc/apt/sources.list was having read permissions removed from it by apt-clone, a bug which has since been fixed. But again having this issues reported to the Error Tracker would be a good thing.

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

Here is the incomplete .crash file in the Error Tracker:

This is the one that was made when I removed the return from collect_info:

As we can see there is much more information in the second crash.

Changed in apport (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
Martin Pitt (pitti)
Changed in apport (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
Revision history for this message
Martin Pitt (pitti) wrote :

Fixed in trunk r2846.

Changed in apport (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

apport (2.14.7-0ubuntu1) utopic; urgency=medium

  * New upstream release:
    - Fix interpretation of core dump ulimits: they are in bytes, not KiB.
      (LP: #1346497)
    - apport-retrace: Don't require specifying an operation; default to
      updating the given .crash file. (LP: #1361242)
    - Write report even on UnreportableReasons, so that whoopsie can still
      upload them. (LP: #1360417)
    - apt/dpkg install_packages(): Write a "packages.txt" into sandbox root
      directory to keep track of installed packages and their versions.
      Prerequisite for LP #1352591.
    - apt/dpkg install_packages(): Avoid re-downloading/installing packages
      which are already installed into a permanent sandbox. Prerequisite for
      LP #1352591.
    -, make_sandbox(): Drop check for already existing files
      when dynamically resolving libraries and ExecutablePaths; with that,
      these packages would never get updated in a permanent sandbox. The new
      version tracking from above now takes care of that. (LP: #1352591)
    - Fix report.test_add_proc_info test to stop assuming that pid 1 is named
      "init", as one can specify a different one on the kernel command line.
    -, add_gdb_info(): Check for truncated core dumps, and set
      UnreportableReason and raise an IOError on them. Handle this in
      apport-retrace and whoopsie-upload-all to fail properly instead of
      silently producing broken Stacktraces. (LP: #1354571)
 -- Martin Pitt <email address hidden> Fri, 29 Aug 2014 12:38:54 +0200

Changed in apport (Ubuntu):
status: Fix Committed → Fix Released
Changed in apport (Ubuntu Trusty):
status: New → Triaged
importance: Undecided → Medium
Changed in apport (Ubuntu Trusty):
assignee: nobody → Brian Murray (brian-murray)
Revision history for this message
Brian Murray (brian-murray) wrote :

I've uploaded this to the trusty-proposed queue for review.

Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Brian, or anyone else affected,

Accepted apport into trusty-proposed. The package will build now and be available at in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See 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 . Thank you in advance!

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

I installed the version of apport from trusty-proposed and confirm that the .crash file had information added to it. Specifically, DistroRelease, UnreportableReason, Uname, Architecture were added. However, Dependencies was not because apport can't read /etc/apt/sources.list (duh).

tags: added: verification-done
removed: verification-needed
Revision history for this message
Scott Kitterman (kitterman) 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.14.1-0ubuntu3.4

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

  * Write report even for crashes with UnreportableReasons, so that whoopsie
    will upload more information. (LP: #1360417)
 -- Brian Murray <email address hidden> Tue, 02 Sep 2014 09:53:41 -0700

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