Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Dec 2003 16:50:10 -0500 (EST)
From:      Robert Watson <rwatson@freebsd.org>
To:        Doug White <dwhite@gumbysoft.com>
Cc:        Gordon Bergling <gordon@bsd-network.org>
Subject:   Re: strange pids under heavy load (5.2-RC)
Message-ID:  <Pine.NEB.3.96L.1031208164452.9229D-100000@fledge.watson.org>
In-Reply-To: <20031208124805.Y15361@carver.gumbysoft.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Mon, 8 Dec 2003, Doug White wrote:

> On Mon, 8 Dec 2003, Gordon Bergling wrote:
> 
> > I run 'make -j 32 buildkernel' to stressing my fresh 5.2-RC installation a
> > little bit and saw some strange pids in a 'ps ax'. (The output of 'ps
> > ax' is stripped down.)
> >
> > -----------------------------------------------------------------------
> > 24111  p2  S+     0:00.81 make -j 32 buildkernel KERNCONF=NEMESIS-UP
> >
> >     0  p2  ZW+    0:00.00  (sh)
> 
> These are normal. make just hasn't gotten around to clearing these yet. 
> make spawns and reaps processes in groups rather than keeping the -j
> number busy at all times. 
> 
> Note that -j32 is much more than the system can paralleize.  I start
> getting dimishing returns past -j4, even on dual proc systems.  When you
> hit the rescue build you will be SORRY :) 
> 
> If you want to do load tests, launch multiple parallel buildworlds with
> differing MAKEOBJDIRPREFIX. 

Zombies should have non-zero pids.  This appears to be OK in -STABLE, and
broken in -CURRENT.  Obtuse test program below.

-STABLE:

fledge:/tmp> ps ux|  grep fork
robert 12400  0.0  0.1   864  308  pa  S     4:48PM   0:00.01 ./fork
robert 12401  0.0  0.0     0    0  pa  Z     4:48PM   0:00.00  (fork)

-CURRENT:

sproing:/projects/cboss/management> ps aux | grep fork
rwatson 27392  0.0  0.1  1212  528  p9  S+    4:50PM   0:00.01 ./fork
rwatson     0  0.0  0.0     0    0  p9  ZW+  -         0:00.00  (fork)

Since we don't want pids reused until after wait() has finished (or it
becomes ambiguous which process is being reaped for return values, etc),
this seems like a problem. 

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert@fledge.watson.org      Senior Research Scientist, McAfee Research

#include <unistd.h>

int
main(int argc, char *argv)
{

        if (fork() != 0)
                sleep(10);
}




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1031208164452.9229D-100000>