[RFE] Allow Bug Reporting When Running Backport Kernel

Bug #1004101 reported by Joseph Salisbury on 2012-05-24
20
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Medium
Unassigned
Precise
Medium
Martin Pitt

Bug Description

We would like to have apport modified to report a bug against the backport kernel

SRU TEST CASE:
- Add the backports PPA: sudo add-apt-repository ppa:ubuntu-x-swat/q-lts-backport
- Try to report a bug against it, with all three variants:
  ubuntu-bug linux-image-generic-lts-quantal
  ubuntu-bug linux-image-3.5.0-2-generic (adjust version to what is currently in the PPA)
  ubuntu-bug linux (if you are actually running that backport kernel)
- Current precise apport will reject it as "not an Ubuntu package"; with this change, it will collect information and present the collected data. The Source package should still be shown as "linux" and the Tags: field should include "qa-kernel-lts-testing" and "precise", as well as all the extra information that the hook collects, such as "AcpiTables".
- If you wish to double-check, send the report to Launchpad and verify it's reported against the "linux" source. But do not actually create the bug report.
- Confirm that "ubuntu-bug linux" (when you are not running the backported kernel) has the precise kernel in the apport data (3.2), and that it still has the hook info (AcpiTables).

REGRESSION POTENTIAL:
- The functionality of /etc/apport/native-origins.d/ is covered by apport's test suite, and is being used by other packages as well (e. g. firefox). It is very robust against syntax errors and wrong PPA names, in the worst case bugs still get rejected against backported packages.
- This changes the source linux package hook. If there are syntax or logic errors which cause exceptions, apport will still work, but all information that would have been collected after the hook crashes will be missing.

Just to add some additional information. The 12.10 kernel for 12.04 is currently being provided via a PPA:

https://launchpad.net/~ubuntu-x-swat/+archive/q-lts-backport

When running this 12.10 kernel in 12.04, attempting to file a bug via `ubuntu-bug linux` aborts with a message:

"The problem cannot be reported:

This is not an official Ubuntu package. Please remove any third party package and try again."

