From pfeifer@sputnik1.dbai.tuwien.ac.at  Sun May 20 19:57:45 2007
Return-Path: <pfeifer@sputnik1.dbai.tuwien.ac.at>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 3960C16A421
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 20 May 2007 19:57:45 +0000 (UTC)
	(envelope-from pfeifer@sputnik1.dbai.tuwien.ac.at)
Received: from sputnik1.dbai.tuwien.ac.at (sputnik1.dbai.tuwien.ac.at [128.131.111.141])
	by mx1.freebsd.org (Postfix) with ESMTP id C493C13C44C
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 20 May 2007 19:57:44 +0000 (UTC)
	(envelope-from pfeifer@sputnik1.dbai.tuwien.ac.at)
Received: from sputnik1.dbai.tuwien.ac.at (localhost [127.0.0.1])
	by sputnik1.dbai.tuwien.ac.at (8.13.8/8.13.8) with ESMTP id l4KJvh9t060979;
	Sun, 20 May 2007 21:57:43 +0200 (CEST)
	(envelope-from pfeifer@sputnik1.dbai.tuwien.ac.at)
Received: (from pfeifer@localhost)
	by sputnik1.dbai.tuwien.ac.at (8.13.8/8.13.8/Submit) id l4KJvhsl060978;
	Sun, 20 May 2007 21:57:43 +0200 (CEST)
	(envelope-from pfeifer)
Message-Id: <200705201957.l4KJvhsl060978@sputnik1.dbai.tuwien.ac.at>
Date: Sun, 20 May 2007 21:57:43 +0200 (CEST)
From: Gerald Pfeifer <gerald@pfeifer.com>
To: FreeBSD-gnats-submit@freebsd.org
Subject: /usr/local/sbin/pkgdb:1100: [BUG] Segmentation fault

>Number:         112819
>Category:       ports
>Synopsis:       ports-mgmt/portupgrade - /usr/local/sbin/pkgdb:1100: [BUG] Segmentation fault
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    sem
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 20 20:00:12 GMT 2007
>Closed-Date:    Thu Aug 09 14:18:02 GMT 2007
>Last-Modified:  Sun Sep 16 23:30:01 GMT 2007
>Originator:     Gerald Pfeifer
>Release:        FreeBSD 6.2-RELEASE i386
>Organization:
FreeBSD.org
>Environment:
System: FreeBSD sputnik1 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 10:40:27 UTC 2007 root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
>Description:
	This is on a system where $PORTSDIR/x11-fonts does not exist,
	and the respective packages have been installed with pkg_add -r.

	sputnik1# pkgdb -aFO
	--->  Checking the package registry database
	Stale origin: 'x11-fonts/fontconfig': perhaps moved or obsoleted.
	[database version mismatch/bump detected] Permission denied
	database file error
	/usr/local/sbin/pkgdb:1100: [BUG] Segmentation fault
	ruby 1.8.5 (2006-08-25) [i386-freebsd6]
	Abort

	This is probably related to my other report on the portupgrade
	tool (ports/112818), whereas this report is on pkgdb.

	The one thing we absolutely should do is to provide the name of
	the concrete database as part of the error message also in this
	case.

	Also, why does pkgdb say "Permission" denied when I am running
	this as root?
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->sem 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sun May 20 21:31:21 UTC 2007 
Responsible-Changed-Why:  
Over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=112819 

From: Sergey Matveychuk <sem@FreeBSD.org>
To: bug-followup@FreeBSD.org,  gerald@pfeifer.com
Cc:  
Subject: Re: ports/112819: ports-mgmt/portupgrade - /usr/local/sbin/pkgdb:1100:
 [BUG] Segmentation fault
Date: Mon, 09 Jul 2007 16:05:04 +0400

 Where is your ports tree is? Any mounts with read-only option?
 Another thought (quite strange too) is you used chflags utility.
 No other ideas why permission denied could be occured.
 
 -- 
 Dixi.
 Sem.
State-Changed-From-To: open->closed 
State-Changed-By: sem 
State-Changed-When: Thu Aug 9 14:18:00 UTC 2007 
State-Changed-Why:  
Not a portupgrade bug 

http://www.freebsd.org/cgi/query-pr.cgi?pr=112819 

From: Gerald Pfeifer <gerald@pfeifer.com>
To: bug-followup@FreeBSD.org, Sergey Matveychuk <sem@FreeBSD.org>
Cc:  
Subject: Re: ports/112819: ports-mgmt/portupgrade - /usr/local/sbin/pkgdb:1100:
 [BUG] Segmentation fault
Date: Mon, 17 Sep 2007 00:47:20 +0200 (CEST)

 On Mon, 9 Jul 2007, Sergey Matveychuk wrote:
 > Where is your ports tree is? Any mounts with read-only option?
 > Another thought (quite strange too) is you used chflags utility.
 > No other ideas why permission denied could be occured.
 
 Sorry, it took me a while to recreate the original test scenario.
 
 Yes, your hunch was close: the mount itself is not read-only, but
 resides on an NFS share where root on the local machine running pkgdb
 can read, but not write.
 
 I have been unable to reproduce this very failure with the latest
 version of portupgrade-devel (2.3.1), but a very similar goes as
 follows:
 
   sputnik1# pkg_which /usr/local/lib/libGL.so.1
   libGL-6.5.3_2
 
 Fine, no problem.  Now the same as a regular user:
 
   sputnik1% pkg_which /usr/local/lib/libGL.so.1
 
   Permission denied
   /usr/local/sbin/pkg_which:280: [BUG] Segmentation fault
   ruby 1.8.5 (2006-08-25) [i386-freebsd6]
 
   Abort (core dumped)
 
 However, pkg_info -W works just fine:
 
   sputnik1% pkg_info -W /usr/local/lib/libGL.so.1
   /usr/local/lib/libGL.so.1 was installed by package libGL-6.5.3_2
 
 Which does pkg_which run into permission problems when not running as
 root when pkg_info solves the very same problem nicely?
 
 Gerald
>Unformatted:
