From owner-freebsd-current@FreeBSD.ORG Sat Feb 9 22:37:06 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 62867FA2 for ; Sat, 9 Feb 2013 22:37:06 +0000 (UTC) (envelope-from andrey@zonov.org) Received: from mail-la0-x22b.google.com (mail-la0-x22b.google.com [IPv6:2a00:1450:4010:c03::22b]) by mx1.freebsd.org (Postfix) with ESMTP id DFA00B52 for ; Sat, 9 Feb 2013 22:37:05 +0000 (UTC) Received: by mail-la0-f43.google.com with SMTP id ek20so4865669lab.30 for ; Sat, 09 Feb 2013 14:37:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:x-enigmail-version:content-type :x-gm-message-state; bh=i6/F18MpZDkVRZIdzRQ9y93MzgAObKlBDqHfAJfyNlY=; b=hf8x8ftTxZhzaSurWTLOAU2JI4OofCZkFjTtbTKn7krF9tk8eBAN3JpYLrhRbCOw/8 qtNWh1QJfC2GctBaJUQyvln6x4D79vaNrYFgQQS652V8axUSFKCfUgSR0IBynEvuf8ck 8+pop2YuozhlZzOm0DF+bwbPCIk2GFQovPKlTh1VfhvaHYmLrf9fgEvgdd8AQBouWUvC zIpgXW9x2bYhJhS8Va6PXltZfImw6n/jzvfVZNLaFQglxQD3TsGwjR6BJWSOSF/jlHH8 dcb4Wl60Z0ClT7UmbKSMKktWjRd1Cj7wnJWAhFDpOGFYvb0KmnGbPuxDxQzErZCxlu2x CDOQ== X-Received: by 10.152.144.138 with SMTP id sm10mr8648143lab.53.1360449424547; Sat, 09 Feb 2013 14:37:04 -0800 (PST) Received: from zont-osx.local (ppp95-165-158-215.pppoe.spdop.ru. [95.165.158.215]) by mx.google.com with ESMTPS id gm20sm3426031lab.7.2013.02.09.14.37.02 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 09 Feb 2013 14:37:03 -0800 (PST) Sender: Andrey Zonov Message-ID: <5116CF8D.4020606@FreeBSD.org> Date: Sun, 10 Feb 2013 02:37:01 +0400 From: Andrey Zonov User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Mark Johnston Subject: Re: [patch] Userland DTrace References: <51152216.9080905@icritical.com> <20130209214715.GA1954@oddish> In-Reply-To: <20130209214715.GA1954@oddish> X-Enigmail-Version: 1.5 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2AFCLWRXLXTLBWBRDKPLU" X-Gm-Message-State: ALoCoQmfh2pi9TwdOxYj7PINF8agUlh4eJ95gJESKkZJd0DQgisH2B2oFf/2Sbiq2Vf6hUFDkQlZ Cc: freebsd-current@FreeBSD.org, Matt Burke X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2013 22:37:06 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2AFCLWRXLXTLBWBRDKPLU Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2/10/13 1:47 AM, Mark Johnston wrote: > On Fri, Feb 08, 2013 at 04:04:38PM +0000, Matt Burke wrote: >> I've been spending some time trying to get the fasttrap provider to wo= rk >> on FreeBSD without panicing. I believe I have succeeded, at least to t= he >> point where it's no longer panicing. >> >> There were two panic causes. The first was >> http://www.freebsd.org/cgi/query-pr.cgi?pr=3D165541 - the FreeBSD port= of >> fasttrap.c caused ftp_rcount to be left >0. To fix this I've got rid o= f >> the early return and reverted to the opensolaris way. >> >> A second panic then showed up intermittently when fasttrap_pid_cleanup= _cb >> was run while something in userland had locks. Using sx_try_xlock call= s >> has stopped the panics and shouldn't affect operation AFAICT. >=20 > I've run into this too. It can happen even when I'm not using DTrace > since fasttrap.ko is always loaded on my system. The problem is that > fasttrap_exec_exit() is called every time a process exits in this case;= > the caller acquires dtrace_lock, and the panic occurs when a callout > thread tries to acquire the lock at the same time. >=20 >> >> This is against r246454. >> >> >> Although this has fixed the panics for me, I'm finding a lot of stuff = just >> isn't actually working, with dtrace and the traced process just chewin= g >> CPU. Truss on the dtrace shows a heck of a lot of ptrace() calls and I= >> have no idea what the target is doing... CPU time is split 2:1 >> dtrace:target >=20 > Another panic can occur with an INVARIANTS kernel if a DTrace victim > process forks. I've supplied a patch which fixes this for me here: > http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dkern/171360 >=20 I think you have to carefully ping George, and if he won't answer go ahead with your patches. Someone has to take care of userland dtrace. --=20 Andrey Zonov ------enig2AFCLWRXLXTLBWBRDKPLU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.18 (Darwin) Comment: GPGTools - http://gpgtools.org iQEcBAEBAgAGBQJRFs+NAAoJEBWLemxX/CvTpDIIALJLGt6V53ksDmgHLB8jp08Y SpV37mK3MK1hFshV5W7qin4nQSHXdp2LW/sqw/qwn2JzgRULBKO1CVzOSlHRZfYV eNwjQ7qWjzfyjDMm7h1VVNe4MvdVY0CxMeTwF5Hdp0UxzhJTW+tQEiYuO9T3g9by elNRfz8Zts9zl2YaP99XKL5QYzWC07yZN4eT+ceOmhXajAuYwC7h8sPsuwS2tgIH QuNnDILdNRgXvhDBqBE2fi2Lf1ZsJArw8OPv9l6JgfdTGW93piwlimZTMe5k8LEG vwVjZT/zTeoezHPQyB1rfE4m7S0LOJw0jHhaZQyFFsjfNiR3ygWSsg2vZ7vc2MA= =TcxV -----END PGP SIGNATURE----- ------enig2AFCLWRXLXTLBWBRDKPLU--