oem kernel packages treated differently from generic kernel ones

Bug #1847967 reported by You-Sheng Yang on 2019-10-14
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OEM Priority Project
High
Yuan-Chen Cheng
apport (Ubuntu)
Status tracked in Focal
Bionic
Undecided
Brian Murray
Disco
Undecided
Unassigned
Eoan
Undecided
Brian Murray
Focal
Undecided
You-Sheng Yang

Bug Description

[SRU Justification]

[Impact]
When `apport-bug linux` was executed on systems with linux-oem, linux-oem-osp1 kernels, many details are not included as generic linux kernel does. Alsa info, dmesg, lspci, lsusb, DMI, etc. are missing.

[Fix]
Fix already merged in Focal: https://bazaar.launchpad.net/~ubuntu-core-dev/ubuntu/focal/apport/ubuntu/revision/2724 .

SRU merge proposals in:
* https://code.launchpad.net/~vicamo/ubuntu/bionic/apport/bug-1847967/+merge/376380
* https://code.launchpad.net/~vicamo/ubuntu/disco/apport/bug-1847967/+merge/376381
* https://code.launchpad.net/~vicamo/ubuntu/eoan/apport/bug-1847967/+merge/374263

[Test Case]
1. Boot with linux-oem or linux-oem-osp1 kernel and try to collect apport logs with:

  $ apport-cli --save saved.apport linux-oem-osp1

2. Make sure the report contains PCI/ALSA/DMI/Sysfs info.

[Regression Potential]
Low.

======== original bug description ========

When `apport-bug linux` was executed on systems with linux-oem, linux-oem-osp1 kernels, many details are not included as generic linux kernel does. Alsa info, dmesg, lspci, lsusb, DMI, etc. are missing.

Related branches

tags: added: oem-priority
no longer affects: apport
You-Sheng Yang (vicamo) on 2019-10-14
summary: - oem kernel packages treat differently from generic kernel ones
+ oem kernel packages treated differently from generic kernel ones
You-Sheng Yang (vicamo) on 2019-10-14
description: updated
You-Sheng Yang (vicamo) wrote :

sudo ln -s source_linux.py /usr/share/apport/package-hooks/source_linux-oem.py
sudo ln -s source_linux.py /usr/share/apport/package-hooks/source_linux-oem-osp1.py

Above commands would fix this issue. Judging from all other source_linux* symlinks are created by apport package itself (via %srcpkg/debian/apport.links), I suggest we add two more links for oem/oem-osp1 kernels, too.

Rex Tsai (chihchun) on 2019-10-15
Changed in oem-priority:
importance: Undecided → High
You-Sheng Yang (vicamo) wrote :

--- debian/apport.links 2018-05-09 23:42:20 +0000
+++ debian/apport.links 2019-10-17 06:20:03 +0000
@@ -1,4 +1,10 @@
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-meta-oem-osp1.py
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-meta-oem.py
 /usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-meta.py
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-oem-osp1.py
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-oem.py
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-signed-oem-osp1.py
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-signed-oem.py
 /usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-signed.py
 /usr/bin/apport-bug /usr/bin/ubuntu-bug
 /usr/share/man/man1/apport-bug.1.gz /usr/share/man/man1/ubuntu-bug.1.gz

Changed in apport (Ubuntu):
status: New → In Progress
You-Sheng Yang (vicamo) wrote :

Maybe the best solution is to install such links in every kernel related source packages built kernel image packages themselves. :X

You-Sheng Yang (vicamo) wrote :

So before the merge proposal[1] is accepted, you can take following steps to file a bug with all the information for kernel packages:

1. find out the source package name for the binary kernel package. It should be "linux-signed-oem[-osp1]" for signed kernel packages, and "linux-oem[-osp1]" for unsigned ones.

  $ apt show ${pkg} | grep ^Source:

2. create symlinks for apport:

  $ sudo ln -s source_linux.py /usr/share/apport/package-hooks/source_${srcpkg}.py

3. appport-bug ${pkg}

