Bug 465455 - zsh may hang when re-using PIDs
zsh may hang when re-using PIDs
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: zsh (Show other bugs)
5.1
All Linux
medium Severity medium
: rc
: ---
Assigned To: James Antill
James Antill
:
Depends On:
Blocks:
  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:
Environment:
Last Closed: 2009-05-06 11:31:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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

  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:
http://www.zsh.org/cgi-bin/mla/wilma_hiliter/users/2008/msg00432.html

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.

http://rhn.redhat.com/errata/RHBA-2009-0463.html

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