From owner-freebsd-current@FreeBSD.ORG Fri Sep 29 13:20:07 2006 Return-Path: X-Original-To: current@FreeBSD.org 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 8EC9916A407; Fri, 29 Sep 2006 13:20:07 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD79443D64; Fri, 29 Sep 2006 13:20:06 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 5D73C46B82; Fri, 29 Sep 2006 09:20:06 -0400 (EDT) Date: Fri, 29 Sep 2006 14:20:06 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: ru@FreeBSD.org Message-ID: <20060929141709.E70454@fledge.watson.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: current@FreeBSD.org Subject: lockf in installworld -- not a good idea X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 29 Sep 2006 13:20:07 -0000 > revision 1.72 > date: 2005/11/03 08:56:39; author: ru; state: Exp; lines: +1 -0 > Serialize access to the info/dir file; needed for parallel installs. > > Reported by: scottl > > I'm not very fond of using the non-standard lockf(1) here, but I > have no better idea at the moment. NetBSD uses ln(1) to create a > lock file, but this approach can result in a deadlock if make is > interrupted, leaving an orphaned lock file. I'm not sure why this suddenly showed up in my configuration, but this is preventing me from installing world on an NFS mounted file system without rpc.lockd running. I get the following: ===> lib/libcom_err/doc (install) lockf -k /usr/share/info/dir install-info --quiet --defsection="Programming & development tools." --defentry="* libcom_err: (com_err). A Common Error Description Library for UNIX." com_err.info /usr/share/info/dir lockf: cannot open /usr/share/info/dir: Operation not supported *** Error code 73 Stop in /zoo/rwatson/netperf/RELENG_6/src/lib/libcom_err/doc. *** Error code 1 Stop in /zoo/rwatson/netperf/RELENG_6/src/lib/libcom_err. *** Error code 1 I've noticed an increasing intolerance in our tools for system install and maintenance to locking not being implemented over the past few years. I no longer get working cron on boxes with neither rpc.lockd nor local locking enabled, for example. Installworld represents a bigger problem, since I don't want to have to depend on a completely working rpc chain in order to installworld, nor depend on running in what would effectively be multiuser mode. Surely there's a better fix for this than adding lockf use? Robert N M Watson Computer Laboratory University of Cambridge