From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 9 09:32:05 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 2BE30106566B for ; Fri, 9 Oct 2009 09:32:05 +0000 (UTC) (envelope-from gary.jennejohn@freenet.de) Received: from mout4.freenet.de (mout4.freenet.de [IPv6:2001:748:100:40::2:6]) by mx1.freebsd.org (Postfix) with ESMTP id BA3CB8FC0C for ; Fri, 9 Oct 2009 09:32:04 +0000 (UTC) Received: from [195.4.92.23] (helo=13.mx.freenet.de) by mout4.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.69 #92) id 1MwBpS-0005oB-Iu; Fri, 09 Oct 2009 11:32:02 +0200 Received: from t976b.t.pppool.de ([89.55.151.107]:59606 helo=ernst.jennejohn.org) by 13.mx.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.69 #94) id 1MwBpS-0001o2-DJ; Fri, 09 Oct 2009 11:32:02 +0200 Date: Fri, 9 Oct 2009 11:32:01 +0200 From: Gary Jennejohn To: Mel Flynn Message-ID: <20091009113201.0ade498f@ernst.jennejohn.org> In-Reply-To: <200910090116.59158.mel.flynn+fbsd.hackers@mailing.thruhere.net> References: <200910090015.24175.mel.flynn+fbsd.hackers@mailing.thruhere.net> <3a142e750910081538g213eb63cse559b4601e97a3@mail.gmail.com> <200910090116.59158.mel.flynn+fbsd.hackers@mailing.thruhere.net> X-Mailer: Claws Mail 3.7.2 (GTK+ 2.16.2; amd64-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, 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 Reply-To: gary.jennejohn@freenet.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2009 09:32:05 -0000 On Fri, 9 Oct 2009 01:16:59 +0200 Mel Flynn wrote: > 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 > See the info file for gdb, section 5.3 Signals. It's possible to tell gdb how to handle signals, e.g. stop vs. nostop, etc. --- Gary Jennejohn