Date: Mon, 19 May 2014 20:12:57 +0100 From: Matthew Seaman <matthew@FreeBSD.org> To: freebsd-questions@freebsd.org Subject: Re: error: pkg-static: sqlite: database is locked Message-ID: <537A57B9.9000600@FreeBSD.org> In-Reply-To: <CALe6D=uUTm8E=sG2aa2oQisOYvTntF5ikA6syamiPh7EuH3u-Q@mail.gmail.com> References: <CALe6D=uUTm8E=sG2aa2oQisOYvTntF5ikA6syamiPh7EuH3u-Q@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --f7XS0gjTeCQXxdmclwcnrjSr2UQ6v7jN2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 19/05/2014 18:33, Xavier wrote: > When I try to install/compile/register any port, always I get > 'pkg-static: sqlite: database is locked'. >=20 > I try 'pkg unlock -a' but it don't solved it. >=20 > How I solved this problem of ports ? sqlite is not a multi-user database -- it doesn't do MVCC for instance. Meaning that a 2nd process trying to use the database, even read-only, while the first process is updating it has no way of guaranteeing any sort of consistent results. Hence pkg has quite strict locking requirements. In general, you cannot run more than one instance of pkg at one time. This is the most common cause of 'database is locked' messages. Locking has been heavily reworked for the upcoming pkg-1.3, so there should be fewer such incidents in future. It's also tricky to manage locking if /var/db/pkg is on an NFS mounted partition. Recent versions of pkg are more NFS resistant, but in my opinion, not using NFS is the route to happiness. 'pkg unlock' and 'pkg lock' have nothing to do with this problem. They're all about marking some of your installed packages as not to be modified, rather than controlling concurrent access to the package database in its entirety. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. PGP: http://www.infracaninophile.co.uk/pgpkey --f7XS0gjTeCQXxdmclwcnrjSr2UQ6v7jN2 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/ iQJ8BAEBCgBmBQJTele5XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkATWuUQAJdNiJkh9JueynZeikUmczPH 9IqedjLqGsc0LaZwUeaY8XO1LB9862VezBXB/PpKUg4/I32sLbVnv3NC1w6iTfpZ gu8cInv4zTRhEJK1qXGHG+664JEtaK9gEoaZOqqVeFF9sM1iTrioUTczddoBgx0J eSIb7p8bzMsUAxAmBnJwZHMSA3ypCzJq3dtBvxBkuokdhAcPr4MsjqLlprrf9gbp NFyAyEHHI5cFFyNYt6dLr473xjLN+7LD5R5TBwito/ZVJkM+91T0O2p0DVHsn6kz 9D7dCliw8QxAT6g/Y8WKevWZlO+4KQKhSpg/bYbVwlpg0qQ6R2a7keqwgWAiZnGh A2bu+uWPI3ljXoIDBum6/Gx29r3x9sC+Q3XBvrSrcI5iIx/rbWkOEtBBmB71XhxE ltew6TzLq0SogeMBITuieVvMGa0k6vxbvxZ+U/9mjn4+JBontW+nRgZ+GGa4B3Mz 1NwMNMunwVtofJmtsK9WgYB3ruv6iswzsCYlLn0yiNhRzZURtfbHJs/o1OWl3Mp7 LXwxEZW1LxXluDA4mYxDaJiCsFnUmtS+Meemv4beTJDKvVoh0fRxD/qP1BITs5W2 sPukHMLVabAAzY7QBuWotO0UNnkS6/yEBY8Xp47vXgWIcw4v8D7SBx8IN/zFgW7b dcSQxsmwn8klwHzaWHaf =jhpw -----END PGP SIGNATURE----- --f7XS0gjTeCQXxdmclwcnrjSr2UQ6v7jN2--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?537A57B9.9000600>