From owner-freebsd-dtrace@freebsd.org Sun Oct 18 16:33:05 2015 Return-Path: Delivered-To: freebsd-dtrace@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDA29A18F94 for ; Sun, 18 Oct 2015 16:33:05 +0000 (UTC) (envelope-from shrikanth07@gmail.com) Received: from mail-yk0-x22c.google.com (mail-yk0-x22c.google.com [IPv6:2607:f8b0:4002:c07::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 81908F74; Sun, 18 Oct 2015 16:33:05 +0000 (UTC) (envelope-from shrikanth07@gmail.com) Received: by ykdz2 with SMTP id z2so38689715ykd.3; Sun, 18 Oct 2015 09:33:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=P2N2zXv1PUsimyByFIxHGFtv5Hwvc/nCEVOi1RNvaQ4=; b=ATDYdQOAdJSr1D185rOWGj9Wz0vP43P8WhK5aJQbdLzIiRhYVkMiHga2jA8iZAhBlU 3/0ZCoeTDXsDGhzCA9A7U48XYAEl4ySL2sHDD0ulJZkkhIUkg2M+G9G47Ec/R1+dc+XR FEdgKbbbulgm+E5TIWy9TctJBgrGOgYoUIW+mFp+y4lyupdeBxvruWXFldUo6FajopaF F7zXEeARiSZhl9gYRfo4IPiUADBIVM93fKS74HClDN3nD9y9msOK6saIfTQEMzAsVn/L wzBZ3HQnvnsU4bJmBOCfKE1JfWNKkxW2DbWKCI006mbTxaxz4TBiIOn440750yCMokPm uJkg== MIME-Version: 1.0 X-Received: by 10.13.216.212 with SMTP id a203mr16747846ywe.112.1445185984367; Sun, 18 Oct 2015 09:33:04 -0700 (PDT) Received: by 10.129.88.70 with HTTP; Sun, 18 Oct 2015 09:33:04 -0700 (PDT) In-Reply-To: <20151017203938.GA46117@charmander.corp.emc.com> References: <20151017203938.GA46117@charmander.corp.emc.com> Date: Sun, 18 Oct 2015 09:33:04 -0700 Message-ID: Subject: Re: Running DTrace Userland probes at times terminates traced process From: Shrikanth Kamath To: Mark Johnston Cc: freebsd-dtrace@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 16:33:05 -0000 Thanks Mark, appreciate it. -- Shrikanth R K On Sat, Oct 17, 2015 at 1:39 PM, Mark Johnston wrote: > On Thu, Oct 15, 2015 at 10:53:00PM -0700, Shrikanth Kamath wrote: >> It maybe a non issue but wanted to check with the forum, >> >> I am running the following dtrace one liner on the login process >> >> root@bsdvm#dtrace -ln 'pid$target::*:entry' -p >> >> root@bsdvm:~ # ps >> PID TT STAT TIME COMMAND >> 1820 u0 Ss 0:00.02 login [pam] (login) >> ... >> >> root@bsdvm:~ # uname -a >> FreeBSD bsdvm 10.2-STABLE FreeBSD 10.2-STABLE #0 r286878: Tue Aug 18 >> 22:14:16 UTC 2015 >> root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC i386 >> >> >> But before it can finish listing all the probes I issue a CTRL-C and >> thereby stopping dtrace. This results in terminating the login >> process. >> >> When I ran ktrace on dtrace I see it does a PT_ATTACH but since I do >> not allow to run it to completion and terminate early it fails to do a >> clean PT_DETACH thereby terminating the traced process. >> >> May not be an issue if we don't kill DTrace after it has done a PT_ATTACH... > > A fix for this has been MFCed to stable/10 in r289468. -- -- Shrikanth R K