Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Dec 2012 19:37:07 +0100
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        Mathias Picker <Mathias.Picker@virtual-earth.de>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: pkgng: sqlite: database is locked
Message-ID:  <20121211183707.GG58883@ithaqua.etoilebsd.net>
In-Reply-To: <1355250723.48552.32.camel@mp>
References:  <1355235219.48552.9.camel@mp> <50C7751D.9010107@FreeBSD.org> <1355250723.48552.32.camel@mp>

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

--eMnpOGXCMazMAbfp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Dec 11, 2012 at 07:32:03PM +0100, Mathias Picker wrote:
> Am Dienstag, den 11.12.2012, 19:02 +0100 schrieb Olli Hauer:
> > On 2012-12-11 15:13, Mathias Picker wrote:
> > > I'm getting sqlite: database is locked errors with pkg. For deinstalls
> > > (portmaster updates) and fresh port installs with make install. The
> > > latest is
> > >=20
> > > =3D=3D=3D>   Registering installation for MuSE-0.9.2_14
> > > Installing MuSE-0.9.2_14... done
> > > pkg: sqlite: database is locked
> > >=20
> > > which results in muse not being registered in the pkg database...
> > >=20
> > > How can I investigate this further? This persists between reboots, and
> > > for fresh pkg runs.=20
> > >=20
> > > I'm hesitating to upgrade all the changes after the ports freeze has
> > > been lifted...
> > >=20
> > > I'm using a FreeBSD-stable and have changed to pkgng maybe two weeks
> > > ago. At the first portmaster -a after the upgrade, I think everything
> > > went smooth, and then more and more of these errors popped up.
> > > Everything is build using gcc.
> > >=20
> > > mp# uname -a
> > > FreeBSD mp.virtual-earth.de 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #28
> > > r243882: Wed Dec  5 18:28:39 CET 2012
> > > mathiasp@mp.virtual-earth.de:/usr/obj/usr/src/sys/GENERIC  amd64
> > >=20
> > > mp# pkg -v
> > > 1.0.3
> > >=20
> > > Any help apreciated,
> > >=20
> > > Mathias
> > >=20
> >=20
> > Hi Mathias,
> >=20
> > maybe you could find with one of the commands the process which
> > locks the database.
> >=20
> > #> fstat /var/db/pkg/pkgdb.db /var/db/pkg/local.sqlite
> > #> sockstat | grep -e local.sqlite -e pkgdb.db
>=20
> OK:
> mp# fstat /var/db/pkg/pkgdb.db /var/db/pkg/local.sqlite
> USER     CMD          PID   FD MOUNT      INUM MODE         SZ|DV R/W
> NAME
> mp# sockstat | grep -e local.sqlite -e pkgdb.db
> mp#=20
>=20
> I retried the muse install which gave me an error before, now it works
> fine?? Maybe it's only after portmaster runs?
>=20
> Maybe a pkg invocation which does not release the lock? I will look into
> this again.
>=20

The lock is always release at the end of the pkg invocation, the only way t=
o get
there is multiple pkg running at the same time and even there the lock shou=
ld
stay for long.

If you manage to reproduce I'd be very intersted in the way how to reproduce
and/or the debug information :)

regards,
Bapt

--eMnpOGXCMazMAbfp
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iEYEARECAAYFAlDHfVMACgkQ8kTtMUmk6Ey6ewCfaEzFxtHLyoftdRRH4/+0lRg5
ZQkAnREsOf0vVLNS6Vc+pU2n67B0Y37J
=f9qQ
-----END PGP SIGNATURE-----

--eMnpOGXCMazMAbfp--



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