[UBUNTU 20.04] lscpumf display raw event number incorrectly

Bug #1893027 reported by bugproxy
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu on IBM z Systems
Fix Released
High
Skipper Bug Screeners
s390-tools (Ubuntu)
Fix Released
Undecided
Canonical Foundations Team
Focal
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
 * lscpumf -c displays the raw counter number incorrectly
 * It is always displayed as rXXX (XXX being hex)
 * If PMU measurement facility device driver has been registered with a different type than PERF_TYPE_RAW(4) this is incorrect
 * It should be displayed as <type>:DDD (DDD being decimal)
 * Backported the fix to the legacy lscpumc perl tool. Newer version have converted this tool to C.

[Test Case]
 * run lscpumf -c on IBM Z / s390x
 * verify output is 'rXXX' (XXX being hex) if type = PERF_TYPE_RAW(4)
 * verify output is '<type>:DDD' (DDD being decimal) if type != PERF_TYPE_RAW(4)

To find out with PMU type number has been assigned to
the PMU Measurement facility device driver, type command
cat /sys/devices/cpum_cf/type (for counters)
cat /sys/devices/cpum_cf/type (for sampling)

[Regression Potential]
 * regressions in lscpumf could break the visualization of CPU-measurement facilities on IBM Z
 * the package is only available on s390x and thus could only affect IBM Z machines

[Other Info]
 * Needs to be tested/verified by IBM internally
 * Patch was provided by IBM
 * Related to LP: #1888231 and LP: #1892350
 * This patch is caused by upstream kernel commits: commit 6a82e23f45fe ("s390/cpumf: Adjust registration of s390 PMU device drivers") commit 66d258c5b048 ("perf/core: Optimize perf_init_event()")
 * Also fix the rename of counter CCERROR to CCFINISH caused by upstream kernel commit: commit 3d3af181d370 ("s390/cpum_cf,perf: change DFLT_CCERROR counter name")

=== Original Description ===
Fix wrong output of lscpumf when device cpum_cf has different type than 4

Please apply to ubuntu 20.04 (s390-tools version 2.12)

Revision history for this message
bugproxy (bugproxy) wrote : Fix wrong output of lscpumf when device cpum_cf has different type than 4

Default Comment by Bridge

tags: added: architecture-s39064 bugnameltc-187850 severity-high targetmilestone-inin20041
Changed in ubuntu:
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
affects: ubuntu → linux (Ubuntu)
affects: linux (Ubuntu) → s390-tools (Ubuntu)
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2020-08-26 06:33 EDT-------
Due to the fact, that with 20.10 this is part is moved from perl to c, only 20.04 need that fix.

Revision history for this message
Frank Heimes (fheimes) wrote :

So SRU to s390-tools 2.12+ in Focal only.

Changed in ubuntu-z-systems:
importance: Undecided → High
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
Changed in s390-tools (Ubuntu):
assignee: Skipper Bug Screeners (skipper-screen-team) → Canonical Foundations Team (canonical-foundations)
Changed in ubuntu-z-systems:
status: New → Triaged
tags: added: id-5f468835fed50753c1b971f7
Lukas Märdian (slyon)
description: updated
Frank Heimes (fheimes)
Changed in s390-tools (Ubuntu):
status: New → In Progress
Changed in ubuntu-z-systems:
status: Triaged → In Progress
Changed in s390-tools (Ubuntu Focal):
status: New → In Progress
Changed in s390-tools (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello bugproxy, or anyone else affected,

Accepted s390-tools into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/s390-tools/2.12.0-0ubuntu3.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, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. 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 s390-tools (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-focal
Changed in ubuntu-z-systems:
status: In Progress → Fix Committed
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2020-10-12 10:47 EDT-------
I just downloaded the repository and installed it on a z15.
Verified ok

Revision history for this message
Andrew Cloke (andrew-cloke) wrote :

Many thanks for the verification. Updating verification tags.

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
tags: added: fr-589
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package s390-tools - 2.12.0-0ubuntu3.1

---------------
s390-tools (2.12.0-0ubuntu3.1) focal; urgency=medium

  * debian/patches/0082-*.patch .. 0111-*.patch (LP: #1892350)
    - Cherrypick patches from upstream, to make zipl boot loader check for
      secure IPL feature before looking up data
    - Cherrypick 0111-*/fd81728 ("zipl: fix incorrect setup of stage3 flags")
      additionally, to fix bug in 0089-*/6c04f97 ("zipl: consolidate
      stage3_params structs and stage3 flags")
  * d/p/0110-zipl-stage3-correctly-handle-diag308-response-code.patch
    - Cherrypick 943c5dc ("zipl/stage3: correctly handle diag308 response
      code"), to fix KVM IPL without bootindex= specified (LP: #1888231)
  * d/p/0112-cpumf-lscpumf.pl-displays-raw-event-number-incorrect.patch
    - Only needed for perl lscpumf in Focal (LP: #1893027)

 -- Lukas Märdian <email address hidden> Thu, 01 Oct 2020 12:41:35 +0200

Changed in s390-tools (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for s390-tools has completed successfully and the package is now being 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.

Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: Fix Committed → Fix Released
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2020-10-26 06:20 EDT-------
IBM Bugzilla status->closed, Fix Released with all requested distros

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.