From owner-freebsd-ports@FreeBSD.ORG Sat Feb 15 09:26:09 2014 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0117FC34 for ; Sat, 15 Feb 2014 09:26:09 +0000 (UTC) Received: from shrewd.pub.knigma.org (shrewd.ipv6.pub.knigma.org [IPv6:2001:8b0:b0:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A2FB0161A for ; Sat, 15 Feb 2014 09:26:08 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (authenticated bits=0) by shrewd.pub.knigma.org (8.14.7/8.14.7) with ESMTP id s1F9Q56Y050408 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Sat, 15 Feb 2014 09:26:05 GMT (envelope-from lists@knigma.org) Message-ID: <52FF32AC.7070705@knigma.org> Date: Sat, 15 Feb 2014 09:26:04 +0000 From: Mark Knight User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: freebsd-ports@freebsd.org Subject: portupgrade -aF hanging under cron on FreeBSD 10 with pkgng Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (shrewd.pub.knigma.org [127.0.0.1]); Sat, 15 Feb 2014 09:26:05 +0000 (GMT) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: markk@knigma.org List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2014 09:26:09 -0000 For a few years I've used a very simple cron to update my ports. Every morning I get a friendly mail with the outcome. /etc/crontab: 15 4 * * * root /home/root/cvsup_update /home/root/cvsup_update: #!/bin/sh /bin/date cd /usr/ports sudo -u cvsupin svnsync sync file:///home/freebsd-svn/base sudo -u cvsupin svnsync sync file:///home/freebsd-svn/ports sudo -u cvsupin svnsync sync file:///home/freebsd-svn/doc svn up /usr/local/sbin/portsdb -uU /usr/local/sbin/portupgrade -a -F /usr/local/sbin/portversion -v | grep -v "up-to-date" /bin/date Since upgrading to FreeBSD 10 and migrating to pkgng (at the same time), I noticed the mails stopped. Upon investigating the script is hanging at "portupgrade -a -F" when some ports need updating. Using "kill" a couple of times to free up the job, I eventually get the following mail: see: http://www.knigma.org/scratch/home_root_cvsup_update_cronmail.txt Before killing the job to get the mail I ran ps, here are the relevant processes after the job had been stuck for several hours: USER PID PPID PGID SID JOBC STAT TT TIME COMMAND root 62559 1530 1530 1530 0 I - 0:00.01 cron: running job (cron) root 62562 62559 62562 62562 0 IWs - 0:00.00 /bin/sh /home/root/cvsup_update root 84862 62562 62562 62562 0 I - 0:03.24 ruby19: portupgrade: [1/4] png-1.5.17 (ruby19) root 98047 84862 62562 62562 0 I - 0:00.02 /usr/bin/script -qa /tmp/portupgrade20140215-84862-ayw6np env UPGRADE_TOOL=portupgrade UPGRADE_PORT=png-1.5.17 UPGRADE_PORT_VER=1.5.17 make FETCH_BEFORE_ARGS=-q -DBATCH checksum root 98048 98047 98048 98048 0 IEs+ 1- 0:00.01 make FETCH_BEFORE_ARGS=-q -DBATCH checksum If I run portupgrade -a -F at the shell prompt everything is fine - but this helps to illustrate where the cron is misbehaving. mkn@shrewd$ sudo portupgrade -a -F [Reading data from pkg(8) ... - 854 packages found - done] ---> Fetching the distfile(s) for 'png-1.5.18' (graphics/png) ---> Fetching '/usr/ports/graphics/png' ===> Found saved configuration for png-1.5.12 ===> png-1.5.18 depends on file: /usr/local/sbin/pkg - found ===> Fetching all distfiles required by png-1.5.18 for building => SHA256 Checksum OK for libpng-1.5.18.tar.xz. => SHA256 Checksum OK for libpng-1.5.18-apng.patch.gz. ---> Fetching the distfile(s) for 'p5-CPAN-Meta-YAML-0.011' (devel/p5-CPAN-Meta-YAML) ---> Fetching '/usr/ports/devel/p5-CPAN-Meta-YAML' ===> License ART10 GPLv1 accepted by the user ===> p5-CPAN-Meta-YAML-0.011 depends on file: /usr/local/sbin/pkg - found ===> Fetching all distfiles required by p5-CPAN-Meta-YAML-0.011 for building => SHA256 Checksum OK for CPAN-Meta-YAML-0.011.tar.gz. ---> Fetching the distfile(s) for 'libfpx-1.3.1.4' (graphics/libfpx) ---> Fetching '/usr/ports/graphics/libfpx' ===> libfpx-1.3.1.4 depends on file: /usr/local/sbin/pkg - found ===> Fetching all distfiles required by libfpx-1.3.1.4 for building => SHA256 Checksum OK for libfpx-1.3.1-4.tar.xz. ---> Fetching the distfile(s) for 'dejavu-2.34_2' (x11-fonts/dejavu) ---> Fetching '/usr/ports/x11-fonts/dejavu' ===> Found saved configuration for dejavu-2.33 ===> dejavu-2.34_2 depends on file: /usr/local/sbin/pkg - found ===> Fetching all distfiles required by dejavu-2.34_2 for building => SHA256 Checksum OK for dejavu-fonts-ttf-2.34.tar.bz2. mkn@shrewd$ I'd appreciate any thoughts on why this is getting stuck please? Thanks! -- Mark Knight Mobile: +44 7753 250584. http://www.knigma.org/ Email: markk@knigma.org. Skype: knigma