From owner-freebsd-current@FreeBSD.ORG Wed Apr 10 08:02:38 2013 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2B6FB23E for ; Wed, 10 Apr 2013 08:02:38 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wg0-f52.google.com (mail-wg0-f52.google.com [74.125.82.52]) by mx1.freebsd.org (Postfix) with ESMTP id B4770B02 for ; Wed, 10 Apr 2013 08:02:37 +0000 (UTC) Received: by mail-wg0-f52.google.com with SMTP id n12so166476wgh.31 for ; Wed, 10 Apr 2013 01:02:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=E0s0ASCfeAMhOL2oBxmzc42OxaXKdQ4iwtCYVeBcL7A=; b=qs2FAKL2QSGlJV4gdP5+2CO8Ggebxa8e5y/GEPhZfJ0iZ5DW3dJa6t9Rr7PLMT6Ue6 aOsjdQSAYk18pSllAQ4tRslDCTR/izfQ5puNdpWoCHTi0IQ5beyPCkLbYYbYF4K93wlJ dqqKBnhOcb0n2Biyj1zrI83PNRT5HEgfaYPR+NUUD/l/p98MxYsLB/o+d/FzKz9E0ReC negEmuuQ9DYhyCzkgFv9LgYwUYHIKAZK4vJnkfkbq+YlHP6C8cyH/F5t0xxixAW2ZMwt zCKbfdupRRPQyUHwztQV+5jr/WifGtqN61sfatNJMl7h9/p/vgLUauZHwBy4NgLzPD5V 1MqQ== X-Received: by 10.194.109.35 with SMTP id hp3mr1525837wjb.15.1365580951453; Wed, 10 Apr 2013 01:02:31 -0700 (PDT) Received: from ithaqua.etoilebsd.net (ithaqua.etoilebsd.net. [37.59.37.188]) by mx.google.com with ESMTPS id o5sm33674563wix.3.2013.04.10.01.02.29 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 10 Apr 2013 01:02:30 -0700 (PDT) Sender: Baptiste Daroussin Date: Wed, 10 Apr 2013 10:02:28 +0200 From: Baptiste Daroussin To: "Eggert, Lars" Subject: Re: newnfs pkgng database corruption? Message-ID: <20130410080228.GB74304@ithaqua.etoilebsd.net> References: <4C9A5BAE-8607-4E3A-8E69-E3993EA9873F@netapp.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rJwd6BRFiFCcLxzm" Content-Disposition: inline In-Reply-To: <4C9A5BAE-8607-4E3A-8E69-E3993EA9873F@netapp.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "current@freebsd.org" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 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: Wed, 10 Apr 2013 08:02:38 -0000 --rJwd6BRFiFCcLxzm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 10, 2013 at 07:42:30AM +0000, Eggert, Lars wrote: > Hi, >=20 > on a diskless server, I keep the ports tree and pkgng databases on a newn= fs NFSv4 mount. After a bunch of "portmaster -a" runs, the pkgng sqlite dat= abase appears to get corrupted. For example, when I try to update an existi= ng port, this happens: >=20 > root@five:~ # portmaster ports-mgmt/pkg > ... > =3D=3D=3D> Registering installation for pkg-1.0.11 > Installing pkg-1.0.11...pkg: sqlite: database disk image is malformed (pk= gdb.c:925) > pkg: sqlite: database disk image is malformed (pkgdb.c:1914) > *** [fake-pkg] Error code 70 >=20 > I have removed all ports and the pkgng databases and reinstalled, but the= corruption seems to return after a few days or weeks of installing and dei= nstalling ports. >=20 > On another system that has a disk, that corruption of the pkgng database = has not happened over six months or so. I therefore wonder if storing the s= qlite database on an NFS-mount is triggering some sort of bug, either in pk= gng or in newnfs. AFAIK, pkgng is using locks on the database quite liberal= ly, could that be where a bug is lurking? >=20 > I'm happy to help debug this, but someone would need to let me know what = to try. >=20 This can usually happen when a user do not have the nfs lock system started. Are you sure that nfs lock is correctly started? If that is the case, there is anyway a bug in pkgng that should catch the problem and refuse to operate in such situation, I know sqlite to provide a mechanism that allow us to be able to catch this, I'm not sure yet to use i= t. regards, Bapt --rJwd6BRFiFCcLxzm Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlFlHJMACgkQ8kTtMUmk6ExhmgCcDbFXtRAI6FZ45NUoB4CbE27s kloAn0umPTBIWw625ZXY1XfuvTbhyyFF =2iLX -----END PGP SIGNATURE----- --rJwd6BRFiFCcLxzm--