Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 820097

Summary: s390x: wc: : No such file or directory
Product: Red Hat Enterprise Linux 6 Reporter: Jan Stancek <jstancek>
Component: busyboxAssignee: Denys Vlasenko <dvlasenk>
Status: CLOSED ERRATA QA Contact: qe-baseos-daemons
Severity: high Docs Contact:
Priority: high    
Version: 6.3CC: azelinka, brueckner, gbai, jburke, ovasik, qcai, rhack, ruyang, rvokal
Target Milestone: beta   
Target Release: ---   
Hardware: s390x   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-22 00:17:08 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:

Description Jan Stancek 2012-05-09 07:18:37 UTC
Description of problem:
busybox command 'wc' fails on s390x when redirecting stdin:
# echo "asdf" | busybox wc -l
wc: : No such file or directory

The code from wc_main (wc.c) does:
    *--argv = (char *) bb_msg_standard_input;

which after disassembly (objdump or gdb) gives:
0000000080099f58 <wc_main>:
...
    80099fd4:   e3 a0 af f8 ff 71       lay     %r10,-8(%r10)
    80099fda:   c0 20 00 02 35 87       larl    %r2,800e0ae8 <bb_msg_invalid_arg+0x1d>

The address of "bb_msg_standard_input" is not even:
800e0ae9: <bb_msg_standard_input>

The problems appears to be in alignment of "bb_msg_standard_input". 
# define ALIGN1 __attribute__((aligned(1)))
const char bb_msg_standard_input[] ALIGN1 = "standard input";

larl instruction can generate only even addresses. The address, which is used (800e0ae8) is the end of bb_msg_invalid_arg, which is "\0".

Version-Release number of selected component (if applicable):
RHEL6.3-20120507.n.1
busybox-1.15.1-15.el6.s390x

How reproducible:
100%

Steps to Reproduce:
1. echo "asdf" > test
2a. busybox wc -l < test
or
2b. echo "asdf" | busybox wc -l
  
Actual results:
wc: : No such file or directory

Expected results:
1

Additional info:
Bug 812816 - network dump on s390x got failure

From z/Architecture Principles of Operation SA22-7832-07:
"Only even addresses (halfword addresses) can
be generated. If an odd address is desired,
LOAD ADDRESS can be used to add one to an
address formed by LOAD ADDRESS RELATIVE
LONG."

Comment 2 Denys Vlasenko 2012-08-15 13:23:41 UTC
I know how to fix this. I need ACKs.

Comment 4 RHEL Program Management 2012-09-07 05:36:25 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

Comment 9 Denys Vlasenko 2013-09-09 18:03:50 UTC
New build, with the fix included:

https://brewweb.devel.redhat.com/buildinfo?buildID=293887

Comment 12 Hendrik Brueckner 2013-10-22 08:28:53 UTC
*** Bug 1010929 has been marked as a duplicate of this bug. ***

Comment 13 errata-xmlrpc 2013-11-22 00:17:08 UTC
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.

http://rhn.redhat.com/errata/RHSA-2013-1732.html