Martin Pitt (pitti) on 2012-05-29
Changed in apport (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Martin Pitt (pitti)
Martin Pitt (pitti) wrote :

With this we will mark all packages from that PPA as "treated as official Ubuntu package":

  $ echo 'LP-PPA-ubuntu-x-swat-q-lts-backport' | sudo tee /etc/apport/native-origins.d/lts-q-backports

If that's not desired, I can change the package hook to see if the package is not native, and if not, accept it if it contains "-backport-quantal" (but then any other kernel from any package source which matches that name will be accepted).

These approaches (check PPA origin and check name) can also be combined.

Please let me know which you consider most appropriate. Thanks!

Changed in apport (Ubuntu):
status: In Progress → Incomplete

Hi Martin,

Thanks for looking at this. Speaking from the kernel team's perspective, we'd like to see all kernel related packages from that PPA to be treated as "official Ubuntu packages" wrt apport bug reporting. I'm assuming the X team will be of the same opinion thus we'd be able to treat all packages from that PPA as "official Ubuntu packages".

And just to start thinking out loud, as we look ahead we may want to rename the PPA to not be specifically tied to Q. This concept of providing newer packages (eg the kernel, X, etc) to the previous LTS release will persist going forward so we may want to generically name the PPA so that we won't have to patch apport for every new release. Just a thought.

Bryce Harrington (bryce) wrote :

Yes, treating them all as official packages for apport-based bug reporting is desirable on the X side as well.

For X bugs (ubuntu-bug xorg), we'd like the regular apport hook (from xdiagnose) to be run.

Martin Pitt (pitti) wrote :

This does not actually affect Quantal. We only want to accept this PPA for Precise for the time being.

Changed in apport (Ubuntu):
assignee: Martin Pitt (pitti) → nobody
status: Incomplete → Invalid
Changed in apport (Ubuntu Precise):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Martin Pitt (pitti)
status: In Progress → Fix Committed
Clint Byrum (clint-fewbar) wrote :

Hi! This bug needs a test case and regression potential before we can accept it into precise-proposed. Thanks!

Martin Pitt (pitti) on 2012-06-01
description: updated
Martin Pitt (pitti) on 2012-06-01
description: updated

Hello Joseph, or anyone else affected,

Accepted apport into precise-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Joseph Salisbury (jsalisbury) wrote :

I just updated to the latest packages in precise -proposed, but I still see the same issue. When running:
ubuntu-bug linux

I get the message:

*** Problem in linux-image-3.4.0-4-generic

The problem cannot be reported:

This is not an official Ubuntu package. Please remove any third party package and try again.

When running:
ubuntu-bug linux-image-generic-lts-quantal

I get the message:
*** Problem in linux-image-generic-lts-quantal

The problem cannot be reported:

This is not an official Ubuntu package. Please remove any third party package and try again.

Some version info:
$ dpkg -l | grep linux-image-generic-lts-quantal
ii linux-image-generic-lts-quantal 3.4.0.4.4 Generic Linux kernel image

$ dpkg -l | grep linux-image-3.4.0-4-generic
ii linux-image-3.4.0-4-generic 3.4.0-4.9~precise1 Linux kernel image for version 3.4.0 on 64 bit x86 SMP

$ dpkg -l | grep apport
ii apport 2.0.1-0ubuntu9 automatically generate crash reports for debugging

Martin Pitt (pitti) wrote :

Joseph, thanks for testing.

Can you confirm that you actually have a file /etc/apport/native-origins.d/lts-q-backports ?

Can you please copy&paste the output of this command:

   python -c 'import apt; print apt.Cache()["linux-image-generic-lts-quantal"].candidate.origins'

Thanks!

Joseph Salisbury (jsalisbury) wrote :

Hi Martin,

I do not have that file. Output from requested command:

jsalisbury@intel:~$ ls -l /etc/apport/native-origins.d/lts-q-backports
ls: cannot access /etc/apport/native-origins.d/lts-q-backports: No such file or directory

jsalisbury@intel:~$ python -c 'import apt; print apt.Cache()["linux-image-generic-lts-quantal"].candidate.origins'
[<Origin component:'main' archive:'precise' origin:'LP-PPA-ubuntu-x-swat-q-lts-backport' label:'Q-series LTS Backport' site:'ppa.launchpad.net' isTrusted:True>, <Origin component:'' archive:'now' origin:'' label:'' site:'' isTrusted:False>]

Martin Pitt (pitti) wrote :

Argh, I still had the local file when I tested this. The -proposed .deb indeed does not ship that file. I uploaded a followup fix to the -proposed queue, this now needs review from the SRU team:

apport (2.0.1-0ubuntu10) precise-proposed; urgency=low

  * debian/apport.install: Actually ship the native-origins.d directory, so
    that the previous bug fix for LP: #1004101 actually works.

 -- Martin Pitt <email address hidden> Tue, 12 Jun 2012 09:52:27 +0200

tags: added: verification-failed
removed: verification-needed
Brian Murray (brian-murray) wrote :

Hello Joseph, or anyone else affected,

Accepted apport into precise-proposed. The package will build now and be available in a few hours. 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 change the bug tag from verification-needed to verification-done. If it does not, 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!

tags: removed: verification-failed
tags: added: verification-needed
Joseph Salisbury (jsalisbury) wrote :

I updated to the latest apport package from -proposed. I am not able to open a bug. I opened the following two bugs:

Opened with 'ubuntu-bug linux-image-generic-lts-quantal':
http://pad.lv/1015670

Opened with 'ubuntu-bug linux':
http://pad.lv/1015673

As noted in those bugs, there may be a couple of other things to address. First, neither the quantal tag nor the qa-kernel-lts-testing were added to either bugs. I'm not sure if this is wanted or not.

Second, Launchpad could not find the package names sent by apport. The first bug sent 'linux-meta-lts-quantal' and the second bug send 'linux-lts-quantal'. I had to manually change the package to 'linux' for both bugs to be accepted by Launchpad.

Joseph Salisbury [2012-06-20 16:30 -0000]:
> As noted in those bugs, there may be a couple of other things to
> address. First, neither the quantal tag nor the qa-kernel-lts-testing
> were added to either bugs. I'm not sure if this is wanted or not.

This would need to go into the source_linux.py package hook. I did not
do that as it was not requested in this bug, but it should not be hard
to do.

> Second, Launchpad could not find the package names sent by apport. The
> first bug sent 'linux-meta-lts-quantal' and the second bug send 'linux-
> lts-quantal'. I had to manually change the package to 'linux' for both
> bugs to be accepted by Launchpad.

That will be the case until we actually upload linux-lts-quantal to
Ubuntu (precise-proposed). I guess that will happen at some point?
This could be fixed in the apport hook again, by forcing the source
paackage name to "linux". But then it would be harder to tell them
apart from the bug reports from the actual linux, you would need to
search by positive/negative tags.

Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

Joseph Salisbury (jsalisbury) wrote :

@Martin,

I also opened bug 1018464 to request the new tag.

Martin Pitt (pitti) wrote :

Thanks Joseph; I mark it as a duplicate, as it seems the two really go together. I still need the answer to my questions in comment 14: if we are going to have linux-lts-quantal actually _in_ precise, then we do not need the tag nor this additional magic; if we are only going to deliver it via a PPA, then the linux apport hook needs to change the source package to just "linux" in order to be reportable, and add the tag instead. I guess the latter is what you need.

However, please note that delivering kernels from a PPA is very much not going to scale to millions of users, so at some point this has to land in precise-updates.

Martin Pitt (pitti) on 2012-06-28
tags: added: verification-failed
removed: verification-needed
Martin Pitt (pitti) on 2012-06-28
description: updated
description: updated
Martin Pitt (pitti) wrote :

I implemented the tag and changing of the source package in http://bazaar.launchpad.net/~ubuntu-core-dev/ubuntu/precise/apport/ubuntu/revision/1968

Martin Pitt (pitti) wrote :

I uploaded 2.0.1-0ubuntu11 to the precise-proposed unapproved queue now which fixes the remaining issues with this, as per the previous comments.

Hi Martin,

To address your inquiries in comment #14 and #16, we do indeed eventually plan and intend for the lts quantal kernel packages to get uploaded to precise-proposed/precise-updates. We are only providing them via the PPA initially to provide access to any early adopters willing to test and give feedback. As such, it would be nice if bug reporting for these early adopters "just worked" (ie no manually selecting of the linux package or manually adding tags etc.). I am happy to get in touch with you when we do start uploading to precise-proposed in the event you would like to revert this last apport patch. Thanks.

Martin Pitt (pitti) wrote :

Hello Leann,

Leann Ogasawara [2012-06-28 16:02 -0000]:
> We are only providing them via the PPA initially to provide access
> to any early adopters willing to test and give feedback. As such,
> it would be nice if bug reporting for these early adopters "just
> worked" (ie no manually selecting of the linux package or manually
> adding tags etc.).

