From owner-freebsd-questions@FreeBSD.ORG Thu Oct 30 13:34:28 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CF341065672 for ; Thu, 30 Oct 2008 13:34:28 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from mail8.sea5.speakeasy.net (mail8.sea5.speakeasy.net [69.17.117.10]) by mx1.freebsd.org (Postfix) with ESMTP id D98088FC14 for ; Thu, 30 Oct 2008 13:34:27 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: (qmail 18672 invoked from network); 30 Oct 2008 13:34:27 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail8.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 30 Oct 2008 13:34:27 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id 732195082A; Thu, 30 Oct 2008 09:34:25 -0400 (EDT) To: admin@cpcnw.co.uk References: <20081027184022.14D9D10656C1@hub.freebsd.org> From: Lowell Gilbert Date: Thu, 30 Oct 2008 09:34:25 -0400 In-Reply-To: (Graham Bentley's message of "Tue\, 28 Oct 2008 09\:36\:15 -0000") Message-ID: <44y706qk9q.fsf@be-well.ilk.org> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-questions@freebsd.org Subject: Re: Seg Fault Action! X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 13:34:28 -0000 "Graham Bentley" writes: > I have often wondered what to do if I compile a port and > immediatly after trying to run it I get a seg fault. > > In the past I have just tried to find an alternative port > that did the same job, but it has always felt as though I > wasnt trying hard enough. > > Yesterday after upgrading all my ports tree I decided to > get printing working and cups / HP stuff all works fine > as does the web gui to cups so I decided to try and > make xpp. > > The result is 'Segmentation Fault' - thats it! > > How do I go about finding out what caused it and how to > get the program running? > > Any tips etc appreciated! Segmentation fault means (roughly) accessing a region of memory that hadn't even been mapped into that process. Generally you need some software debugging skills to go after these problems directly. There are some less direct steps you can take that can help. For one, make sure your ports are up-to-date with your installed ports tree before installing more ports. You can run the program under truss(1), which will help you figure out what kind of bad data is being passed to system calls (assuming that's where the failure is, but it's not unusual for that to be the case). You can generate a crash dump of the program, and (you or someone else) can use a debugger to see where it was when it failed -- usually a strong hint. And of course, asking for help in figuring out a specific problem is an option as well. I'd look at xpp, but at the moment my machines with the ports collection installed are powered down... -- Lowell Gilbert, embedded/networking software engineer, Boston area http://be-well.ilk.org/~lowell/