From owner-freebsd-ports Sun Aug 25 10: 0:18 2002 Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DF5BA37B400; Sun, 25 Aug 2002 10:00:10 -0700 (PDT) Received: from h132-197-179-27.gte.com (h132-197-179-27.gte.com [132.197.179.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id ED82E43E72; Sun, 25 Aug 2002 10:00:09 -0700 (PDT) (envelope-from ak03@gte.com) Received: from kanpc.gte.com (localhost [IPv6:::1]) by h132-197-179-27.gte.com (8.12.5/8.12.5) with ESMTP id g7PH08Lk007939; Sun, 25 Aug 2002 13:00:09 -0400 (EDT) (envelope-from ak03@kanpc.gte.com) Received: (from ak03@localhost) by kanpc.gte.com (8.12.5/8.12.5/Submit) id g7PH07hT007938; Sun, 25 Aug 2002 13:00:07 -0400 (EDT) Date: Sun, 25 Aug 2002 13:00:07 -0400 From: Alexander Kabaev To: "David W. Chapman Jr." Cc: current@FreeBSD.ORG, ports@FreeBSD.ORG Subject: Re: pkg_version and no origin found == SEGFAULT Message-Id: <20020825130007.35cdd0b9.ak03@gte.com> In-Reply-To: <20020825164731.GA88696@leviathan.inethouston.net> References: <20020825164731.GA88696@leviathan.inethouston.net> Organization: Verizon Data Services X-Mailer: Sylpheed version 0.8.1claws102 (GTK+ 1.2.10; i386-portbld-freebsd5.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org > It seems when pkg_version hits an installed port that has no origin > found it segfaults. I have found other people to verify that it > segfaults for them too. DWhite seems to think that it may be pointer > corruption in libc, specifically snprintf, fopen, strlcpy or strncpy Have you checked your /var/db/pkg//+CONTENTS files? For some reason some ports on my relatively stale -CURRENT box had these files truncated to zero length, and this caused some package tools (namely pkg_version) to crash. The procedure to read plist simply returns with all plist struct members set to zero without indicating any errors when CONTENTS file is empty, and the pkg_version crashes trying to defererence null 'origin' pointer. > Here is the backtrace > > Program received signal SIGSEGV, Segmentation fault. > 0x28204e57 in strlcpy () from /usr/lib/libc.so.5 > (gdb) bt > #0 0x28204e57 in strlcpy () from /usr/lib/libc.so.5 > #1 0x0804a003 in pkg_do (pkg=0x0) > at /usr/src/usr.sbin/pkg_install/version/perform.c:169 > #2 0x08049bfc in pkg_perform (indexarg=0x0) > at /usr/src/usr.sbin/pkg_install/version/perform.c:71 > #3 0x08049a45 in main (argc=1, argv=0xbfbffc0c) > at /usr/src/usr.sbin/pkg_install/version/main.c:79 > #4 0x08049879 in _start () -- Alexander Kabaev To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message