whoopsie-upload-all will run hooks on a corrupt crash file multiple times

Bug #1376374 reported by Brian Murray on 2014-10-01
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Medium
Brian Murray

Bug Description

whoopsie-upload-all in it's process_report() function will try to collect information for a crash with a truncated core dump every time it is called thereby wasting resources on a device.

I'm looking at the following code:

    if 'Dependencies' in r:
        print('%s already has info collected' % report)
    else:
        print('Collecting info for %s...' % report)
        r.add_os_info()
        # add minimal hook information here; whoopsie only considers
        # ApportVersion, NonfreeKernelModules, SystemImageInfo
        try:
            r.add_hooks_info(None)
        except Exception as e:
            sys.stderr.write('WARNING: hook failed for processing %s: %s\n' % (report, str(e)))

        try:
            r.add_gdb_info()
        except (IOError, EOFError) as e:
            sys.stderr.write('ERROR: processing %s: %s\n' % (report, str(e)))
            return None

Because the report is never written Dependencies is never added to the report, so every time whoopsie-upload-all is called it will run add_hooks_info() and add_gdb_info() for the same report.

tags: added: utopic
Martin Pitt (pitti) wrote :

Right, I think the exception handler for the add_gdb_info() call should unlink() the report then, as it's broken and useless. Do you agree?

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

Given that we won't be able to generate a StacktraceAddressSignature without information from gdb, yes I agree it's broken and not worth sending to the Error Tracker.

Changed in apport (Ubuntu):
assignee: nobody → Brian Murray (brian-murray)
status: Triaged → In Progress
Launchpad Janitor (janitor) wrote :

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

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

  [ Evan Dandrea]
  * data/recoverable_problem: Handle the parent process going away while
    we're attempting to read from proc. (LP: #1345569)
 -- Brian Murray <email address hidden> Tue, 07 Oct 2014 15:26:30 -0700

Changed in apport (Ubuntu):
status: In Progress → Fix Released
Martin Pitt (pitti) wrote :

I'm not quite sure why *this* bug got closed with that upload. Both the changelog and the bzr commit refer to bug 1345569. Reopening.

Changed in apport (Ubuntu):
status: Fix Released → Triaged
Martin Pitt (pitti) wrote :

Ah sorry, there were two uploads and the first one didn't make it to utopic, so LP changelog confusion:

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

  * data/whoopsie-upload-all: remove crash reports that have a core dump
    which is broken and cannot be processed by gdb. (LP: #1376374)

 -- Brian Murray <email address hidden> Tue, 07 Oct 2014 14:48:28 -0700

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

Other bug subscribers