From owner-freebsd-pkg@FreeBSD.ORG Mon Jul 28 11:09:32 2014 Return-Path: Delivered-To: pkg@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C8C0B2ED; Mon, 28 Jul 2014 11:09:32 +0000 (UTC) Received: from mail-wi0-x232.google.com (mail-wi0-x232.google.com [IPv6:2a00:1450:400c:c05::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3AD22267A; Mon, 28 Jul 2014 11:09:32 +0000 (UTC) Received: by mail-wi0-f178.google.com with SMTP id hi2so4102117wib.17 for ; Mon, 28 Jul 2014 04:09:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=FibwVRUDyDx244aTXHG5/YhlmsRp/5Ha11ciTiZ8Ta4=; b=MOhwSzAi7+uWbN5YVcgVQmgMyktEyydVxLK1XVvrVOtswX7HYIDb5lZ9j08p8rN9Rs 6w4xKWjsZ1uDN6RZDTGP2WKsqq+QmCuwMEvCbynnQo1vd7Ru5Cnfx6s7LtGaAZgtM5Dy bsest9ylgifSABpc7W5i4casO2zcz4oKSclnH0pgHklyaWDcNOqUWCGgkI5iiH5qKl9H 78z0bIcte5QAy/m3/KS4+gAGPS4Xb+ELrUvuSUwuk6iPIWGmQe/EsgQKNNuqKX1Ln9Gn UWBMPBHe9f8O9HOXcdkIsz9e2cvLEba29unAHqvDHzeU6w6ZUROT/HqmSfg/WNlhp2kH ZGyQ== X-Received: by 10.194.92.115 with SMTP id cl19mr48545821wjb.29.1406545769754; Mon, 28 Jul 2014 04:09:29 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id ko8sm48730328wjc.11.2014.07.28.04.09.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Jul 2014 04:09:28 -0700 (PDT) Sender: Baptiste Daroussin Date: Mon, 28 Jul 2014 13:09:25 +0200 From: Baptiste Daroussin To: Stefan Esser Subject: Re: [BUG?] pkg: Cannot get a read lock on a database, it is locked by another process Message-ID: <20140728110925.GC68875@ivaldir.etoilebsd.net> References: <53D511D6.7040108@freebsd.org> <53D619AB.5080101@freebsd.org> <20140728094609.GO50802@ivaldir.etoilebsd.net> <53D62D3E.2000004@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="MnLPg7ZWsaic7Fhd" Content-Disposition: inline In-Reply-To: <53D62D3E.2000004@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: pkg@freebsd.org X-BeenThere: freebsd-pkg@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Binary package management and package tools discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jul 2014 11:09:33 -0000 --MnLPg7ZWsaic7Fhd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 28, 2014 at 01:00:14PM +0200, Stefan Esser wrote: > Am 28.07.2014 um 11:46 schrieb Baptiste Daroussin: > > On Mon, Jul 28, 2014 at 11:36:43AM +0200, Stefan Esser wrote: > >> Hi Baptiste, > >>=20 > >> my mail to the ports maillist has not been answered, but I think=20 > >> what I describe is a real issue: Simultaneous "pkg" commands can=20 > >> lock-out each other in such a way, that one of the commands > >> fails. > >>=20 > >> This is not expected in existing scripts (e.g. portmaster), > >> which assume a permanent failure, when in fact the cause was a > >> temporary access restriction. > >>=20 > >> I do not like the fact, that read operations (from the point of=20 > >> view of the user, e.g. "pkg info") now fails when other > >> processes are also only reading the database. > >>=20 > >> But I think that aborted updates to the package database (e.g. > >> if a package has been installed, but cannot be registered due to > >> other pkg commands having a read lock) are a bigger problem, > >> since they may leave a system in an inconsistent state. > >>=20 > >> Shall I open a PR on this topic or is it already on your to-do > >> list? > >>=20 > >> Regards, STefan > >>=20 > > This is fixed with pkg 1.3 :) >=20 > Hi Bapt, >=20 > thank you for your reply, but I waited for 1.3.0 to be released > (had tested pkg-devel and noticed this effect, but thought it > might be a temporary problem) before posting to the ports@ list. >=20 > I just retried with pkg-1.3.2: >=20 > # pkg check -Bs > ^Z > [1]+ Stopped pkg check -Bs > # pkg info > pkg: Cannot get a read lock on a database, it is locked by another process >=20 > I never hit this problem with pkg-1.2.x ... oh fun if I run pkg check -Bs as root, I can properly run pkg info as user = but I cannot do it as root, looks like a bug. >=20 > But it makes it impossible to e.g. run "pkg check -B" (or pkg_libchk) > in one window and issue "portmaster $PORT_WITH_MISSING_LIB" in > another. Not that this is required functionality, but in the same > way other scripted uses of pkg collide with each other ... >=20 > > btw usually to hit more people on pkg adding pkg@ in CC is a good > > idea. >=20 > Thanks, I did not know that list existed. CC is added and I'll > subscribe to the list ... >=20 > Regards, STefan regards, Bapt --MnLPg7ZWsaic7Fhd Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlPWL2UACgkQ8kTtMUmk6Ey7cgCdEqHQ2kK8PSeZsR9Jc+eBGIAs qBIAoKuDgWm+/sJx1bWhq5sHPKr+SpOV =dDc6 -----END PGP SIGNATURE----- --MnLPg7ZWsaic7Fhd--