NetBSD Problem Report #37917

From martin@duskware.de  Wed Jan 30 09:02:52 2008
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 50EDC63B853
	for <gnats-bugs@gnats.netbsd.org>; Wed, 30 Jan 2008 09:02:52 +0000 (UTC)
Message-Id: <20080130003758.574FF63B101@narn.NetBSD.org>
Date: Wed, 30 Jan 2008 00:37:58 +0000 (UTC)
From: ad@netbsd.org
Reply-To: ad@netbsd.org
To: netbsd-bugs-owner@NetBSD.org
Subject: /bin/ps no longer shows zombies
X-Send-Pr-Version: www-1.0

>Number:         37917
>Category:       kern
>Synopsis:       /bin/ps no longer shows zombies
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    ad
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 30 09:05:00 +0000 2008
>Closed-Date:    Tue Apr 29 16:22:03 +0000 2008
>Last-Modified:  Tue Apr 29 16:25:01 +0000 2008
>Originator:     Andrew Doran
>Release:        4.99.51
>Organization:
The NetBSD Project
>Environment:
n/a
>Description:
Zombie processes no longer show up due to p_reflock being used by
the sysctl code to hold process structures. p_reflock excludes
all references when a process beings to exit.


>How-To-Repeat:
Code inspection.
>Fix:
Add another 'reflock' style lock only for system monitoring. Drain all
references in proc_free(). Adjust sysctl/exit code to make safe use of
process substructures as they are being torn down.


>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->ad
Responsible-Changed-By: ad@narn.netbsd.org
Responsible-Changed-When: Wed, 30 Jan 2008 09:19:02 +0000
Responsible-Changed-Why:
take


State-Changed-From-To: open->closed
State-Changed-By: ad@NetBSD.org
State-Changed-When: Tue, 29 Apr 2008 16:22:03 +0000
State-Changed-Why:
It turns out that this has been broken for years, and it's not my bug.
Fixed, anyway.


From: Andrew Doran <ad@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/37917 CVS commit: src/sys
Date: Tue, 29 Apr 2008 16:21:27 +0000 (UTC)

 Module Name:	src
 Committed By:	ad
 Date:		Tue Apr 29 16:21:27 UTC 2008

 Modified Files:
 	src/sys/kern: core_netbsd.c init_sysctl.c
 	src/sys/sys: sysctl.h

 Log Message:
 PR kern/37917 /bin/ps no longer shows zombies


 To generate a diff of this commit:
 cvs rdiff -r1.14 -r1.15 src/sys/kern/core_netbsd.c
 cvs rdiff -r1.134 -r1.135 src/sys/kern/init_sysctl.c
 cvs rdiff -r1.175 -r1.176 src/sys/sys/sysctl.h

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

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.