From owner-freebsd-bugs Sun Mar 2 15:30:21 2003 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 630F437B405 for ; Sun, 2 Mar 2003 15:30:19 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6807243FBF for ; Sun, 2 Mar 2003 15:30:18 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h22NUINS088379 for ; Sun, 2 Mar 2003 15:30:18 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h22NUIVa088378; Sun, 2 Mar 2003 15:30:18 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2B83E37B401 for ; Sun, 2 Mar 2003 15:28:35 -0800 (PST) Received: from thor.piqnet.org (adsl-66-125-235-59.dsl.sntc01.pacbell.net [66.125.235.59]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4CB7D43F75 for ; Sun, 2 Mar 2003 15:28:34 -0800 (PST) (envelope-from joelh@thor.piqnet.org) Received: from thor.piqnet.org (localhost [IPv6:::1]) by thor.piqnet.org (8.12.6/8.12.6) with ESMTP id h22NSYVi040924 for ; Sun, 2 Mar 2003 15:28:34 -0800 (PST) (envelope-from joelh@thor.piqnet.org) Received: (from joelh@localhost) by thor.piqnet.org (8.12.6/8.12.6/Submit) id h22NSXwX040923; Sun, 2 Mar 2003 15:28:33 -0800 (PST) Message-Id: <200303022328.h22NSXwX040923@thor.piqnet.org> Date: Sun, 2 Mar 2003 15:28:33 -0800 (PST) From: Joel Ray Holveck Reply-To: Joel Ray Holveck To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/48856: Setting SIGCHLD to SIG_IGN still leaves zombies under threads Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 48856 >Category: bin >Synopsis: Setting SIGCHLD to SIG_IGN still leaves zombies under threads >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Mar 02 15:30:17 PST 2003 >Closed-Date: >Last-Modified: >Originator: Joel Ray Holveck >Release: FreeBSD 5.0-RELEASE i386 >Organization: >Environment: System: FreeBSD thor.piqnet.org 5.0-RELEASE FreeBSD 5.0-RELEASE #13: Sun Feb 9 17:11:33 PST 2003 root@thor.piqnet.org:/usr/local/src/freebsd/src/sys/i386/compile/THOR i386 Also a problem under: FreeBSD sindri.juniper.net 4.5-RELEASE FreeBSD 4.5-RELEASE #1: Sun Jan 26 15:01:15 PST 2003 root@sindri.juniper.net:/usr/src/sys/compile/SINDRI i386 >Description: Using pthreads under 4.x and 5.0, setting SIGCHLD to SIG_IGN still leaves zombies. Some programs may create many children and count on setting SIGCHLD to SIG_IGN to avoid waiting. >How-To-Repeat: thor$ cat > foo.c #include #include #include #include int main() { signal (SIGCHLD, SIG_IGN); if (fork()) { sleep(1000); } exit(0); } thor$ gcc foo.c thor$ ./a.out & [1] 40860 thor$ ps ax | grep a.out 0 p1 ZW 0:00.00 (a.out) 40860 p1 S 0:00.01 ./a.out 40869 p1 S+ 0:00.01 grep a.out thor$ >Fix: I don't see a trivial fix, but it looks like adding the proper code to uthread_sig.c wouldn't be very hard. As a workaround, this bug does not exist in kthreads. This isn't much of a workaround, since a lot more bugs are suspected to be in kthreads. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message