Date: Wed, 7 Mar 2007 11:19:08 GMT From: Amarendra Godbole<amarendra.godbole@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: i386/110030: pkg_which hits segfault for non-root user, even after "portsdb -fu". Works fine for root though. Message-ID: <200703071119.l27BJ8wU050347@www.freebsd.org> Resent-Message-ID: <200703071120.l27BK5ja068701@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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 <format:bdb_btree> 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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200703071119.l27BJ8wU050347>