From owner-freebsd-current@FreeBSD.ORG Fri Sep 29 13:46:28 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 E80B616A4D4; Fri, 29 Sep 2006 13:46:27 +0000 (UTC) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (relay0.rambler.ru [81.19.66.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id C2CFE43FFF; Fri, 29 Sep 2006 13:43:37 +0000 (GMT) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (localhost [127.0.0.1]) by relay0.rambler.ru (Postfix) with ESMTP id 830DA6052; Fri, 29 Sep 2006 17:43:31 +0400 (MSD) Received: from edoofus.park.rambler.ru (unknown [81.19.65.108]) by relay0.rambler.ru (Postfix) with ESMTP id 635CB6010; Fri, 29 Sep 2006 17:43:31 +0400 (MSD) Received: (from ru@localhost) by edoofus.park.rambler.ru (8.13.8/8.13.8) id k8TDhWX7005023; Fri, 29 Sep 2006 17:43:32 +0400 (MSD) (envelope-from ru) Date: Fri, 29 Sep 2006 17:43:32 +0400 From: Ruslan Ermilov To: Robert Watson Message-ID: <20060929134332.GD4776@rambler-co.ru> References: <20060929141709.E70454@fledge.watson.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Km1U/tdNT/EmXiR1" Content-Disposition: inline In-Reply-To: <20060929141709.E70454@fledge.watson.org> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: No virus found Cc: current@FreeBSD.org Subject: Re: 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:46:28 -0000 --Km1U/tdNT/EmXiR1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 29, 2006 at 02:20:06PM +0100, Robert Watson wrote: >=20 > >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. >=20 > I'm not sure why this suddenly showed up in my configuration, but this is= =20 > preventing me from installing world on an NFS mounted file system without= =20 > rpc.lockd running. I get the following: >=20 > =3D=3D=3D> lib/libcom_err/doc (install) > lockf -k /usr/share/info/dir install-info --quiet =20 > --defsection=3D"Programming & > development tools." --defentry=3D"* libcom_err: (com_err). A Comm= on=20 > 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 >=20 > Stop in /zoo/rwatson/netperf/RELENG_6/src/lib/libcom_err/doc. > *** Error code 1 >=20 > Stop in /zoo/rwatson/netperf/RELENG_6/src/lib/libcom_err. > *** Error code 1 >=20 The necessity to run rpc.lockd is documented in the build(7) manpage. Quote: : installworld Install everything built by a preceding buildworld step : into the directory hierarchy pointed to by make(1) vari- : able DESTDIR. :=20 : If installing onto an NFS file system, make sure that : rpc.lockd(8) is running on both client and server. See : rc.conf(5) on how to make it start at boot time. > I've noticed an increasing intolerance in our tools for system install an= d=20 > maintenance to locking not being implemented over the past few years. I = no=20 > longer get working cron on boxes with neither rpc.lockd nor local locking= =20 > enabled, for example. Installworld represents a bigger problem, since I= =20 > don't want to have to depend on a completely working rpc chain in order t= o=20 > installworld, nor depend on running in what would effectively be multiuse= r=20 > mode. Surely there's a better fix for this than adding lockf use? >=20 I don't know of a better fix. Another approach is that mentioned in the commit log and used by NetBSD. I tried it, and it was very fragile -- it could easily leave the temporary file around, and that would stuck forever another instances. The problem at hand is that multiple instances of install-info(1) are attempting to write to the ${DESTDIR}/usr/share/info/dir file. If you have a better idea, don't hesitate to let me know. I'd very much like to get rid of that as well. Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --Km1U/tdNT/EmXiR1 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFHSMEqRfpzJluFF4RAsKRAKCZx4lQziJRibkA15786ZmqHsB+zgCeI77P SNAAg2xagRiUMTtwlr11gnY= =mXpp -----END PGP SIGNATURE----- --Km1U/tdNT/EmXiR1--