Bug 465455 - zsh may hang when re-using PIDs
Summary: zsh may hang when re-using PIDs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: zsh
Version: 5.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: James Antill
QA Contact: James Antill
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-10-03 12:40 UTC by Tomas Smetana
Modified: 2018-10-19 23:49 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-05-06 15:31:38 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:0463 0 normal SHIPPED_LIVE zsh bug fix update 2009-05-06 15:31:35 UTC

Description Tomas Smetana 2008-10-03 12:40:33 UTC
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 12:41:34 UTC
Created attachment 319357 [details]
Proposed patch

Comment 10 errata-xmlrpc 2009-05-06 15:31:38 UTC
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.