chcpumf installed with s390-tools version 2.14.0 no longer provides version or help information

Bug #1898935 reported by John George
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu on IBM z Systems
Fix Released
Medium
bugproxy
s390-tools (Ubuntu)
Fix Released
Undecided
Frank Heimes
Groovy
Fix Released
Undecided
Frank Heimes
Hirsute
Fix Released
Undecided
Frank Heimes

Bug Description

SRU Bug Justification:
======================

[Impact]

 * The chcpumf version 2.14.0 of groovy (used to manage CPU-measurement
   facilities) has a regression and no longer provides version or help
   information in case the sampling facility is not installed.

 * Instead of displaying proper help information using '-h'
   or proper version information using '-v',the message
   "No CPU-measurement sampling facility detected" is displayed.

[Test Case]

 * Have an Ubuntu Server 20.10 system installed on z/VM or LPAR.

 * But make sure that the sampling facility is not installed.

 * The s390-tools package is installed by default,
   so no need to install anything.

 * Just execute 'chcpumf -h' and 'chcpumf -v'.

 * If proper version is help information is displayed,
   the problem is fixed.

 * If the message "No CPU-measurement sampling facility detected" is
   displayed the problem still persists.

[Where problems could occur]

 * The changes are largely in the area of the parameter handling
   and read_sfb of the chcpumf tool.

 * A problem could be that the argument handling gets totally broken,
   means that the problem is no longer limited to version and help
   information,

 * or in worst-case it may break things even in case a sampling
   facility is installed.

 * At the end it's an optional s390x only tool
   and only needed for performance measurement.

[Others]

 * The fix is upstream in 2.15, and since hirsute has already 2.15.1 hirsute is not affected.
__________

With s390-tools version 2.14.0 installed with Ubuntu 20.10 the -v and -h options to chcpumf no longer report the version or display help information. Rather the message "No CPU-measurement sampling facility detected" is displayed. This behavior diverges from previous versions and is not consistent with other binaries provided by the s390-tools package.

ubuntu@s5lp1-gen01:~$ chcpumf -v
No CPU-measurement sampling facility detected
ubuntu@s5lp1-gen01:~$ chcpumf -h
No CPU-measurement sampling facility detected
ubuntu@s5lp1-gen01:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu Groovy Gorilla (development branch)
Release: 20.10
Codename: groovy
ubuntu@s5lp1-gen01:~$ which chcpumf
/usr/sbin/chcpumf
ubuntu@s5lp1-gen01:~$ dpkg -S /usr/sbin/chcpumf
dpkg-query: no path found matching pattern /usr/sbin/chcpumf
ubuntu@s5lp1-gen01:~$ dpkg -S /sbin/chcpumf
s390-tools: /sbin/chcpumf
ubuntu@s5lp1-gen01:~$ apt-cache policy s390-tools
s390-tools:
  Installed: 2.14.0-1ubuntu1
  Candidate: 2.14.0-1ubuntu1
  Version table:
 *** 2.14.0-1ubuntu1 500
        500 http://us.ports.ubuntu.com/ubuntu-ports groovy/main s390x Packages
        100 /var/lib/dpkg/status

Here's a an example of the behavior with version 2.12 from 20.04

ubuntu@s5lp1-gen01:~$ chcpumf -v
CPU-measurement facility utilities, version 2.12.0-build-20200320
Copyright IBM Corp. 2014, 2017

ubuntu@s5lp1-gen01:~$ which chcpumf
/usr/sbin/chcpumf
ubuntu@s5lp1-gen01:~$ dpkg -S /usr/sbin/chcpumf
s390-tools: /usr/sbin/chcpumf
ubuntu@s5lp1-gen01:~$ apt-cache policy s390-tools
s390-tools:
  Installed: 2.12.0-0ubuntu3
  Candidate: 2.12.0-0ubuntu3
  Version table:
 *** 2.12.0-0ubuntu3 500
        500 http://us.ports.ubuntu.com/ubuntu-ports focal/main s390x Packages
        100 /var/lib/dpkg/status

Related branches

John George (jog)
tags: added: s390x
Frank Heimes (fheimes)
tags: added: reverse-proxy-bugzilla
Changed in ubuntu-z-systems:
importance: Undecided → Medium
assignee: nobody → bugproxy (bugproxy)
bugproxy (bugproxy)
tags: added: architecture-s39064 bugnameltc-188540 severity-high targetmilestone-inin2010
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2020-10-09 02:49 EDT-------
I found the root cause. When no CPU-measurement sampling facility is detected,
this error is printed first:

No CPU-measurement sampling facility detected

regardless of any command line options specified. Then program then exits.
This happened during the rewrite from perl to C.

When the CPU-measurement sampling facility is available and detected,
the command line options -h and -v are properly processed.

