Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1261738
Summary: | xdrstdio_create buffers do not output encoded values on ppc | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Murphy Zhou <xzhou> | ||||
Component: | libtirpc | Assignee: | Steve Dickson <steved> | ||||
Status: | CLOSED ERRATA | QA Contact: | Zhi Li <yieli> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 7.2 | CC: | dnsands, fs-qe, michael.meseke, rjones, steved, tgummels, woodard, xzhou | ||||
Target Milestone: | rc | Keywords: | Patch | ||||
Target Release: | --- | ||||||
Hardware: | ppc64 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | libtirpc-0.2.4-0.12.el7 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | 1261596 | Environment: | |||||
Last Closed: | 2018-10-30 11:48:24 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | 1261596 | ||||||
Bug Blocks: | 910269, 1585558 | ||||||
Attachments: |
|
Comment 2
Daniel Sands
2018-02-14 23:31:13 UTC
Created attachment 1396217 [details]
Fix for STDIO
I'm not seeing this problem... ibm-p730-06-lp2$ arch ppc64 ibm-p730-06-lp2$ rpm -q libtirpc-devel libtirpc-devel-0.2.4-0.10.el7.ppc64 ibm-p730-06-lp2$ gcc -I/usr/include/tirpc reader.c -o reader-tirpc -ltirpc ibm-p730-06-lp2$ gcc -I/usr/include/tirpc writer.c -o writer-tirpc -ltirpc ibm-p730-06-lp2$ ./writer-tirpc | ./reader-tirpc 0 1 2 3 4 5 6 7 ibm-p730-06-lp2$ ./writer | hexdump 0000000 0000 0000 0000 0000 0000 0000 0000 0001 0000010 0000 0000 0000 0002 0000 0000 0000 0003 0000020 0000 0000 0000 0004 0000 0000 0000 0005 0000030 0000 0000 0000 0006 0000 0000 0000 0007 0000040 ibm-p730-06-lp2$ ./writer-tirpc | hexdump 0000000 0000 0000 0000 0000 0000 0000 0000 0001 0000010 0000 0000 0000 0002 0000 0000 0000 0003 0000020 0000 0000 0000 0004 0000 0000 0000 0005 0000030 0000 0000 0000 0006 0000 0000 0000 0007 0000040 It's strange that I can reproduce on RHEL-7.6-20180621.n.0 https://beaker.engineering.redhat.com/jobs/2561049 http://beaker-archive.host.prod.eng.bos.redhat.com/beaker-logs/2018/06/25610/2561025/5296751/74126679/TESTOUT.log Endianness makes the difference. The code as is passes on LE systems, but fails on BE systems. As explained above, it writes 4 bytes into an 8-byte temporary variable, then uses the pointer to the first 4 bytes in its write. On LE systems, the first 4 bytes have the converted value. On BE systems, the last 4 bytes have it and the first 4 are all zeroes. commit 145272c2b6d89a1c3a7de86a2cbef43880f1b61b Author: Steve Dickson <steved> Date: Wed Jul 11 11:21:39 2018 -0400 xdrstdio_create buffers do not output encoded values on ppc *** Bug 1585658 has been marked as a duplicate of this bug. *** Verified with libtirpc-0.2.4-0.12.el7.ppc64: ~~~~~ [root@xxx]# uname -m ppc64 [root@xxx]# rpm -q libtirpc libtirpc-0.2.4-0.10.el7.ppc64 [root@xxx]# ./writer | ./reader 0 1 2 3 4 5 6 7 >>>> [root@xxx]# ./writer-tirpc | ./reader-tirpc 2942232856 2942232856 2942232856 2942232856 2942232856 2942232856 2942232856 2942232856 >>>> [root@xxx]# ./writer-tirpc-header | ./reader-tirpc-header 2318854424 2318854424 2318854424 2318854424 2318854424 2318854424 2318854424 2318854424 [root@ibm-p730-06-lp4 ~]# rpm -e --nodeps libtirpc [root@ibm-p730-06-lp4 ~]# rpm -q libtirpc package libtirpc is not installed ############### update libtirpc ############### [root@xxx]# yum install libtirpc-0.2.4-0.12.el7.ppc64.rpm .... <snip> Installed: libtirpc.ppc64 0:0.2.4-0.12.el7 Complete! [root@xxx]# rpm -q libtirpc libtirpc-0.2.4-0.12.el7.ppc64 [root@xxx]# ./writer | ./reader 0 1 2 3 4 5 6 7 >>>> [root@xxx]# ./writer-tirpc | ./reader-tirpc 0 1 2 3 4 5 6 7 >>>> [root@xxx]# ./writer-tirpc-header | ./reader-tirpc-header 0 1 2 3 4 5 6 7 Moving to VERIFIED according to comment #10. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:3312 |