thread_collect_info can leave out information in .crash files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apport (Ubuntu) |
Fix Released
|
Medium
|
Martin Pitt | ||
Trusty |
Fix Released
|
Medium
|
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/
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/
DistroRelease: Ubuntu 14.04
Changed in apport (Ubuntu): | |
assignee: | nobody → Martin Pitt (pitti) |
Changed in apport (Ubuntu): | |
status: | New → In Progress |
importance: | Undecided → Medium |
Changed in apport (Ubuntu Trusty): | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in apport (Ubuntu Trusty): | |
assignee: | nobody → Brian Murray (brian-murray) |
I've tracked this down to the following in apport/ui.py:
try:
report. add_package_ info(package)
report[ 'UnreportableRe ason'] = excstr(e)
except ValueError:
# this happens if we are collecting information on an uninstalled
# package
if not ignore_uninstalled:
raise
except SystemError as e:
return
We are returning from thread_ collect_ info() before we've written the collected information to the report. Removing the return works but then 'UnreportableRe ason' 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.