Bug 426849 - ksh doesn't work correcly with coprocess
Summary: ksh doesn't work correcly with coprocess
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: ksh   
(Show other bugs)
Version: 5.0
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Tomas Smetana
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2007-12-27 11:07 UTC by Steve
Modified: 2018-10-19 22:14 UTC (History)
1 user (show)

Fixed In Version: RHBA-2008-0326
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-05-21 15:43:30 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2008:0326 normal SHIPPED_LIVE ksh bug fix update 2008-05-20 14:27:00 UTC

Description Steve 2007-12-27 11:07:49 UTC
This is an escalation from issue tracker #136323. The 'Escalate to Bugzilla'
work flow from within issue tracker seems to be broken. Doing this manually now. 

Here is the problem description followed by the relevant comments from IT.

- steve

*** Description of problem:

ksh (ksh-20060214-1.4 in RHEL 5 at the moment) seems not to
be able to handle coprocess correcly, after a redirection
with ">&p", you are unable to write to coprocess anymore.

*** How reproducible:

It is always reproducible.

*** Steps to Reproduce:

Use this script:

#!/bin/ksh -x
cat > myoutput |&
print -p one
print -u4 two 4>&p
print -p three
print -u4 four 4>&p

*** Actual results:

This is the output you get:

+ cat
+ 1> myoutput
+ print -p one
+ print -u4 two
+ 4>& p
+ print -p three
./script.ksh[5]: print: no query process [Bad file descriptor]
+ print -u4 four
+ ./script.ksh[6]: p: cannot open [Bad file descriptor]

The file "myoutput" contains only:


*** Expected results:

This is the expected:

+ cat
+ 1> myoutput
+ print -p one
+ print -u4 two
+ 4>& p
+ print -p three
+ print -u4 four
+ 4>& p

The file "myoutput" should contain:


*** Additional info:

The problem doesn't exist in pdksh in RHEL 4 and doesn't
exist in the newer versions of ksh that are available on
Porkchop (http://porkc hop.devel.redhat.com/brewroot/packages/ksh/):
- ksh-20070111-1
- ksh-20070328-1

From the Changelog I can see that:

* Wed Feb 21 2007 Karsten Hopp <karsten@redhat.com> 20070111-1
- new upstream version
- fix invalid write in uname function

So probably the problem has been addressed in the new
upstream version.

My questions for SEG (that I'll provide to the customer) are:
- are we able to identify and backport the fix for this
 coprocess problem?
- is there any chance to have the new upstream version in
 RHEL 5 (and which one)

Thanks, Leonardo.

Comment 1 Steve 2007-12-27 11:08:48 UTC

the customer requested an escalation of priority because they're in the process
of conversion of script from HPUX and Linux to rollout their new system.

Thanks, Leonardo.

Severity set to: Medium

Comment 2 Steve 2007-12-27 11:09:23 UTC

I'm in touch with the maintainer of "ksh" package (Tom� Smetana
<tsmetana@redhat.com>). He's working at the moment to attempts (not easy) to
backport the "possible solution" at this "coprocess" problem from the 2007
version to the 2006 version that we ship now.
For the next releases of RHEL 5 (probably 5.3) he's considering with PM a rebase
of ksh... since ksh is quite old and buggy.

Let me know if we can create a BZ to officialy allow Engineering to work on this
specific problem.

Thanks, Leonardo.

Comment 3 Steve 2007-12-27 11:09:50 UTC

Tom� has provided the following test package that we are currently analysing:


I will let you know if this fixes the issue.

Thanks, Leonardo.

Comment 4 Steve 2007-12-27 11:10:23 UTC

I confirm that the customer is happy with this test package: they've run all
their scripts, they just have a minor problem (not connected to this IT#) for
which they have a workaround.
I'd like SEG to review this IT and create a BZ for that, eventually I'd like to
provide a Hotfix - if possible - to the Customer.

Thanks, Leonardo.

Comment 5 RHEL Product and Program Management 2007-12-27 11:14:19 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update

Comment 11 errata-xmlrpc 2008-05-21 15:43:30 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.