/proc/cpuinfo should be collected

Bug #1673557 reported by Brian Murray on 2017-03-16
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Medium
Brian Murray
Trusty
Undecided
Unassigned
Xenial
Undecided
Unassigned
Yakkety
Undecided
Brian Murray
whoopsie (Ubuntu)
Medium
Unassigned
Trusty
Undecided
Unassigned
Xenial
Undecided
Unassigned
Yakkety
Undecided
Unassigned

Bug Description

[Impact]
While some apport reports contain ProcCpuinfo not all of them do and it would be useful to determine how many users can only run the i386 version of Ubuntu. Additionally, the existing implementation gathers information about every processor which is quite lengthy - something smaller would be better.

[Test Case]
1. Run ubuntu-bug 2vcard
2. Observe there is no report key ProcCpuinfoMinimal

With the version of apport from -proposed you will have ProcCpuinfoMinimal which will contain information about your processor.

To verify the whoopsie change you'll want to do the following:
1) sudo service whoopsie stop
2) sudo CRASH_DB_URL=https://daisy.staging.ubuntu.com whoopsie -f
3) kill -11 a process (but not the whoopsie one!)
4) confirm sending the report
5) Find the OOPS ID in the whoopsie output
6) Go to http://errors.staging.ubuntu.com/oops/$OOPSID
7) Verify ProcCpuinfoMinimal appears in the OOPS

[Regression Potential]
This exists in Zesty, and Artful and there have been no issues collecting the information. Even if there are errors in the general ubuntu hook, which was modified for this SRU, apport will continue collecting information for the report and just add a traceback to the report about the hook error.

The general Ubuntu hook, possibly add_kernel_info() could be used, should be modified such that the contents of /proc/cpuinfo are gathered.

