Subject: bin/1539: Possible endless loop in nfsiod
To: None <>
From: Frank van der Linden <>
List: netbsd-bugs
Date: 09/29/1995 00:52:35
>Number:         1539
>Category:       bin
>Synopsis:       Possible endless loop in nfsiod
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 28 20:05:06 1995
>Originator:     Frank van der Linden
BugSpray, Inc.
>Release:        1.0A
NetBSD natte 1.0A NetBSD 1.0A (NATTE) #0: Tue Sep 26 20:09:33 MET 1995

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()'
              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).
*** 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));
--- 162,168 ----
  	int signo;
! 	while (wait3(NULL, WNOHANG, NULL) > 0);