Thanks for confirming. So the new uploaded apport should provide that.

> I am happy to get in touch with you when we do start uploading to
> precise- proposed in the event you would like to revert this last
> apport patch.

OK, thanks. That would need to happen if you do not want to get bug
reports from the PPA any more, but at that time it might be harmless
to leave it enabled.

Martin

Hello Joseph, or anyone else affected,

Accepted apport into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/apport/2.0.1-0ubuntu11 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 change the bug tag from verification-needed to verification-done. If it does not, 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!

tags: removed: verification-failed
tags: added: verification-needed
Maarten Lankhorst (mlankhorst) wrote :

There are also some other packages in that ppa for the renamed xorg stack, but those may not report directly, maybe a similar hook is needed if xserver-xorg-core-lts-quantal is installed for all the Xorg bugs?

Maarten Lankhorst [2012-07-04 9:19 -0000]:
> There are also some other packages in that ppa for the renamed xorg
> stack, but those may not report directly, maybe a similar hook is needed
> if xserver-xorg-core-lts-quantal is installed for all the Xorg bugs?

Right, for now this only covers the kernel package from the PPA.

Stéphane Graber (stgraber) wrote :

Now working with all 3 packages.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.0.1-0ubuntu11

---------------
apport (2.0.1-0ubuntu11) precise-proposed; urgency=low

  * data/package-hooks/source_linux.py: If we report against an -lts-quantal
    source package, move the source to "linux" and add a qa-kernel-lts-testing
    tag, as per kernel team request in LP: #1004101 . Add source package hook
    symlinks for source_linux-{,meta-}lts-quantal.py to source_linux.py.
  * data/apport: apport: Also treat a binary as modified if the /proc/pid/exe
    symlink does not point to an existing file any more. Backported from trunk
    r2406. (LP: #984944)

apport (2.0.1-0ubuntu10) precise-proposed; urgency=low

  * debian/apport.install: Actually ship the native-origins.d directory, so
    that the previous bug fix for LP: #1004101 actually works.

apport (2.0.1-0ubuntu9) precise-proposed; urgency=low

  [ Martin Pitt ]
  * data/apport: Ignore a crash if the executable was modified after the
    process started. This often happens if the package is upgraded and a
    long-running process is not stopped before. Patch cherry-picked from trunk
    r2296. (LP: #984944)
  * Add etc/apport/native-origins.d/lts-q-backports: Accept
    ppa:ubuntu-x-swat/q-lts-backport as official Ubuntu package repository, so
    that users can report bugs and crashes against the backported kernel and
    X.org stack. (LP: #1004101)
  * data/general-hooks/ubuntu.py: Do not assume that all reports have a
    ProblemType field. This will not be the case for updating a bug with
    "apport-collect". (LP: #1004029)
  * report.py: Do not change the SourcePackage: field if the binary package is
    not installed and does not exist. This fixes source package hooks to
    actually work in some cases where source and binary package names overlap.
    Patch cherry-picked from trunk r2332. (part of LP: #993810)
  * apport-gtk, apport-kde: Avoid collecting information twice in "bug update"
    mode. This caused a crash in cases where the source package in a bug
    report does not correspond to an installed binary package. Patch
    cherry-picked from trunk r2334. (LP: #993810)

  [ Brian Murray ]
  * data/general-hooks/ubuntu.py: block reporting of package install failures
    with error regarding 'not a debian format archive'. (LP: #1002535)
 -- Martin Pitt <email address hidden> Thu, 28 Jun 2012 09:01:41 +0200

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

Duplicates of this bug

Other bug subscribers