From owner-freebsd-questions@FreeBSD.ORG Sun Aug 3 14:23:58 2014 Return-Path: Delivered-To: freebsd-questions@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 814A659A for ; Sun, 3 Aug 2014 14:23:58 +0000 (UTC) Received: from mail-we0-x231.google.com (mail-we0-x231.google.com [IPv6:2a00:1450:400c:c03::231]) (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 1DBE224E4 for ; Sun, 3 Aug 2014 14:23:57 +0000 (UTC) Received: by mail-we0-f177.google.com with SMTP id w62so6513797wes.36 for ; Sun, 03 Aug 2014 07:23:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:message-id:from:to:subject:mime-version:content-type :content-transfer-encoding; bh=oT0MNNGM7zs4sATrA7b9QpjSx6izmntUaG1XOPX0eNM=; b=w/5QoiGbspnSq9p5M4KoqPsDWyPeA7llG9Da5ZJ7l6BL9kPK0NHeU29UN/gGe8s/1z vK7U71p/YOGCftJ4/WWCR9VrRpYko8VdXHrTaXnYvjCzVgZPDZNqTqUp7DfxoWvAR1hb 83MN1iaJPj/EsP9q6PTBLnFCcofsItR7grj38hnItL06cZpaRd1OrJ35nZzB4PyYZzCx zIsb1uVApS3NviUCDQ/QH+F39y+ewzjDKaKFJdNoLhhg6KQekycIT62AsGDO7BDj1Z9Z sU4zcOylaZNpffxKL8ARy0AWMCS5Jbi6VwA39hKxM5riqKj0BYVBJUV/G35w4H28yEtQ DmAQ== X-Received: by 10.194.122.6 with SMTP id lo6mr24054523wjb.17.1407075836466; Sun, 03 Aug 2014 07:23:56 -0700 (PDT) Received: from almelo.raji.xor ([46.142.88.74]) by mx.google.com with ESMTPSA id ft17sm36185703wjc.14.2014.08.03.07.23.55 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 03 Aug 2014 07:23:55 -0700 (PDT) Date: Sun, 03 Aug 2014 16:23:54 +0200 Message-Id: From: Wolfgang Hukriede To: freebsd-questions@freebsd.org Subject: Re: pkg: sqlite error while executing PRAGMA user_version MIME-version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Aug 2014 14:23:58 -0000 That was only partly sufficient. No way to backup the database: # pkg backup -d /var/db/pkg/db-backup pkg: sqlite error while executing PRAGMA user_version; in file pkgdb.c:2284: database is locked Ok, leave that for later... Continue with # pkg shell SQLite version 3.8.5 2014-06-04 14:06:34 Enter ".help" for usage hints. sqlite> update pkg_lock set exclusive=0,advisory=0,read=0 ; sqlite> select * from pkg_lock ; 0|0|0 sqlite> delete from pkg_lock_pid ; sqlite> select * from pkg_lock_pid ; sqlite> .quit Okay, but still: # pkg info pkg: sqlite error while executing PRAGMA user_version; in file pkgdb.c:2284: database is locked I then removed local.sqlite.lock/ by hand. Good, "pkg info" works again! Then I tried to relax permissions on /var/db/pkg with the idea to make "pkg info" work for non-root users. "pkg" nicely detects and defeats this: > pkg info pkg: /var/db/pkg permissions (0775) too lax So, that's impossible. Anyways, I seem to remember that NFS lockfiles should go to /tmp/ or /var/tmp/ ? Many thanks!