This error shows up only when no CPU-measurement sampling
facility is detected. Without any installed CPU-measurement sampling
facility, you can not change the CPU-measurement sampling facilities
buffer sizes (because it is not there!).

So I will change the code to honour previous behavior and print help
string and version number, even if the program can not be used properly.

Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: New → Triaged
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2020-10-15 10:25 EDT-------
Upstream commit availabe with s390-tools 2.15
https://github.com/ibm-s390-tools/s390-tools

https://github.com/ibm-s390-tools/s390-tools/commit/ea10995f4d62e6f6adbbc9ec16dd84bb6386618b

Frank Heimes (fheimes)
Changed in s390-tools:
assignee: nobody → Canonical Foundations Team (canonical-foundations)
Steve Langasek (vorlon)
tags: added: fr-829
Frank Heimes (fheimes)
summary: - chcpumf installed with s390-tools version 2.14.0 not longer provides
- version of help information
+ chcpumf installed with s390-tools version 2.14.0 no longer provides
+ version or help information
Revision history for this message
Frank Heimes (fheimes) wrote :

A patched test build was created and is shared here:
https://launchpad.net/~fheimes/+archive/ubuntu/lp1898935

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

MP is open

Changed in s390-tools:
assignee: Canonical Foundations Team (canonical-foundations) → Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: Triaged → In Progress
Changed in s390-tools:
status: New → In Progress
Revision history for this message
Frank Heimes (fheimes) wrote :
Frank Heimes (fheimes)
description: updated
description: updated
Frank Heimes (fheimes)
no longer affects: s390-tools
Changed in s390-tools (Ubuntu Hirsute):
status: New → Fix Released
Changed in s390-tools (Ubuntu Groovy):
status: New → Confirmed
Changed in s390-tools (Ubuntu Hirsute):
assignee: nobody → Frank Heimes (fheimes)
Changed in s390-tools (Ubuntu Groovy):
assignee: nobody → Frank Heimes (fheimes)
Lukas Märdian (slyon)
Changed in s390-tools (Ubuntu Groovy):
status: Confirmed → In Progress
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello John, or anyone else affected,

Accepted s390-tools into groovy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/s390-tools/2.14.0-1ubuntu1.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-groovy to verification-done-groovy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-groovy. 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 Groovy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-groovy
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: In Progress → Fix Committed
Revision history for this message
Frank Heimes (fheimes) wrote :

I can confirm that it works with package 2.14.0-1ubuntu1.1:
$ dpkg -l | grep s390-tools
ii s390-tools 2.14.0-1ubuntu1.1 s390x fundamental utilities for Linux on z Systems
ii s390-tools-signed 2.14.0-1ubuntu1.1 s390x Signed zipl stage3.bin

I get again proper version and help info - even if the sampling facility is not active:

$ chcpumf -v
CPU-measurement facility utilities, version 2.12.0-build-20200320
Copyright IBM Corp. 2014, 2017

$ chcpumf -h
Usage: chcpumf -h|-v
 chcpumf -m num_sdb
 chcpumf -x num_sdb

Options:
 -m num_sdb Specifies the initial size of the sampling buffer.
        A sample-data-block (SDB) consumes about 4 kilobytes.
 -x num_sdb Specifies the maximum size of the sampling buffer.
        A sample-data-block (SDB) consumes about 4 kilobytes.
 -h Displays help information, then exits.
 -v Displays version information, then exits.

For more help information, issue 'man chcpumf'.

Adjusting the tags accordingly ...

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

This bug was fixed in the package s390-tools - 2.14.0-1ubuntu1.1

---------------
s390-tools (2.14.0-1ubuntu1.1) groovy; urgency=medium

  * debian/patches/s390-tools-sru-lp1903984-groovy.patch
    zcryptstats: Fix handling of partial results with many domains
    Thanks to Ingo Franzki (LP: #1903984)
  * debian/patches/s390-tools-sru-lp1898935-groovy.patch:
    chcpumf installed with s390-tools version 2.14.0
    no longer provides version or help information
    backport, actually cherry-pick, from s390-tools v2.15.1 to v2.14
    Thanks to Thomas Richter (LP: #1898935)
  * debian/patches/s390-tools-sru-lp1908371-groovy.patch:
    zipl command isn't working correctly in combination with the -M
    (respectively --mvdump) option.
    cherry-picking 4 commits from s390-tools v2.15.1 to v2.14
    Thanks to Stefan Haberland and Sven Schnelle (LP: #1908371)

 -- Frank Heimes <email address hidden> Tue, 19 Jan 2021 19:23:32 +0100

Changed in s390-tools (Ubuntu Groovy):
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> 2021-02-11 02:44 EDT-------
IBM Bugzilla status->closed, Fix Released for all requested releases.

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.