linux package hook checks uname for KernelOops

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

Bug Description

The linux package hook, provided by apport, contains the following code:

def add_info(report, ui):

    # If running an upstream kernel, instruct reporter to file bug upstream
    abi = re.search("-(.*?)-", report['Uname'])
    if abi and (abi.group(1) == '999' or re.search("^0\d", abi.group(1))):

Checking uname makes sense if some one is reporting a bug about the running kernel, but not if apport has raised a crash report dialog for a previous Oops. Here is a portion of one crash report:

ProblemType: KernelOops
...
Package: linux-image-3.10.0-031000-generic
...
Uname: Linux 3.12.0-031200rc1-generic x86_64

It should be investigated to see if this blocks sending crash reports to the error tracker and if so the check should be modified not to use uname at least for kerneloops.

summary: - linux package hook checks uname for Oops'es
+ linux package hook checks uname for KernelOops
Revision history for this message
Martin Pitt (pitti) wrote :

I'm afraid I don't understand this. If you do "ubuntu-bug linux" it's supposed to be filed against the currently running kernel, so the Uname: field will be determined at the time when you run ubuntu-bug. But when add_info() runs, it only looks at the report's Uname: field, not the current uname(). So what is the problem here, can you please be more concrete about when this would do the wrong thing? Thanks!

Changed in apport (Ubuntu):
status: New → Incomplete
Revision history for this message
Brian Murray (brian-murray) wrote :

If you experience a kernel oops and your system locks up, such that only the crash file is written then Uname is not written to that crash file. (See kernel_oops.) Later on (after you reboot) when information is collected for the report the currently running kernel is added as Uname to the report.

Perhaps kernel_oops should write Uname when it creates the crash file.

Revision history for this message
Martin Pitt (pitti) wrote :

Ah, that's right.

Changed in apport (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
Martin Pitt (pitti) wrote :

Notes: need to add add_os_info() to kernel_oops, and don't overwrite an already present field in Report.add_os_info().

Changed in apport (Ubuntu):
status: Triaged → Incomplete
status: Incomplete → Triaged
Revision history for this message
Martin Pitt (pitti) wrote :

Pre-requisite from comment 4 fixed in upstream r2710.

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

kernel_oops fixed in trunk r2711.

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.12.5-0ubuntu1

---------------
apport (2.12.5-0ubuntu1) saucy; urgency=low

  * New upstream bug fix release:
    - Report.add_os_info(): Do not overwrite already existing data.
      (LP: #1226776)
    - kernel_oops hook: Collect uname at the time of invoking the hook,
      instead of at data collection time. (LP: #1226776)
    - Replace fixed size icons with PNGs, which are more efficient and avoid
      rendering artifacts. (LP: #1231763)
 -- Martin Pitt <email address hidden> Fri, 27 Sep 2013 05:56:30 +0200

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