Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 03 Aug 2014 10:43:54 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        freebsd-questions@freebsd.org
Subject:   Re: pkg: sqlite error while executing PRAGMA user_version
Message-ID:  <53DE045A.7080009@infracaninophile.co.uk>
In-Reply-To: <n88d2cilyr3.fsf@almelo.raji.xor>
References:  <n88d2cilyr3.fsf@almelo.raji.xor>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--hQ4RJo2EX9otcJgUKPGDhN3CX2c89i22j
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 03/08/2014 10:16, Wolfgang Hukriede wrote:
> I'm getting
>=20
> host> pkg info
> pkg: sqlite error while executing PRAGMA user_version; in file pkgdb.c:=
2284: database is locked
>=20
> I already tried to reboot, rm /var/db/pkg/repo* to no effect.
>=20
> When run as root "pkg info" shows a few packages, but most not.
>=20
> This is fbsd 8.4, pkg version 1.3.3 on a diskless machine (9.1 as nfs
> server).
>=20
> Is there any recipe on how to proceed? I'd very much be willing to
> rebuild the sqlite database from zero but don't know how.

Using sqlite on an NFS mounted partition is unfortunately liable to
various locking problems.  pkg(8) should be NFS resistant, but it may
not be resistant enough...

Can you try this:

# pkg shell
SQLite version 3.8.5 2014-06-04 14:06:34
Enter ".help" for usage hints.
sqlite> select * from pkg_lock ;
0|0|0
sqlite> select * from pkg_lock_pid ;
sqlite> .quit

That shows the expected output when there are no active locks in the
system.  If you system already shows that, then unfortunately it's a
fundamental problem with trying to lock the database on NFS, and will
require an updated version of pkg(8) to fix.

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.

PGP: http://www.infracaninophile.co.uk/pgpkey
JID: matthew@infracaninophile.co.uk


--hQ4RJo2EX9otcJgUKPGDhN3CX2c89i22j
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.20 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQJ8BAEBCgBmBQJT3gRiXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC
QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkATV5kP/1ybBhhh8GwxoXOcnPG9ms7o
Im3VfGEF6fZCNJYiHjWDs/moV1pQZ4Q6Im89yiOa8w8EhxWb405BJP44ewLz3TV/
ThixvmHYyLIqwmfJxNXKz8WxFh6gQ1Y3yWq0dr+H733l3aUDkWWd6bHfvSDUA8C+
oFqaUfn96VUs7piQUrzce8pCcL89DKEOx24B2RlbVLrVsBie9ahT6RwNuqDgmIyw
tDDxw4q/V/Er1eyYt1pt4NXRGF9MzjRjZAmSjUMMp485foHi2IwiexSMBZxGXx+C
Mil11A/wqtD88X6UEbinu3jah4OydFB5El0LWJreFhbnOQ+45c7hatfoBqwH36ke
RoX5cGuZdb03mk5y8PuEpKcTAhH+yImm+k2nuQqdPqYDmttlUQUT0/xT1PedWcfF
n9x2ohsbOJ3Iok3jftEasHVpzp4N5fqs3ZGf2Gvu89mz4oFm0Y9ozU9v51y7zbRJ
u9PFgurVzXaIsn/5Ai3qlU4gVJotgrp0rXEOYSKSwRnfmD7NToIXBvlydg7euQyz
L80rl3C+jHgb5J8DAvWOQk4ItFKSmIrX1ERd3V3wOVxdbDrBEa1qkj/XFWyrPDh+
/3uQwC7AtU01s98gBg1Up2+tSJw5XvcmTUdLx2Rpzrd3IYWoWYkCGpVb3Ve1DlQ2
O6ZHd4pSyVYS4oB8q3mj
=Jc1V
-----END PGP SIGNATURE-----

--hQ4RJo2EX9otcJgUKPGDhN3CX2c89i22j--



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