From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 8 23:17:02 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12F68106568B for ; Thu, 8 Oct 2009 23:17:02 +0000 (UTC) (envelope-from mel.flynn+fbsd.hackers@mailing.thruhere.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id D611E8FC13 for ; Thu, 8 Oct 2009 23:17:01 +0000 (UTC) Received: from smoochies.rachie.is-a-geek.net (mailhub.rachie.is-a-geek.net [192.168.2.11]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id 768577E857; Thu, 8 Oct 2009 15:17:13 -0800 (AKDT) From: Mel Flynn To: freebsd-hackers@freebsd.org Date: Fri, 9 Oct 2009 01:16:59 +0200 User-Agent: KMail/1.12.1 (FreeBSD/8.0-RC1; KDE/4.3.1; i386; ; ) References: <200910090015.24175.mel.flynn+fbsd.hackers@mailing.thruhere.net> <3a142e750910081538g213eb63cse559b4601e97a3@mail.gmail.com> In-Reply-To: <3a142e750910081538g213eb63cse559b4601e97a3@mail.gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200910090116.59158.mel.flynn+fbsd.hackers@mailing.thruhere.net> Cc: Paul B Mahol Subject: Re: Running a program through gdb without "interfering" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2009 23:17:02 -0000 On Friday 09 October 2009 00:38:32 Paul B Mahol wrote: > On 10/9/09, Mel Flynn wrote: > > Hi, > > > > is there a way to have a program run through gdb and gdb only record a > > segfault, but otherwise let the program run? > > > > Why I'd like this is the following: > > I've got a i386 jail on an amd64 box, running 7.2-p4. UNAME_p and UNAME_m > > have > > been set to i386 as well as ARCH in /etc/make.conf. Running portmaster[1] > > to build ports under my uid and PM_SU_CMD, sudo *sometimes* segfaults. > > It's only > > sudo, so at present I don't have a reason to doubt memory. However, it > > doesn't > > dump core, so I'm at a loss what the culprit could be. > > Tried 'sysctl kern.sugid_coredump=1' ? Hmm, no. Enabled now and waiting for the next segfault. I actually looked at the sysctl -d, but it didn't register that this could be the main cause. Perhaps that sentence could be more clear: -kern.sugid_coredump: Enable coredumping set user/group ID processes +kenr.sugid_coredump: Allow setuid/setgid processes to dump core -- Mel