Bug 426849 - ksh doesn't work correcly with coprocess
ksh doesn't work correcly with coprocess
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: ksh (Show other bugs)
5.0
All Linux
high Severity high
: rc
: ---
Assigned To: Tomas Smetana
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-12-27 06:07 EST by Steve
Modified: 2010-10-22 17:23 EDT (History)
1 user (show)

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


Attachments (Terms of Use)

  None (edit)
Description Steve 2007-12-27 06:07:49 EST
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:

one
two

*** 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:

one
two
three
four

*** 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 06:08:48 EST
Hello,

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 06:09:23 EST
Hello,

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 06:09:50 EST
Hello,

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

http://tsmetana.fedorapeople.org/ksh/ksh-20060214-1.6.src.rpm
http://tsmetana.fedorapeople.org/ksh/ksh-20060214-1.6.i386.rpm

I will let you know if this fixes the issue.

Thanks, Leonardo.
Comment 4 Steve 2007-12-27 06:10:23 EST
Hello,

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 06:14:19 EST
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
release.
Comment 11 errata-xmlrpc 2008-05-21 11:43:30 EDT
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.

http://rhn.redhat.com/errata/RHBA-2008-0326.html

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