From owner-freebsd-i386@FreeBSD.ORG Wed Mar 7 11:20:05 2007 Return-Path: X-Original-To: freebsd-i386@hub.freebsd.org Delivered-To: freebsd-i386@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C5EA116A401 for ; Wed, 7 Mar 2007 11:20:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id A610613C49D for ; Wed, 7 Mar 2007 11:20:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l27BK5f5068702 for ; Wed, 7 Mar 2007 11:20:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l27BK5ja068701; Wed, 7 Mar 2007 11:20:05 GMT (envelope-from gnats) Resent-Date: Wed, 7 Mar 2007 11:20:05 GMT Resent-Message-Id: <200703071120.l27BK5ja068701@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-i386@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Amarendra Godbole Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 68C0716A404 for ; Wed, 7 Mar 2007 11:19:08 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [69.147.83.33]) by mx1.freebsd.org (Postfix) with ESMTP id 40E0113C48E for ; Wed, 7 Mar 2007 11:19:08 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l27BJ8XI050349 for ; Wed, 7 Mar 2007 11:19:08 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id l27BJ8wU050347; Wed, 7 Mar 2007 11:19:08 GMT (envelope-from nobody) Message-Id: <200703071119.l27BJ8wU050347@www.freebsd.org> Date: Wed, 7 Mar 2007 11:19:08 GMT From: Amarendra Godbole To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: i386/110030: pkg_which hits segfault for non-root user, even after "portsdb -fu". Works fine for root though. X-BeenThere: freebsd-i386@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: I386-specific issues for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2007 11:20:05 -0000 >Number: 110030 >Category: i386 >Synopsis: pkg_which hits segfault for non-root user, even after "portsdb -fu". Works fine for root though. >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-i386 >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Mar 07 11:20:05 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Amarendra Godbole >Release: 6.2-RELEASE >Organization: VERITAS Software India Ltd. >Environment: FreeBSD dexter.vxindia.veritas.com 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 11:05:30 UTC 2007 root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 >Description: Hi, Running "pkg_which" as a non-root user hits a segfault resulting in a core dump from ruby. This happens even when the package database has been rebuilt with "pkgdb -fu", and PORTS_DBDRIVER is set to bdb1_hash or dbm_hash (got this from freshports.org). Here is copy of the session executing pkg_which: --------------------------------------------------------- [amar@dexter ~]$ pkg_which bash The pkgdb must be updated. Please run 'pkgdb -u' as root. [amar@dexter ~]$ sudo pkgdb -fu Password: ---> Updating the pkgdb [Rebuilding the pkgdb in /var/db/pkg ... - 138 packages found (-0 +138) .......................................................................................................................................... done] [amar@dexter ~]$ pkg_which bash Permission denied /usr/local/sbin/pkg_which:284: [BUG] Segmentation fault ruby 1.8.5 (2006-12-25) [i386-freebsd6] Abort trap: 6 (core dumped) [amar@dexter ~]$ PORTS_DBDRIVER=bdb1_hash pkg_which bash Permission denied /usr/local/sbin/pkg_which:284: [BUG] Segmentation fault ruby 1.8.5 (2006-12-25) [i386-freebsd6] Abort trap: 6 (core dumped) [amar@dexter ~]$ PORTS_DBDRIVER=dbm_hash pkg_which bash Permission denied /usr/local/sbin/pkg_which:284: [BUG] Segmentation fault ruby 1.8.5 (2006-12-25) [i386-freebsd6] Abort trap: 6 (core dumped) [amar@dexter ~]$ --------------------------------------------------------- It works fine for root though --------------------------------------------------------- dexter# whoami root dexter# pkg_which bash bash-3.1.17 dexter# --------------------------------------------------------- Though this thing is documented in the pkg_which manpage, I find two inconsistencies here: 1. Segfault is hit even after "pkgdb -fu" is done. 2. It works fine for root user. Thanks! Best, Amarendra >How-To-Repeat: See the "Full description" section for repro steps. >Fix: >Release-Note: >Audit-Trail: >Unformatted: