Bug 444374 - Intermittently incorrect exit status for child processes
Intermittently incorrect exit status for child processes
Status: CLOSED DUPLICATE of bug 429153
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: ksh (Show other bugs)
4.8
All Linux
low Severity high
: rc
: ---
Assigned To: Tomas Smetana
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-27 20:33 EDT by Michael Forrest
Modified: 2008-05-29 01:55 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-29 01:55:10 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)
Test script (also see attached file "large1") (600 bytes, application/octet-stream)
2008-04-27 20:33 EDT, Michael Forrest
no flags Details
Contains a number of functions for total script size > 50K (49.61 KB, application/octet-stream)
2008-04-27 20:37 EDT, Michael Forrest
no flags Details
Patch to fix the (sometimes) incorrect exit status (337 bytes, patch)
2008-04-27 20:38 EDT, Michael Forrest
no flags Details | Diff

  None (edit)
Description Michael Forrest 2008-04-27 20:33:44 EDT
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-27 20:33:44 EDT
Created attachment 303925 [details]
Test script (also see attached file "large1")
Comment 2 Michael Forrest 2008-04-27 20:37:13 EDT
Created attachment 303926 [details]
Contains a number of functions for total script size > 50K
Comment 3 Michael Forrest 2008-04-27 20:38:38 EDT
Created attachment 303927 [details]
Patch to fix the (sometimes) incorrect exit status
Comment 4 Tomas Smetana 2008-05-05 04:27:06 EDT
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 04:20:56 EDT
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 01:07:46 EDT
(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 01:55:10 EDT
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.