NetBSD Problem Report #1539

From gnats  Thu Sep 28 19:52:57 1995
Received: from struis.fwi.uva.nl (struis.fwi.uva.nl [146.50.14.20]) by sun-lamp.pc.cs.cmu.edu (8.6.11/8.6.10) with ESMTP id TAA00429 for <gnats-bugs@gnats.netbsd.org>; Thu, 28 Sep 1995 19:52:55 -0400
Message-Id: <199509282352.AAA00895@struis.fwi.uva.nl>
Date: Fri, 29 Sep 1995 00:52:35 +0100
From: Frank van der Linden <frank@struis.fwi.uva.nl>
Reply-To: frank@fwi.uva.nl
To: gnats-bugs@gnats.netbsd.org
Subject: Possible endless loop in nfsiod
X-Send-Pr-Version: 3.2

>Number:         1539
>Category:       bin
>Synopsis:       Possible endless loop in nfsiod
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 28 20:05:06 +0000 1995
>Closed-Date:    Sat Sep 30 11:40:15 +0000 1995
>Last-Modified:  Sat Sep 30 11:40:40 +0000 1995
>Originator:     Frank van der Linden
>Release:        1.0A
>Organization:
BugSpray, Inc.
>Environment:
NetBSD natte 1.0A NetBSD 1.0A (NATTE) #0: Tue Sep 26 20:09:33 MET 1995
frank@natte:/nfs/natte/nat1/src/sys/arch/i386/compile

>Description:
Under some circumstances (though relatively rare), nfsiod
              can loop endlessly when one of the forked off servers dies
              before the main program has exited, and a SIGCHLD is received.
              This can happen when nfsiod is run on a system with a kernel
              that has been configured without NFSCLIENT. The reapchild()
              function does a loop of wait3() calls as long as the return
              value is != 0. However, wait3() will return -1 if no child
              processes are available, so nfsiod enters a 'busy-wait3()'
              loop.
>How-To-Repeat:
              Run nfsiod on a system without NFS client support, a slow
              system preferably. The bug doesn't always appear, since
              it depends on a race-condition (child exiting before main
              program has exited).
>Fix:
*** nfsiod.c.orig	Tue May 30 14:35:54 1995
--- nfsiod.c	Thu Sep 28 21:42:36 1995
***************
*** 162,168 ****
  	int signo;
  {

! 	while (wait3(NULL, WNOHANG, NULL));
  }

  void
--- 162,168 ----
  	int signo;
  {

! 	while (wait3(NULL, WNOHANG, NULL) > 0);
  }

  void
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: pk 
State-Changed-When: Sat Sep 30 07:40:15 EDT 1995 
State-Changed-Why:  
patch applied. 
>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.