NetBSD Problem Report #27184
Received: (qmail 17684 invoked by uid 605); 7 Oct 2004 19:23:26 -0000
Message-Id: <20041007192324.D0D0A19DBCF@jodi.nimenees.com>
Date: Thu, 7 Oct 2004 14:23:24 -0500 (CDT)
From: erh@nimenees.com
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: erh@nimenees.com
To: gnats-bugs@gnats.NetBSD.org
Subject: linux emul waitpid system calls return EINVAL
X-Send-Pr-Version: 3.95
>Number: 27184
>Category: kern
>Synopsis: linux emul waitpid system calls return EINVAL (causing firefox zombie processes)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Oct 07 19:24:01 +0000 2004
>Closed-Date: Fri Nov 19 13:11:10 +0000 2004
>Last-Modified: Fri Nov 19 13:11:10 +0000 2004
>Originator: Eric Haszlakiewicz
>Release: NetBSD 2.0_BETA
>Organization:
>Environment:
System: NetBSD jodi.nimenees.com 2.0_BETA NetBSD 2.0_BETA (JODI) #5: Wed Jul 21 19:00:24 CDT 2004 erh@poe.swapsimple.com:/home/erh/netbsd/build/obj/home/erh/netbsd/src/sys/arch/i386/compile/JODI i386
Architecture: i386
Machine: i386
>Description:
The linux_sys_waitpid() function doesn't know about all the possible
options that are available and does not map the linux values onto the
NetBSD values.
This can cause exited processed/threads to not be reaped. This is
quickly apparent when one uses firefox for any length of time. It also
seems to occur with the sun jvm. Many other linux programs will probably
show the same behaviour.
>How-To-Repeat:
Install firefox-gtk2-linux.
Run it.
Run ps, notice there is a zombie process already.
If you continue to use firefox it will collect more and more zombie
processes until the process table fills up.
>Fix:
I'll be comitting a fix shortly.
>Release-Note:
>Audit-Trail:
From: Eric Haszlakiewicz <erh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: pr/27184 CVS commit: src/sys/compat/linux/common
Date: Thu, 7 Oct 2004 19:30:28 +0000 (UTC)
Module Name: src
Committed By: erh
Date: Thu Oct 7 19:30:28 UTC 2004
Modified Files:
src/sys/compat/linux/common: linux_misc.c linux_misc.h
linux_misc_notalpha.c
Log Message:
PR kern/27184: Have linux_sys_waitpid() call linux_sys_wait4() so the
supported options can't get out of sync. This add support for the
linux __WCLONE and __WALL options (NetBSD version: WALTSIG and WALLSIG)
Add a diagnostic check to see if the one unhandled option (__WNOTHREAD) is
specified.
This should prevent linux processes from losing their children and creating
tons of zombie processes.
To generate a diff of this commit:
cvs rdiff -r1.132 -r1.133 src/sys/compat/linux/common/linux_misc.c
cvs rdiff -r1.9 -r1.10 src/sys/compat/linux/common/linux_misc.h
cvs rdiff -r1.71 -r1.72 src/sys/compat/linux/common/linux_misc_notalpha.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: erh@netbsd.org
State-Changed-When: Fri, 19 Nov 2004 13:11:10 +0000
State-Changed-Why:
Fixed, both in -current and -netbsd-2-0
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.