strange pids under heavy load (5.2-RC)
Robert Watson
rwatson at freebsd.org
Mon Dec 8 13:50:49 PST 2003
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 at fledge.watson.org Senior Research Scientist, McAfee Research
#include <unistd.h>
int
main(int argc, char *argv)
{
if (fork() != 0)
sleep(10);
}
More information about the freebsd-current
mailing list