newnfs pkgng database corruption?

Baptiste Daroussin bapt at FreeBSD.org
Wed Apr 10 08:02:38 UTC 2013


On Wed, Apr 10, 2013 at 07:42:30AM +0000, Eggert, Lars wrote:
> Hi,
> 
> on a diskless server, I keep the ports tree and pkgng databases on a newnfs NFSv4 mount. After a bunch of "portmaster -a" runs, the pkgng sqlite database appears to get corrupted. For example, when I try to update an existing port, this happens:
> 
> root at five:~ # portmaster ports-mgmt/pkg
> ...
> ===>   Registering installation for pkg-1.0.11
> Installing pkg-1.0.11...pkg: sqlite: database disk image is malformed (pkgdb.c:925)
> pkg: sqlite: database disk image is malformed (pkgdb.c:1914)
> *** [fake-pkg] Error code 70
> 
> 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 deinstalling ports.
> 
> 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 sqlite database on an NFS-mount is triggering some sort of bug, either in pkgng or in newnfs. AFAIK, pkgng is using locks on the database quite liberally, could that be where a bug is lurking?
> 
> I'm happy to help debug this, but someone would need to let me know what to try.
> 

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

regards,
Bapt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20130410/32d9bd3a/attachment.sig>


More information about the freebsd-current mailing list