From owner-freebsd-stable@FreeBSD.ORG Sat Oct 8 00:38:53 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6FF3106564A for ; Sat, 8 Oct 2011 00:38:53 +0000 (UTC) (envelope-from aw1@swelter.hanley.stade.co.uk) Received: from outbound-queue-1.mail.thdo.gradwell.net (outbound-queue-1.mail.thdo.gradwell.net [212.11.70.34]) by mx1.freebsd.org (Postfix) with ESMTP id 472708FC17 for ; Sat, 8 Oct 2011 00:38:53 +0000 (UTC) Received: from outbound-edge-1.mail.thdo.gradwell.net (bonnie.gradwell.net [212.11.70.2]) by outbound-queue-1.mail.thdo.gradwell.net (Postfix) with ESMTP id AC35121F8F; Sat, 8 Oct 2011 01:27:13 +0100 (BST) Received: from 93-97-22-18.zone5.bethere.co.uk (HELO swelter.hanley.stade.co.uk) (93.97.22.18) (smtp-auth username postmaster%pop3.stade.co.uk, mechanism cram-md5) by outbound-edge-1.mail.thdo.gradwell.net (qpsmtpd/0.83) with (AES256-SHA encrypted) ESMTPSA; Sat, 08 Oct 2011 01:27:13 +0100 Received: from swelter.hanley.stade.co.uk (localhost [127.0.0.1]) by swelter.hanley.stade.co.uk (8.14.4/8.14.4) with ESMTP id p980R89i076244; Sat, 8 Oct 2011 01:27:08 +0100 (BST) (envelope-from aw1@swelter.hanley.stade.co.uk) Received: (from aw1@localhost) by swelter.hanley.stade.co.uk (8.14.4/8.14.4/Submit) id p980R7cL076242; Sat, 8 Oct 2011 01:27:07 +0100 (BST) (envelope-from aw1) Date: Sat, 8 Oct 2011 01:27:07 +0100 From: Adrian Wontroba To: Mikolaj Golub Message-ID: <20111008002707.GA76128@swelter.hanley.stade.co.uk> Mail-Followup-To: Adrian Wontroba , Mikolaj Golub , Ronald Klop , Chris Torek , "freebsd-stable@freebsd.org" , Jeremy Chadwick , cperciva@freebsd.org References: <20110918045413.GA63773@DataIX.net> <20110918053901.GA31617@icarus.home.lan> <86d3eydsmf.fsf@kopusha.home.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 8.2-STABLE Organization: Oh dear, I've joined one again. X-Virus-Scanned: clamav-milter 0.97.1 at swelter.hanley.stade.co.uk X-Virus-Status: Clean X-Gradwell-MongoId: 4e8f98e1.923-580c-1 X-Gradwell-Auth-Method: mailbox X-Gradwell-Auth-Credentials: postmaster@pop3.stade.co.uk Cc: Chris Torek , "freebsd-stable@freebsd.org" , cperciva@freebsd.org, Jeremy Chadwick , Ronald Klop Subject: Re: /usr/bin/script eating 100% cpu with portupgrade and xargs X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: aw1@stade.co.uk List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2011 00:38:53 -0000 On Tue, Oct 04, 2011 at 02:15:24PM +0300, Mikolaj Golub wrote: > For the record. The issue has been fixed in CURRENT and the fix has > been merged to STABLE. At $JOB with a recent version of RELENG_8 and the new script (1.24.30.5 2011/10/04 11:08:31 trociny) I am getting hangs (system close to idle) when running a batch job which calls portupgrade. I had two hangs, in different places, while upgrading the first package. Process trees below. Reverting to an older version of script (1.24.30.4 2010/10/14 01:21:44 obrien) showed the 100% processor utilisation problem, but at least my package build from source is running. I won't be in a position to create a simpler test case, raise a PR or try patches till Tuesday evening (UK) at the earliest. hang 1 daemon 1997 0.0 0.1 3420 1152 ?? I 7:16PM 0:00.01 |-- /usr/libexec/atrun root 1998 0.0 0.1 3676 1192 ?? IN 7:16PM 0:00.01 | `-- sh root 1999 0.0 0.1 3676 1408 ?? IN 7:16PM 0:00.01 | `-- /bin/sh -e /usr/local/rjis/bin/fbsd_upgrade.sh build_packages_all root 2003 0.0 0.1 3676 1420 ?? IN 7:16PM 0:00.01 | |-- /bin/sh -e /usr/local/rjis/bin/fbsd_upgrade.sh build_packages_all root 71608 0.0 0.1 3676 1360 ?? IN 8:19PM 0:00.02 | | `-- /bin/sh -e /usr/local/rjis/bin/fbsd_upgrade.sh build_portupgrade --all --force root 71612 0.0 0.1 3676 1364 ?? IN 8:19PM 0:00.01 | | |-- /bin/sh -e /usr/local/rjis/bin/fbsd_upgrade.sh build_portupgrade --all --force root 71619 0.0 3.4 43832 34820 ?? IN 8:19PM 0:13.37 | | | `-- ruby18: portupgrade: [1/280] jpeg-8_3 (ruby18) root 75064 0.0 0.1 3356 800 ?? IN 8:20PM 0:00.10 | | | `-- /usr/bin/script -qa /tmp/portupgrade20111007-71619-1ozbl8u-0 env UPGRADE_TOOL=portupgrade UPGRADE_PORT=jpeg-8_3 UPGRADE_PORT_VER=8_3 make BATCH=yes FETCH_BEFORE_ARGS=-q DEPENDS_TARGET=package root 75065 0.0 0.1 2912 1236 3 INs+ 8:20PM 0:00.08 | | | `-- make BATCH=yes FETCH_BEFORE_ARGS=-q DEPENDS_TARGET=package root 75182 0.0 0.1 3676 1180 3 IN+ 8:20PM 0:00.01 | | | `-- [sh] root 75348 0.0 0.1 3676 1352 3 IN+ 8:20PM 0:00.35 | | | `-- /bin/sh ./configure --enable-shared --enable-static --prefix=/usr/local --mandir=/usr/local/man --infodir=/usr/local/info/ --build=i386-portbld-freebsd8.2 root 76047 0.0 0.1 3296 756 3 IN+ 8:20PM 0:00.00 | | | `-- printf %s checking whether to enable maintainer-specific portions of Makefiles... root 71613 0.0 0.1 3296 668 ?? IN 8:19PM 0:00.01 | | `-- tee /home/fbsd_upgrade/build_portupgrade.log root 2004 0.0 0.1 3296 712 ?? IN 7:16PM 0:00.05 | `-- tee /home/fbsd_upgrade/build_packages_all.log hang 2 root 76284 0.0 0.1 3676 1160 ?? IN 8:49PM 0:00.01 | `-- sh root 76285 0.0 0.1 3676 1372 ?? IN 8:49PM 0:00.01 | `-- /bin/sh -e /usr/local/rjis/bin/fbsd_upgrade.sh build_packages_all root 76289 0.0 0.1 3676 1372 ?? IN 8:49PM 0:00.01 | |-- /bin/sh -e /usr/local/rjis/bin/fbsd_upgrade.sh build_packages_all root 45880 0.0 0.1 3676 1368 ?? IN 9:18PM 0:00.02 | | `-- /bin/sh -e /usr/local/rjis/bin/fbsd_upgrade.sh build_portupgrade --all --force root 45884 0.0 0.1 3676 1372 ?? IN 9:18PM 0:00.01 | | |-- /bin/sh -e /usr/local/rjis/bin/fbsd_upgrade.sh build_portupgrade --all --force root 45891 0.0 3.5 43832 35812 ?? IN 9:18PM 0:13.27 | | | `-- ruby18: portupgrade: [1/280] jpeg-8_3 (ruby18) root 49313 0.0 0.1 3356 804 ?? IN 9:19PM 0:00.10 | | | `-- /usr/bin/script -qa /tmp/portupgrade20111007-45891-b2jn17-0 env UPGRADE_TOOL=portupgrade UPGRADE_PORT=jpeg-8_3 UPGRADE_PORT_VER=8_3 make BATCH=yes FETCH_BEFORE_ARGS=-q clean root 49314 0.0 0.1 2912 1124 3- INEs+ 9:19PM 0:00.06 | | | `-- make BATCH=yes FETCH_BEFORE_ARGS=-q clean root 45885 0.0 0.1 3296 668 ?? IN 9:18PM 0:00.01 | | `-- tee /home/fbsd_upgrade/build_portupgrade.log root 76290 0.0 0.1 3296 668 ?? IN 8:49PM 0:00.03 | `-- tee /home/fbsd_upgrade/build_packages_all.log -- Adrian Wontroba When in trouble, obfuscate.