Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Apr 2013 10:02:28 +0200
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        "Eggert, Lars" <lars@netapp.com>
Cc:        "current@freebsd.org" <current@freebsd.org>
Subject:   Re: newnfs pkgng database corruption?
Message-ID:  <20130410080228.GB74304@ithaqua.etoilebsd.net>
In-Reply-To: <4C9A5BAE-8607-4E3A-8E69-E3993EA9873F@netapp.com>
References:  <4C9A5BAE-8607-4E3A-8E69-E3993EA9873F@netapp.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130410080228.GB74304>