Changed in apport (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
milestone: none → ubuntu-17.03
assignee: nobody → Brian Murray (brian-murray)
Brian Murray (brian-murray) wrote :

11:22 < infinity> bdmurray: lscpu might be more pleasant for this.
                  Need to confirm it DTRT on all platforms.

Brian Murray (brian-murray) wrote :

Digging into this further the attach_hardware() function from hookutils.py grabs /proc/cpuinfo and attach_hardware is used by a lot of packages, its just that whoopsie uses a whitelist for attachments which are greater than 1k which cpuinfo is. So whoopsie would need to be modified to allow ProcCpuinfo through.

Changed in whoopsie (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Adam Conrad (adconrad) wrote :

Ugly collapsing code:

sed -n '/^processor/,/^$/{/^$/q; p}' /proc/cpuinfo ; foo=$(sed '/^processor/,/^$/d' /proc/cpuinfo); if [ -n "$foo" ]; then echo -e "\n$foo"; fi

Prettying that into one line of sed or awk shouldn't technically be hard, but not my top priority today. :P

Brian Murray (brian-murray) wrote :

Actually given that we already have /proc/cpuinfo when the report is being created we could just collapse that down in python with something like:

short_list = []
for item in reversed(report['ProcCpuinfo'].split('\n')):
    short_list.append(item)
    if item.startswith('processor\t:'):
        break

short_list = reversed(short_list)

report['ShortProcCpuinfo'] = '\n'.join(short_list)

This still ends up catching Hardware, Revision, and Serial from arm and will display the greatest processor number instead of 0 which might be nice too.

Brian Murray (brian-murray) wrote :

Here's part of a report made using the above python code to gather ProcCpuinfo.

PackageArchitecture: amd64
ProcCpuinfoMinimal:
 processor : 3
 vendor_id : GenuineIntel
 cpu family : 6
 model : 58
 model name : Intel(R) Core(TM) i5-3570 CPU @ 3.40GHz
 stepping : 9
 microcode : 0x17
 cpu MHz : 3677.661
 cache size : 6144 KB
 physical id : 0
 siblings : 4
 core id : 3
 cpu cores : 4
 apicid : 6
 initial apicid : 6
 fpu : yes
 fpu_exception : yes
 cpuid level : 13
 wp : yes
 flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts
 bugs :
 bogomips : 6819.49
 clflush size : 64
 cache_alignment : 64
 address sizes : 36 bits physical, 48 bits virtual
 power management:
ProcVersionSignature: Ubuntu 4.8.0-41.44-generic 4.8.17

Brian Murray (brian-murray) wrote :

I uploaded it to errors.u.c too to confirm that whoopsie let ProcCpuinfoMinimal through and it did.

https://errors.ubuntu.com/oops/44d8b014-14a8-11e7-9db8-fa163ebeb28a

Changed in apport (Ubuntu):
status: Triaged → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package whoopsie - 0.2.55

---------------
whoopsie (0.2.55) zesty; urgency=medium

  * src/whoopsie.c: Add ProcCpuinfoMinimal which can be larger than 1KB to the
    list of accepted fields. (LP: #1673557)

 -- Brian Murray <email address hidden> Wed, 29 Mar 2017 12:41:31 -0700

Changed in whoopsie (Ubuntu):
status: Triaged → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.20.4-0ubuntu3

---------------
apport (2.20.4-0ubuntu3) zesty; urgency=medium

  * data/general/ubuntu.py: Collect a minimal version of /proc/cpuinfo in
    every report. (LP: #1673557)
  * debian/control: remove build dep on libglib2.0-0-dbg since the gdb helpers
    moved to libglib2.0-dev.

 -- Brian Murray <email address hidden> Wed, 29 Mar 2017 11:16:33 -0700

Changed in apport (Ubuntu):
status: In Progress → Fix Released
Changed in apport (Ubuntu Yakkety):
status: New → In Progress
assignee: nobody → Brian Murray (brian-murray)
description: updated
description: updated

Hello Brian, or anyone else affected,

Accepted apport into yakkety-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apport/2.20.3-0ubuntu8.3 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 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 Yakkety):
status: In Progress → Fix Committed
tags: added: verification-needed
Changed in whoopsie (Ubuntu Yakkety):
status: New → Fix Committed
Łukasz Zemczak (sil2100) wrote :

Hello Brian, or anyone else affected,

Accepted whoopsie into yakkety-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/whoopsie/0.2.54.1 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 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 whoopsie (Ubuntu Xenial):
status: New → Fix Committed
Łukasz Zemczak (sil2100) wrote :

Hello Brian, or anyone else affected,

Accepted whoopsie into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/whoopsie/0.2.52.3 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 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!

Łukasz Zemczak (sil2100) wrote :

Hello Brian, or anyone else affected,

Accepted apport into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apport/2.20.1-0ubuntu2.6 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 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 Xenial):
status: New → Fix Committed
Łukasz Zemczak (sil2100) wrote :

Hello Brian, or anyone else affected,

Accepted whoopsie into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/whoopsie/0.2.24.6ubuntu4 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 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 whoopsie (Ubuntu Trusty):
status: New → Fix Committed
Changed in apport (Ubuntu Trusty):
status: New → Fix Committed
Łukasz Zemczak (sil2100) 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.24 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 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!

Brian Murray (brian-murray) wrote :

Verifying the apport part for yakkety:

 $ apt-cache policy apport
apport:
  Installed: 2.20.3-0ubuntu8.3
  Candidate: 2.20.3-0ubuntu8.3

 $ grep -A4 ProcCpuinfoMinimal /tmp/test.crash
ProcCpuinfoMinimal:
 processor : 3
 vendor_id : GenuineIntel
 cpu family : 6
 model : 58
 ...

Brian Murray (brian-murray) wrote :

The whoopsie part of yakkety can be confirmed with this OOPS:

https://errors.staging.ubuntu.com/oops/8ff45a12-39ba-11e7-aa36-fa163eaf9b83

tags: added: verification-done-yakkety
Brian Murray (brian-murray) wrote :

Verifying the apport part for xenial:

bdmurray@clean-xenial-amd64:~$ grep -A4 ProcCpuinfoMinimal /tmp/crash.txt
ProcCpuinfoMinimal:
 processor : 1
 vendor_id : GenuineIntel
 cpu family : 6
 model : 58
bdmurray@clean-xenial-amd64:~$ apt-cache policy apport
apport:
  Installed: 2.20.1-0ubuntu2.6
  Candidate: 2.20.1-0ubuntu2.6

Brian Murray (brian-murray) wrote :

The whoopsie part of the xenial SRU can be confirmed with this OOPS:

https://errors.staging.ubuntu.com/oops/0ad9fe42-39bd-11e7-8b26-fa163eaf9b83

tags: added: verification-done-xenial
Brian Murray (brian-murray) wrote :

Verifying the apport part for trusty:

bdmurray@upgrade-trusty-amd64:~$ grep -A4 ProcCpuinfoMinimal /tmp/test.crash
ProcCpuinfoMinimal:
 processor : 1
 vendor_id : GenuineIntel
 cpu family : 6
 model : 58
bdmurray@upgrade-trusty-amd64:~$ apt-cache policy apport
apport:
  Installed: 2.14.1-0ubuntu3.24
  Candidate: 2.14.1-0ubuntu3.24

Brian Murray (brian-murray) wrote :

The whoopsie part of the trusty SRU can be confirmed with OOPS:

https://errors.staging.ubuntu.com/oops/16658f2c-39bf-11e7-aa36-fa163eaf9b83

tags: added: verification-done
removed: verification-needed

The verification of the Stable Release Update for apport has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.20.1-0ubuntu2.6

---------------
apport (2.20.1-0ubuntu2.6) xenial; urgency=medium

  * data/general/ubuntu.py: Collect a minimal version of /proc/cpuinfo in
    every report. (LP: #1673557)
  * data/general/ubuntu-gnome.py: The GNOME3 PPAs are no longer supported for
    14.04 or 16.04 so set an UnreportableReason in those reports.
    (LP: #1689093)
  * test_backend_apt_dpkg.py: Move tests from Ubuntu 15.10 "wily" (which is
    EoL now) to 16.04 LTS "xenial". (LP: #1690437)

 -- Brian Murray <email address hidden> Fri, 12 May 2017 11:39:04 -0700

Changed in apport (Ubuntu Xenial):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

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

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

  * data/general/ubuntu.py: Collect a minimal version of /proc/cpuinfo in
    every report. (LP: #1673557)
  * data/general/ubuntu-gnome.py: The GNOME3 PPAs are no longer supported for
    14.04 or 16.04 so set an UnreportableReason in those reports.
    (LP: #1689093)

 -- Brian Murray <email address hidden> Fri, 12 May 2017 12:29:08 -0700

Changed in apport (Ubuntu Trusty):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package whoopsie - 0.2.54.1

---------------
whoopsie (0.2.54.1) yakkety; urgency=medium

  * src/whoopsie.c: Add ProcCpuinfoMinimal which can be larger than 1KB to the
    list of accepted fields. (LP: #1673557)

 -- Brian Murray <email address hidden> Wed, 29 Mar 2017 12:03:30 -0700

Changed in whoopsie (Ubuntu Yakkety):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package whoopsie - 0.2.52.3

---------------
whoopsie (0.2.52.3) xenial-proposed; urgency=medium

  * src/whoopsie.c: Add ProcCpuinfoMinimal which can be larger than 1KB to the
    list of accepted fields. (LP: #1673557)

 -- Brian Murray <email address hidden> Fri, 12 May 2017 10:21:20 -0700

Changed in whoopsie (Ubuntu Xenial):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package whoopsie - 0.2.24.6ubuntu4

---------------
whoopsie (0.2.24.6ubuntu4) trusty-proposed; urgency=medium

  * src/whoopsie.c: Add ProcCpuinfoMinimal which can be larger than 1KB to the
    list of accepted fields. (LP: #1673557)

 -- Brian Murray <email address hidden> Fri, 12 May 2017 10:25:00 -0700

Changed in whoopsie (Ubuntu Trusty):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.20.3-0ubuntu8.3

---------------
apport (2.20.3-0ubuntu8.3) yakkety; urgency=medium

  * Resolve autopkgtest failures in test_backend_apt_dpkg.py due to issues
    with apt key ring. Thanks to Dimitri John Ledkov for the patch.
    (LP: #1651623)
  * Disable report.test_add_gdb_info_abort_glib test case for now, as the
    glib assertion message is broken under current Ubuntu (LP: #1689344)
  * data/general/ubuntu.py: Collect a minimal version of /proc/cpuinfo in
    every report. (LP: #1673557)

 -- Brian Murray <email address hidden> Wed, 10 May 2017 18:10:32 -0700

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

Other bug subscribers