Bug 465455 - zsh may hang when re-using PIDs
zsh may hang when re-using PIDs
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: zsh (Show other bugs)
All Linux
medium Severity medium
: rc
: ---
Assigned To: James Antill
James Antill
Depends On:
  Show dependency treegraph
Reported: 2008-10-03 08:40 EDT by Tomas Smetana
Modified: 2013-04-12 15:54 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-05-06 11:31:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Proposed patch (7.12 KB, patch)
2008-10-03 08:41 EDT, Tomas Smetana
no flags Details | Diff

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:0463 normal SHIPPED_LIVE zsh bug fix update 2009-05-06 11:31:35 EDT

  None (edit)
Description Tomas Smetana 2008-10-03 08:40:33 EDT
It may happen that with many processes one PID may appear in zsh's job table twice -- one marked as done.  In such a case zsh may not be able to pick the other process and mark it as done and would wait for it to finish forever. This would cause the zsh scripts to hang.

Much better explanation together with the patch can be found here:

It may not be easy to reproduce the problem since this happens only with many processes being spawned and the PID numbers being reused.

Customer was hitting this bug and confirms that the patch provided in the mentioned mailing list post fixes the issue.

I was able to reproduce the bug once with the following script (from http://www.zsh.org/cgi-bin/mla/wilma_hiliter/users/2008/msg00431.html):

export IFS="\
" ;find -type d -not -name cur -not -name tmp -not -name new -not -name "." \
-not -name ".." | while read q ; do echo $q ; find "$q" -maxdepth 2 \
-type f |while read w ; do  find "$q"
Comment 1 Tomas Smetana 2008-10-03 08:41:34 EDT
Created attachment 319357 [details]
Proposed patch
Comment 10 errata-xmlrpc 2009-05-06 11:31:38 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 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.


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