From owner-freebsd-questions@FreeBSD.ORG  Sat Aug 28 01:13:14 2004
Return-Path: <owner-freebsd-questions@FreeBSD.ORG>
Delivered-To: freebsd-questions@freebsd.org
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id DAB0516A4CE
	for <freebsd-questions@freebsd.org>;
	Sat, 28 Aug 2004 01:13:14 +0000 (GMT)
Received: from pintail.mail.pas.earthlink.net (pintail.mail.pas.earthlink.net
	[207.217.120.122])
	by mx1.FreeBSD.org (Postfix) with ESMTP id C6EEF43D53
	for <freebsd-questions@freebsd.org>;
	Sat, 28 Aug 2004 01:13:14 +0000 (GMT)	(envelope-from mike@inbox.lv)
Received: from pool0480.cvx26-bradley.dialup.earthlink.net ([209.179.223.225]
	helo=ringworm.mojavegreen.com)
	by pintail.mail.pas.earthlink.net with esmtp (Exim 3.33 #1)
	id 1C0rmK-0007U8-00; Fri, 27 Aug 2004 18:13:13 -0700
Received: by ringworm.mojavegreen.com (Postfix, from userid 1001)
	id 736E6B481A; Thu, 26 Aug 2004 19:49:15 -0700 (PDT)
From: "Michael C. Shultz" <ringworm@inbox.lv>
To: Matthew Seaman <m.seaman@infracaninophile.co.uk>,
	Gerard Seibert <gerard-seibert@rcn.com>,
	FreeBSD Questions <freebsd-questions@freebsd.org>
Date: Thu, 26 Aug 2004 19:49:12 -0700
User-Agent: KMail/1.6.2
References: <200408270526.47348.gerard-seibert@rcn.com>
	<20040827135458.GA46593@happy-idiot-talk.infracaninophile.co.uk>
In-Reply-To: <20040827135458.GA46593@happy-idiot-talk.infracaninophile.co.uk>
MIME-Version: 1.0
Content-Disposition: inline
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <200408261949.12134.ringworm@inbox.lv>
Subject: Re: Portmanager Crash
X-BeenThere: freebsd-questions@freebsd.org
X-Mailman-Version: 2.1.1
Precedence: list
List-Id: User questions <freebsd-questions.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>,
	<mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions>
List-Post: <mailto:freebsd-questions@freebsd.org>
List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>,
	<mailto:freebsd-questions-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 28 Aug 2004 01:13:15 -0000

On Friday 27 August 2004 6:54 am, Matthew Seaman wrote:
> On Fri, Aug 27, 2004 at 05:26:47AM -0400, Gerard Seibert wrote:
> > I followed Matthew Seaman's instructions, except that there was no
> > 'portmanager.core' file created. The file that was created was
> > 'pmStatus.core'. I assume that is the file that I am to work with.
> >
> > In any event, I ran 'portmanager' to create the core dump, Next I ran
> > 'gdb' which produced the following output:
> >
> > root@rcn
> > $gdb
> > /usr/ports/sysutils/portmanager/work/portmanager-0.2.0/portmanager/portma
> >nager -c pmStatus.core
> > GNU gdb 5.2.1 (FreeBSD)
> > Copyright 2002 Free Software Foundation, Inc.
> > GDB is free software, covered by the GNU General Public License, and you
> > are welcome to change it and/or distribute copies of it under certain
> > conditions. Type "show copying" to see the conditions.
> > There is absolutely no warranty for GDB.  Type "show warranty" for
> > details. This GDB was configured as "i386-unknown-freebsd"...
> >
> > warning: core file may not match specified executable file.
> > Core was generated by `pmStatus'.
> > Program terminated with signal 11, Segmentation fault.
>
> Well, knowing which program is actually dumping core is progress of a
> sort.  However, you do need to match the binary being debugged
> aganinst the generated core file, or the backtrace will unfortunately
> be meaningless.  There should be a pmStatus binary somewhere under
> /usr/ports/sysutils/portmanager/work/portmanager-0.2.0 that you can
> use.
>
>  Cheers,
>
>  Matthew

Mathew, thanks for Gerard the tips, I should have replied sooner but am
busy with another project.  The output he sent I think will work.  I found
FreeBSD current is very picky about malloc compared to stable, though
I tracked down and corrected most malloc routines I probable missed something
and his output points to a routine (PMGRrDbCreate) that I don't remember 
checking.  I'll get back at working on portmanager tonight and perhaps 
tomorrow and should have a fix maybe by tomorrow evening. Thanks again for 
helping him!

-Mike