[Bug 1903984] Re: [UBUNTU 20.04] Cannot run zcryptstats in the Hosting Appliance
Brian Murray
1903984 at bugs.launchpad.net
Tue Jan 26 19:11:23 UTC 2021
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.2 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-focal
--
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1903984
Title:
[UBUNTU 20.04] Cannot run zcryptstats in the Hosting Appliance
Status in Ubuntu on IBM z Systems:
In Progress
Status in s390-tools package in Ubuntu:
Fix Committed
Status in s390-tools source package in Focal:
Fix Committed
Status in s390-tools source package in Groovy:
Fix Committed
Status in s390-tools source package in Hirsute:
Fix Committed
Bug description:
SRU Justification:
==================
[Impact]
* If multiple s390x crypto domains are available,
the output of all domains does no longer fit into the output buffer of one CHSC call.
* Thus, the response contains a partial-response-snippet that
indicates that there is more data to be retrieved.
* The remaining data is then retrieved in a subsequent CHSC call,
but there is an error in zcryptstats in populating the request with the next domain number to obtain data for.
* This results in the fact that it retrieves the data for domains 1 to n over and over again,
and always gets the partial-response snippet, hence this loops indefinitely.
[Test Case]
* An Ubuntu Server 20.04 system (or newer) is needed on z/VM or LPAR
with two or more crypto domains accessible.
* Now call 'zcryptstats --all -V' and verify if the command completes
successfully (within seconds) or hangs (loops).
[Where problems could occur]
* The patch fixes the code that passes the correct next-domain to the
subsequent CHSC call of a partial response.
* In case done wrong even no data at all from any of the domains is
retrieved,
* or the tool may even try to retrieve data from a domain that has an
invalid index, which will lead to an error (the rc is captured).
* But the code changes are marginal and pretty straight forward, and
the cases where scdmd_area.request.first_drid is handled are now
enclosed by proper 'if/else' statement.
* This patch was already upstream accepted and a patched s390-tools package was build and shared in a PPA for further testing.
__________
---Problem Description---
I have had trouble collecting data via the zcryptstats (https://github.com/ibm-s390-tools/s390-tools/blob/master/zconf/zcrypt/zcryptstats.c) tool for our Hosting Appliance - VPC environment. Basically, the tool reports data for only the last two domain IDs. Further, it hangs if I collect data for a complete crypto card, and then I have to kill the ssh session to get back.
strace attached, ltrace not available and can't be installed due to no
Internet access.
===================
Addl. Information:
This seems to be a problem with the handling of partial responses of
the SCDMD CHSC command.
When many domains are available, then the output of all domains does
not fit into the output buffer of one CHSC call. Thus, the response
contains a partial-response-bit that indicates that there is more data
to be retrieved. This is done in a subsequent CHSC call, but there is
an error in zcryptstats with populating the request with the next
domain number to obtain data for. This results in the fact that it
retrieves the data for domains 1 to n over and over again, and always
gets the partial-response bit set. So this loops forever.
===================
The fix for this in now upstream:
https://github.com/ibm-s390-tools/s390-tools/commit/cf2311f1f1de17435b49ba8c8697be91705ba031
This need to be integrated in all Ubuntu distros, from 20.04 on. F/G/H
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/1903984/+subscriptions
More information about the Ubuntu-sponsors
mailing list