From owner-freebsd-current@FreeBSD.ORG Mon Dec 8 13:50:49 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AA8BB16A4CE; Mon, 8 Dec 2003 13:50:49 -0800 (PST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id E915A43D09; Mon, 8 Dec 2003 13:50:32 -0800 (PST) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.10/8.12.10) with ESMTP id hB8LoBUd012420; Mon, 8 Dec 2003 16:50:11 -0500 (EST) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)hB8LoBxo012417; Mon, 8 Dec 2003 16:50:11 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Mon, 8 Dec 2003 16:50:10 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: Doug White In-Reply-To: <20031208124805.Y15361@carver.gumbysoft.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-current@freebsd.org cc: Gordon Bergling Subject: Re: strange pids under heavy load (5.2-RC) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2003 21:50:49 -0000 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 int main(int argc, char *argv) { if (fork() != 0) sleep(10); }