From owner-freebsd-stable@FreeBSD.ORG Tue Aug 2 21:08:23 2011 Return-Path: Delivered-To: freebsd-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B8CE106566B for ; Tue, 2 Aug 2011 21:08:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 49FDC8FC18 for ; Tue, 2 Aug 2011 21:08:21 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id AAA27572; Wed, 03 Aug 2011 00:08:18 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1QoMCI-000I1O-BT; Wed, 03 Aug 2011 00:08:18 +0300 Message-ID: <4E386741.5030801@FreeBSD.org> Date: Wed, 03 Aug 2011 00:08:17 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:5.0) Gecko/20110706 Thunderbird/5.0 MIME-Version: 1.0 To: maestro something References: <4E2E9F60.1060808@FreeBSD.org> <4E33B7CF.90200@FreeBSD.org> <4E344D15.1040508@FreeBSD.org> <20110730192646.GC17489@deviant.kiev.zoral.com.ua> <4E386636.2000507@FreeBSD.org> In-Reply-To: <4E386636.2000507@FreeBSD.org> X-Enigmail-Version: 1.2pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Kostik Belousov , freebsd-stable@FreeBSD.org Subject: Re: dtrace ustack kernel panic X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2011 21:08:23 -0000 on 03/08/2011 00:03 Andriy Gapon said the following: > I tried to run dtruss (as you did) and I got this pre-amble before the assertion: > [some dtrace script body] > : probe description proc:::exit does not match any probes > > I guess that in my case I got it because my userland was not compiled with CTF > support. Not sure about yours... > > Of course, it's still rather bad that dtrace crashes when it prematurely exits. > But maybe it doesn't crash in the correct environment... I don't know. OK, here's a patch that should fix the abort via assertion - with this you shouldn't get the crash that you've reported. I hope that you will be able to tackle other conditions that dtrace considers to be errors. diff --git a/lib/libproc/proc_create.c b/lib/libproc/proc_create.c index c372a47..9bd24a2 100644 --- a/lib/libproc/proc_create.c +++ b/lib/libproc/proc_create.c @@ -79,12 +79,11 @@ proc_attach(pid_t pid, int flags, struct proc_handle **pphdl) else phdl->status = PS_STOP; +out: if (error) proc_free(phdl); else *pphdl = phdl; -out: - proc_free(phdl); return (error); } -- Andriy Gapon