newnfs pkgng database corruption?

Rick Macklem rmacklem at uoguelph.ca
Wed Apr 10 23:29:20 UTC 2013


Lars Eggert 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
> 
Error code 70 is ESTALE (or NFSERR_STALE, if you prefer). The server
replies with that when the file no longer exists.

File locking doesn't stop a file from being removed, as far as I know.

rick

> 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.
> 
> Thanks,
> Lars
> _______________________________________________
> freebsd-current at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to
> "freebsd-current-unsubscribe at freebsd.org"


More information about the freebsd-current mailing list