Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 521134 - Bash doesn't wait for backgrounded process if its PID is recycled
Bash doesn't wait for backgrounded process if its PID is recycled
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: bash (Show other bugs)
4.8
All Linux
urgent Severity high
: rc
: ---
Assigned To: Roman Rakus
Petr Šplíchal
: ZStream
Depends On:
Blocks: 531235
  Show dependency treegraph
 
Reported: 2009-09-03 15:30 EDT by Albert Hopkins
Modified: 2018-10-20 00:12 EDT (History)
6 users (show)

See Also:
Fixed In Version: bash-3.0-23.el4
Doc Type: Bug Fix
Doc Text:
Cause: Backgrounded process PID is the same as the previous backgrounded process PID. Consequence: Bash doesn't wait for backgrounded process. Fix: Force bash to forgot last backgrounded process PID. Result: Bash waits for backgrounded process.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-02-16 09:30:03 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 RHSA-2011:0261 normal SHIPPED_LIVE Low: bash security and bug fix update 2011-02-16 09:29:52 EST

  None (edit)
Description Albert Hopkins 2009-09-03 15:30:50 EDT
The following condition occurs on RHEL4.8:

    [root@IT324086 ~]# uname -r ; rpm -q bash
    2.6.9-89.0.9.EL
    bash-3.0-21.el4
    [root@IT324086 ~]# echo 1000 > /proc/sys/kernel/pid_max  # for example
    [root@IT324086 ~]# while true; do sleep 1d & done
    [1] 300
    [2] 301
    [3] 302
    [4] 303
    [5] 304
    ...
    [696] 996
    [697] 997
    [698] 998
    [699] 999
    -bash: fork: Resource temporarily unavailable
    [root@IT324086 ~]# # kill some processes
    [root@IT324086 ~]# kill %1
    [root@IT324086 ~]# kill %2
    [1]   Terminated              sleep 1d
    [root@IT324086 ~]# man ps
    popen: Resource temporarily unavailable
    Attempt [/usr/bin/gunzip -c /usr/share/man/man1/ps.1.gz] to expand man page failed
    No manual entry for ps
    [2]   Terminated              sleep 1d
    [root@IT324086 ~]# ll
    [root@IT324086 ~]# ll
    total 88
    -rw-r--r--  1 root root  1068 Sep  3 15:03 anaconda-ks.cfg
    -rw-r--r--  1 root root 65029 Sep  3 15:03 install.log
    -rw-r--r--  1 root root  3062 Sep  3 15:03 install.log.syslog
    total 88
    -rw-r--r--  1 root root  1068 Sep  3 15:03 anaconda-ks.cfg
    -rw-r--r--  1 root root 65029 Sep  3 15:03 install.log
    -rw-r--r--  1 root root  3062 Sep  3 15:03 install.log.syslog

This only happens for the current bash shell. Other bash shells running simultaneously respond fine.
Comment 11 Roman Rakus 2010-10-28 18:06:36 EDT
It's fixed in bash-3.0-23.el4
Comment 14 Florian Nadge 2011-01-13 09:53:41 EST
Please be so kind and add a few key words to the technical note of this
bugzilla entry using the following structure:

Cause:

Consequence:

Fix:

Result:

For more details on CCFR texts, see:

https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes
Comment 15 Florian Nadge 2011-01-13 09:53:41 EST
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause

Consequence:

Fix:

Result:
Comment 16 Roman Rakus 2011-01-14 12:04:11 EST
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,7 +1,11 @@
-Cause
+Cause:
+Backgrounded process PID is the same as the previous backgrounded process PID.
 
 Consequence:
+Bash doesn't wait for backgrounded process.
 
 Fix:
+Force bash to forgot last backgrounded process PID.
 
-Result:+Result:
+Bash waits for backgrounded process.
Comment 17 errata-xmlrpc 2011-02-16 09:30:03 EST
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 therefore 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/RHSA-2011-0261.html

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