apport will create .upload files for incomplete or corrupt crash reports

Bug #1512902 reported by Brian Murray
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
High
Brian Murray
Precise
Won't Fix
High
Brian Murray
Trusty
Fix Released
High
Brian Murray
Vivid
Fix Released
High
Brian Murray
Wily
Fix Released
High
Brian Murray

Bug Description

SRU information appears in comment #3.

apport will set an UnreportableReason in the following situations for crash reports where information collection fails or for packages that do not exist. From apport/ui.py:

1036 try:
1037 icthread.exc_raise()
1038 except (IOError, EOFError, zlib.error) as e:
1039 # can happen with broken core dumps
1040 self.report['UnreportableReason'] = '%s\n\n%s' % (
1041 _('This problem report is damaged and cannot be processed.'),
1042 repr(e))
1043 except ValueError: # package does not exist
1044 self.report['UnreportableReason'] = _('The report belongs to a package that is not installed.')
1045 except Exception as e:
1046 apport.error(repr(e))
1047 self.report['UnreportableReason'] = _('An error occurred while attempting to '
1048 'process this problem report:') + '\n\n' + str(e)

Because an UnreportableReason exists in the report, apport will stop collecting information. Subsequently, there is "_MarkForUpload" is left as True (the default) so apport calls mark_report_upload which creates a .upload file such that the report which is incomplete or corrupt is then uploaded to the Error Tracker.

In these cases the "_MarkForUpload" key should be set to "False" thereby preventing uploads to the Error Tracker.

tags: added: xenial
Changed in apport (Ubuntu):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Brian Murray (brian-murray)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.19.2-0ubuntu2

---------------
apport (2.19.2-0ubuntu2) xenial; urgency=medium

  * apport/ui.py: set "_MarkForUpload" field to False for cases where the
    apport report is damaged, about a not installed package, or when an
    error occurred processing the report. (LP: #1512902)

 -- Brian Murray <email address hidden> Tue, 03 Nov 2015 15:44:18 -0800

Changed in apport (Ubuntu):
status: In Progress → Fix Released
Changed in apport (Ubuntu Wily):
status: New → Triaged
importance: Undecided → High
description: updated
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote :

This may cause a decrease in the quantity for crash reports that appear as "Not a core dump per gdb" in the Error Tracker retracer log files and the counter "retrace.failure.gdb_core_check".

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

TEST CASE
--------------
1) Put the attached crash report (re /bin/sleep with the CoreDump field corrupted) in /var/crash/
2) Run ubuntu-bug /var/crash/_bin_sleep.1000.crash
3) View the details of the crash and observe an UnreportableReason indicating that the "problem report is damaged"
4) Leave "Send an error report" checked and click continue
5) Observe a _bin_sleep.1000.upload in /var/crash/

With the version of the package from -proposed a .upload file will not be created.

REGRESSION POTENTIAL
----------------------------------
It's possible that _MarkForUpload will be set to False in more cases than it should be thereby preventing crashes from being sent to the Error Tracker. So it might also be good to SEGV a process and ensure that a .crash and .upload file are created.

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

This is the test crash with a corrupted CoreDump field.

description: updated
Changed in apport (Ubuntu Wily):
assignee: nobody → Brian Murray (brian-murray)
status: Triaged → In Progress
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Brian, or anyone else affected,

Accepted apport into wily-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apport/2.19.1-0ubuntu5 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 Wily):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Brian Murray (brian-murray) wrote :

I've verified this fix in Wily using the test case that I provided.

bdmurray@blacklightning:/var/crash$ apt-cache policy python3-apport
python3-apport:
  Installed: 2.19.1-0ubuntu5
  Candidate: 2.19.1-0ubuntu5
  Version table:
 *** 2.19.1-0ubuntu5 0
        100 /var/lib/dpkg/status
     2.19.1-0ubuntu4 0
        500 http://us.archive.ubuntu.com/ubuntu/ wily-updates/main amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu/ wily-security/main amd64 Packages
     2.19.1-0ubuntu3 0
        500 http://us.archive.ubuntu.com/ubuntu/ wily/main amd64 Packages
bdmurray@blacklightning:/var/crash$ ls -lh
total 32K
-rw-r----- 1 bdmurray whoopsie 31K Nov 4 13:37 _bin_sleep.1000.crash

tags: added: verification-done
removed: verification-needed
Changed in apport (Ubuntu Wily):
status: Fix Committed → Fix Released
Changed in apport (Ubuntu Wily):
status: Fix Released → Fix Committed
Changed in apport (Ubuntu Precise):
status: New → Triaged
Changed in apport (Ubuntu Trusty):
status: New → Triaged
Changed in apport (Ubuntu Vivid):
status: New → Triaged
Changed in apport (Ubuntu Precise):
importance: Undecided → High
Changed in apport (Ubuntu Trusty):
importance: Undecided → High
Changed in apport (Ubuntu Vivid):
importance: Undecided → High
Changed in apport (Ubuntu Wily):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote :

This is *not* fixed in the Ubuntu archive as the package has not been moved to -updates, it only exists in -proposed. The Launchpad janitor will automatically mark the task as Fix Released when the package moves to -updates.

Please stop setting this to Fix Released.

Changed in apport (Ubuntu Wily):
status: Fix Released → Fix Committed
Changed in apport (Ubuntu Vivid):
assignee: nobody → Brian Murray (brian-murray)
status: Triaged → In Progress
Changed in apport (Ubuntu Trusty):
status: Triaged → In Progress
assignee: nobody → Brian Murray (brian-murray)
Changed in apport (Ubuntu Precise):
status: Triaged → In Progress
assignee: nobody → Brian Murray (brian-murray)
Revision history for this message
Adam Conrad (adconrad) wrote :

