From owner-freebsd-pkg@FreeBSD.ORG Mon Jul 28 11:00:27 2014 Return-Path: Delivered-To: pkg@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5DA3EF4; Mon, 28 Jul 2014 11:00:27 +0000 (UTC) Received: from mailout01.t-online.de (mailout01.t-online.de [194.25.134.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout00.t-online.de", Issuer "TeleSec ServerPass DE-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6623E261F; Mon, 28 Jul 2014 11:00:27 +0000 (UTC) Received: from fwd27.aul.t-online.de (fwd27.aul.t-online.de [172.20.26.132]) by mailout01.t-online.de (Postfix) with SMTP id D59A344E03C; Mon, 28 Jul 2014 13:00:18 +0200 (CEST) Received: from [192.168.119.33] (VsloiUZGQh0YIWSbv8XMHjcsnbFgesjoo3z-YGydMGKj5My1wrTKzBoVwzNAo6jgVD@[84.154.101.219]) by fwd27.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1XBifB-3k0bOS0; Mon, 28 Jul 2014 13:00:17 +0200 Message-ID: <53D62D3E.2000004@freebsd.org> Date: Mon, 28 Jul 2014 13:00:14 +0200 From: Stefan Esser User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Baptiste Daroussin Subject: Re: [BUG?] pkg: Cannot get a read lock on a database, it is locked by another process References: <53D511D6.7040108@freebsd.org> <53D619AB.5080101@freebsd.org> <20140728094609.GO50802@ivaldir.etoilebsd.net> In-Reply-To: <20140728094609.GO50802@ivaldir.etoilebsd.net> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-ID: VsloiUZGQh0YIWSbv8XMHjcsnbFgesjoo3z-YGydMGKj5My1wrTKzBoVwzNAo6jgVD X-TOI-MSGID: 8095bfae-ebb6-41d6-a62d-e5eb9b680b5c 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:00:27 -0000 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, >> >> my mail to the ports maillist has not been answered, but I think >> what I describe is a real issue: Simultaneous "pkg" commands can >> lock-out each other in such a way, that one of the commands >> fails. >> >> 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. >> >> I do not like the fact, that read operations (from the point of >> view of the user, e.g. "pkg info") now fails when other >> processes are also only reading the database. >> >> 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. >> >> Shall I open a PR on this topic or is it already on your to-do >> list? >> >> Regards, STefan >> > This is fixed with pkg 1.3 :) Hi Bapt, 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. I just retried with pkg-1.3.2: # 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 I never hit this problem with pkg-1.2.x ... 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 ... > btw usually to hit more people on pkg adding pkg@ in CC is a good > idea. Thanks, I did not know that list existed. CC is added and I'll subscribe to the list ... Regards, STefan