Brian Murray (brian-murray) wrote :

I've merged the the change in the linked branch to focal's branch of apport. Is this something you'd like to see SRU'ed to eoan?

You-Sheng Yang (vicamo) wrote :

Yes, it was made before Focal was out, but definitely want it to be SRU-ed to all series with linux-oem/linux-oem-osp1 kernels.

You-Sheng Yang (vicamo) on 2019-12-05
Changed in apport (Ubuntu Focal):
status: In Progress → Fix Committed
You-Sheng Yang (vicamo) wrote :
Changed in apport (Ubuntu Bionic):
status: New → In Progress
Changed in apport (Ubuntu Disco):
status: New → In Progress
Changed in apport (Ubuntu Eoan):
status: New → In Progress
You-Sheng Yang (vicamo) on 2019-12-05
description: updated
Brian Murray (brian-murray) wrote :

We have some outstanding security fixes in apport to do but we'll scheduled SRU'ing this after those are out.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.20.11-0ubuntu13

---------------
apport (2.20.11-0ubuntu13) focal; urgency=medium

  [ Brian Murray ]
  * Create additional symlinks to the source_linux.py apport package hook for
    many OEM kernels. Thanks to You-Sheng Yang for the patch. (LP: #1847967)

  [ Michael Hudson-Doyle ]
  * Fix autopkgtest failures since recent security update: (LP: #1854237)
    - Fix regression in creating report for crashing setuid process by getting
      kernel to tell us the executable path rather than reading
      /proc/[pid]/exe.
    - Fix deletion of partially written core files.
    - Fix test_get_logind_session to use new API.
    - Restore add_proc_info raising ValueError for a dead process.
    - Delete test_lock_symlink, no longer applicable now that the lock is
      created in a directory only root can write to.

 -- Michael Hudson-Doyle <email address hidden> Fri, 06 Dec 2019 08:57:09 +1300

Changed in apport (Ubuntu Focal):
status: Fix Committed → Fix Released
tags: added: id-5de96a57d56e071554100fdb
You-Sheng Yang (vicamo) wrote :

@Francis, anything I can help here?

Alex Tu (alextu) wrote :

I verified #9, it works as expected.

Alex Tu (alextu) on 2020-01-17
Changed in oem-priority:
assignee: nobody → Yuan-Chen Cheng (ycheng-twn)
Changed in apport (Ubuntu Disco):
status: In Progress → Won't Fix
Changed in apport (Ubuntu Bionic):
assignee: nobody → Brian Murray (brian-murray)
Changed in apport (Ubuntu Eoan):
assignee: nobody → Brian Murray (brian-murray)

Hello You-Sheng, or anyone else affected,

Accepted apport into eoan-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apport/2.20.11-0ubuntu8.4 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 on 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-eoan to verification-done-eoan. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-eoan. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in apport (Ubuntu Eoan):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-eoan
Changed in apport (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed-bionic
Łukasz Zemczak (sil2100) wrote :

Hello You-Sheng, or anyone else affected,

Accepted apport into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apport/2.20.9-0ubuntu7.11 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 on 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-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

All autopkgtests for the newly accepted apport (2.20.11-0ubuntu8.4) for eoan have finished running.
The following regressions have been reported in tests triggered by the package:

apport/2.20.11-0ubuntu8.4 (amd64)
ubuntu-release-upgrader/1:19.10.15.4 (armhf)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/eoan/update_excuses.html#apport

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

All autopkgtests for the newly accepted apport (2.20.9-0ubuntu7.11) for bionic have finished running.
The following regressions have been reported in tests triggered by the package:

apport/2.20.9-0ubuntu7.11 (amd64, i386)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/bionic/update_excuses.html#apport

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Brian Murray (brian-murray) wrote :

Another way to verify the fix is just to confirm that the symlinks are now created, which they are with apport version 2.20.11-0ubuntu8.4 (19.10).

Setting up apport (2.20.11-0ubuntu8.4) ...
apport-autoreport.service is a disabled or a static unit, not starting it.
Processing triggers for systemd (242-7ubuntu3.6) ...
Processing triggers for man-db (2.8.7-3) ...
Processing triggers for hicolor-icon-theme (0.17-2) .
bdmurray@clean-eoan-amd64:~$ ls -lh /usr/share/apport/package-hooks/*linux*
lrwxrwxrwx 1 root root 15 Feb 10 16:44 /usr/share/apport/package-hooks/source_linux-meta-oem-osp1.py -> source_linux.py
lrwxrwxrwx 1 root root 15 Feb 10 16:44 /usr/share/apport/package-hooks/source_linux-meta-oem.py -> source_linux.py
lrwxrwxrwx 1 root root 15 Feb 10 16:44 /usr/share/apport/package-hooks/source_linux-meta.py -> source_linux.py
-rw-r--r-- 1 root root 948 Nov 11 13:50 /usr/share/apport/package-hooks/source_linux-nexus7.py
lrwxrwxrwx 1 root root 15 Feb 10 16:44 /usr/share/apport/package-hooks/source_linux-oem-osp1.py -> source_linux.py
lrwxrwxrwx 1 root root 15 Feb 10 16:44 /usr/share/apport/package-hooks/source_linux-oem.py -> source_linux.py
-rw-r--r-- 1 root root 6.2K Nov 11 13:50 /usr/share/apport/package-hooks/source_linux.py
lrwxrwxrwx 1 root root 15 Feb 10 16:44 /usr/share/apport/package-hooks/source_linux-signed-oem-osp1.py -> source_linux.py
lrwxrwxrwx 1 root root 15 Feb 10 16:44 /usr/share/apport/package-hooks/source_linux-signed-oem.py -> source_linux.py
lrwxrwxrwx 1 root root 15 Feb 10 16:44 /usr/share/apport/package-hooks/source_linux-signed.py -> source_linux.py

Brian Murray (brian-murray) wrote :

Another way to verify the fix is just to confirm that the symlinks are now created, which they are with apport version 2.20.9-0ubuntu7.11 (18.04).

Setting up apport (2.20.9-0ubuntu7.11) ...
apport-autoreport.service is a disabled or a static unit, not starting it.
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for systemd (237-3ubuntu10.38) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
bdmurray@clean-bionic-amd64:~$ ls -lh /usr/share/apport/package-hooks/*linux*
lrwxrwxrwx 1 root root 15 Feb 10 16:46 /usr/share/apport/package-hooks/source_linux-meta-oem-osp1.py -> source_linux.py
lrwxrwxrwx 1 root root 15 Feb 10 16:46 /usr/share/apport/package-hooks/source_linux-meta-oem.py -> source_linux.py
lrwxrwxrwx 1 root root 15 Feb 10 16:46 /usr/share/apport/package-hooks/source_linux-meta.py -> source_linux.py
-rw-r--r-- 1 root root 948 Nov 11 13:57 /usr/share/apport/package-hooks/source_linux-nexus7.py
lrwxrwxrwx 1 root root 15 Feb 10 16:46 /usr/share/apport/package-hooks/source_linux-oem-osp1.py -> source_linux.py
lrwxrwxrwx 1 root root 15 Feb 10 16:46 /usr/share/apport/package-hooks/source_linux-oem.py -> source_linux.py
-rw-r--r-- 1 root root 6.2K Nov 11 13:57 /usr/share/apport/package-hooks/source_linux.py
lrwxrwxrwx 1 root root 15 Feb 10 16:46 /usr/share/apport/package-hooks/source_linux-signed-oem-osp1.py -> source_linux.py
lrwxrwxrwx 1 root root 15 Feb 10 16:46 /usr/share/apport/package-hooks/source_linux-signed-oem.py -> source_linux.py
lrwxrwxrwx 1 root root 15 Feb 10 16:46 /usr/share/apport/package-hooks/source_linux-signed.py -> source_linux.py

tags: added: verification-done verification-done-bionic verification-done-eoan
removed: verification-needed verification-needed-bionic verification-needed-eoan
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers