Bug 444374 - Intermittently incorrect exit status for child processes
Summary: Intermittently incorrect exit status for child processes
Keywords:
Status: CLOSED DUPLICATE of bug 429153
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: ksh
Version: 4.8
Hardware: All
OS: Linux
low
high
Target Milestone: rc
: ---
Assignee: Tomas Smetana
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-04-28 00:33 UTC by Michael Forrest
Modified: 2008-05-29 05:55 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-05-29 05:55:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Test script (also see attached file "large1") (600 bytes, application/octet-stream)
2008-04-28 00:33 UTC, Michael Forrest
no flags Details
Contains a number of functions for total script size > 50K (49.61 KB, application/octet-stream)
2008-04-28 00:37 UTC, Michael Forrest
no flags Details
Patch to fix the (sometimes) incorrect exit status (337 bytes, patch)
2008-04-28 00:38 UTC, Michael Forrest
no flags Details | Diff

Description Michael Forrest 2008-04-28 00:33:44 UTC
Description of problem:
In some internal testing with moderately sized scripts (see attachments),
I have found that the exit status reported in the "$?" parameter can sometimes
be incorrect, and unrelated to the actual exit statuses of child processes.

I bave only detected this problem with ksh-20050202-0.4E.4.

I have a single line patch (attached) which properly initialises the
structure member that was added in the "exit19" patch (appears to be
a backport for  RHBZ 232640, which I cannot see the details for).


Version-Release number of selected component (if applicable):
ksh-20050202-0.4E.4

How reproducible:

Run my test script (with accompanying "large1" file) as follows:

ksh ./test_mkdir 1 > _output

Actual results:

The _output file should report a number of failures of the form:

"Failed with status=<some random number>"

Expected results:


The _output file should only have lines like the following:

"Success"

Additional info:

My "exitfix" patch corrects the ksh executable so that only the expected
result is seen for the 150 attemnpts to execute a child mkdir.

Comment 1 Michael Forrest 2008-04-28 00:33:44 UTC
Created attachment 303925 [details]
Test script (also see attached file "large1")

Comment 2 Michael Forrest 2008-04-28 00:37:13 UTC
Created attachment 303926 [details]
Contains a number of functions for total script size > 50K

Comment 3 Michael Forrest 2008-04-28 00:38:38 UTC
Created attachment 303927 [details]
Patch to fix the (sometimes) incorrect exit status

Comment 4 Tomas Smetana 2008-05-05 08:27:06 UTC
This issue should be fixed in ksh-20050202-0.5E.4 that is about to be released
in RHEL 4.7.

The testing packages that contain all the recent changes can be downloaded from
http://tsmetana.fedorapeople.org/ksh/el4-test/
Note these are unofficial and unsupported -- just if you wish to test them
yourself to verify everything works OK for you.

Comment 5 Tomas Smetana 2008-05-07 08:20:56 UTC
If you can't verify the testing packages I'll close this bug as a duplicate of
bug #429153 because I failed to reproduce the problem with the new version.

Comment 6 Michael Forrest 2008-05-29 05:07:46 UTC
(In reply to comment #5)
> If you can't verify the testing packages I'll close this bug as a duplicate of
> bug #429153 because I failed to reproduce the problem with the new version.

Sorry it has taken so long to get back on this particular issue, but I have
finally had some time to verify that the ksh contained in the rpm at:

http://tsmetana.fedorapeople.org/ksh/el4-test/ksh-20050202-0.5E.4.i386.rpm

does NOT have the same return status issue described in this bug report.

The test_mkdir test script (which shows a number of failures with ksh-0.5E-4)
has _no_ failures with the new proposed ksh at the above URL.

I look forward to the 4.7 release bundle with a new ksh!

Comment 7 Tomas Smetana 2008-05-29 05:55:10 UTC
Thanks for the testing.  Closing.

*** This bug has been marked as a duplicate of 429153 ***


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