Hello Brian, or anyone else affected,

Accepted apport into precise-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apport/2.0.1-0ubuntu17.14 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 Precise):
status: In Progress → Fix Committed
tags: removed: verification-done
tags: added: verification-needed
Changed in apport (Ubuntu Trusty):
status: In Progress → Fix Committed
Revision history for this message
Adam Conrad (adconrad) wrote :

Hello Brian, 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.19 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 Vivid):
status: In Progress → Fix Committed
Revision history for this message
Adam Conrad (adconrad) wrote :

Hello Brian, or anyone else affected,

Accepted apport into vivid-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apport/2.17.2-0ubuntu1.8 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!

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

I've verified this in Vivid with the test case I provided.

bdmurray@clean-vivid-amd64:~$ apt-cache policy apport
apport:
  Installed: 2.17.2-0ubuntu1.8
  Candidate: 2.17.2-0ubuntu1.8
  Version table:
 *** 2.17.2-0ubuntu1.8 0
        500 http://192.168.10.7/ubuntu/ vivid-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     2.17.2-0ubuntu1.7 0
        500 http://192.168.10.7/ubuntu/ vivid-updates/main amd64 Packages
        500 http://192.168.10.7/ubuntu/ vivid-security/main amd64 Packages
     2.17.2-0ubuntu1 0
        500 http://192.168.10.7/ubuntu/ vivid/main amd64 Packages
bdmurray@clean-vivid-amd64:~$ ls /var/crash/
_bin_sleep.1000.crash

tags: added: verification-done-vivid verification-done-wily
Revision history for this message
Brian Murray (brian-murray) wrote :

I've verified this in Trusty with the test case I provided.

bdmurray@clean-trusty-amd64:~$ apt-cache policy apport
apport:
  Installed: 2.14.1-0ubuntu3.19
  Candidate: 2.14.1-0ubuntu3.19
  Version table:
 *** 2.14.1-0ubuntu3.19 0
        500 http://192.168.10.7/ubuntu/ trusty-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     2.14.1-0ubuntu3.18 0
        500 http://192.168.10.7/ubuntu/ trusty-updates/main amd64 Packages
        500 http://192.168.10.7/ubuntu/ trusty-security/main amd64 Packages
     2.14.1-0ubuntu3 0
        500 http://192.168.10.7/ubuntu/ trusty/main amd64 Packages
bdmurray@clean-trusty-amd64:~$ ls /var/crash/
_bin_sleep.1000.crash

tags: added: verification-done-trusty
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote : [apport/wily] possible regression found

As a part of the Stable Release Updates quality process a search for Launchpad bug reports using the version of apport from wily-proposed was performed and bug 1513802 was found. Please investigate this bug report to ensure that a regression will not be created by this SRU. In the event that this is not a regression remove the "verification-failed" tag from this bug report and add the tag "bot-stop-nagging" to bug 1513802 (not this bug). Thanks!

tags: added: verification-failed
Revision history for this message
Brian Murray (brian-murray) wrote :

The test case for this bug fails with the version of apport from precise-proposed with the following.

*** Error: Invalid problem report

This problem report is damaged and cannot be processed.

IOError('CRC check failed 0xfd06bf8f != 0xe96ce39bL',)

Press any key to continue...
Traceback (most recent call last):
  File "/usr/bin/apport-cli", line 365, in <module>
    if not app.run_argv():
  File "/usr/lib/python2.7/dist-packages/apport/ui.py", line 565, in run_argv
    self.run_crash(self.options.crash_file, False)
  File "/usr/lib/python2.7/dist-packages/apport/ui.py", line 232, in run_crash
    self.report['_MarkForUpload'] = 'False'
TypeError: 'NoneType' object does not support item assignment

So it seems, with the IOError, that the crash would not have been uploaded anyway. The crash happens in Precise because the correct field is MarkForUpload not _MarkForUpload.

tags: added: verification-failed-precise
removed: verification-failed
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

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

  * apport/ui.py: set "_MarkForUpload" field to False for cases where the
    apport report is damaged, about a not installed package, or when an
    error occurred processing the report. (LP: #1512902)

 -- Brian Murray <email address hidden> Fri, 06 Nov 2015 07:14:08 -0800

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

This bug was fixed in the package apport - 2.17.2-0ubuntu1.8

---------------
apport (2.17.2-0ubuntu1.8) vivid-proposed; urgency=medium

  * apport/ui.py: set "_MarkForUpload" field to False for cases where the
    apport report is damaged, about a not installed package, or when an
    error occurred processing the report. (LP: #1512902)

 -- Brian Murray <email address hidden> Thu, 05 Nov 2015 15:27:47 -0800

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

This bug was fixed in the package apport - 2.19.1-0ubuntu5

---------------
apport (2.19.1-0ubuntu5) wily-proposed; urgency=medium

  * apport/ui.py: set "_MarkForUpload" field to False for cases where the
    apport report is damaged, about a not installed package, or when an
    error occurred processing the report. (LP: #1512902)

 -- Brian Murray <email address hidden> Wed, 04 Nov 2015 10:00:38 -0800

Changed in apport (Ubuntu Wily):
status: Fix Committed → Fix Released
Mathew Hodson (mhodson)
tags: added: verification-failed
removed: verification-failed-precise verification-needed
Revision history for this message
Martin Pitt (pitti) wrote : Proposed package removed from archive

The version of apport in the proposed pocket of Precise that was purported to fix this bug report has been removed because the bugs that were to be fixed by the upload were not verified in a timely (105 days) fashion.

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