NetBSD Problem Report #35227

From  Sun Dec 10 13:34:22 2006
Return-Path: <>
Received: by (Postfix, from userid 31301)
	id F0EF563BA6F; Sun, 10 Dec 2006 13:34:21 +0000 (UTC)
Message-Id: <>
Date: Sun, 10 Dec 2006 13:34:21 +0000 (UTC)
Subject: /bin/sh does not clean up zombies under certain circumstances
X-Send-Pr-Version: www-1.0

>Number:         35227
>Category:       bin
>Synopsis:       /bin/sh does not clean up zombies under certain circumstances
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 10 13:35:00 +0000 2006
>Last-Modified:  Tue Apr 22 01:10:42 +0000 2008
>Originator:     Roland Illig
>Release:        3.0 or current, doesn't matter
After the execution of a backticks operator, the terminated child processes are not cleaned up under certain circumstances.

The following shell script creates 10 zombies, one per second.



set -eu

for i in 1 2 3 4 5 6 7 8 9 10; do
        input=`cat /etc/hosts; sleep 1`

        # comment out the following lines to make the zombies go away.
        while read line; do
        done <<EOF

        # uncomment the next line to make the zombies go away.
        #sleep 1



From: Roland Illig <>
Subject: PR/35227 CVS commit: pkgsrc/mk/bulk
Date: Sun, 10 Dec 2006 13:59:31 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	rillig
 Date:		Sun Dec 10 13:59:31 UTC 2006

 Modified Files:
 	pkgsrc/mk/bulk: printindex

 Log Message:
 Fixed the creating of numerous zombie processes, which is a bug in the
 NetBSD /bin/sh, reported in PR 35227.

 To generate a diff of this commit:
 cvs rdiff -r1.29 -r1.30 pkgsrc/mk/bulk/printindex

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-When: Mon, 14 Apr 2008 01:59:49 +0000
Is there any reason this still needs to be open?

From: Roland Illig <>
Subject: Re: bin/35227
Date: Sun, 20 Apr 2008 08:42:46 +0100

 Yes, this needs to be open, as other shell scripts may still trigger 
 this same bug. I had just fixed the script "using" the bug, not the bug 


State-Changed-From-To: feedback->open
State-Changed-When: Tue, 22 Apr 2008 01:10:42 +0000
sorry, evidently I misread the commit message.


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.