From owner-freebsd-dtrace@freebsd.org Sat Oct 17 20:39:47 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 6E684A17F46 for ; Sat, 17 Oct 2015 20:39:47 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qg0-x22a.google.com (mail-qg0-x22a.google.com [IPv6:2607:f8b0:400d:c04::22a]) (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 402A3D52 for ; Sat, 17 Oct 2015 20:39:47 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by qgeo38 with SMTP id o38so83932120qge.0 for ; Sat, 17 Oct 2015 13:39:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=T2XuOql14XkycD1Jg0S2yZLSUGv2GOpPfT4i8Nyw41w=; b=NH3QSdU0ZZxm5XlFj2+CZFTvzK6GQehiWVKpfBPPEF7lPpNbR3dgql43GNJvFXMS8w XVAHXB44JR89VKLCzfQ+EJgPMzYleEzzX0bZp7mhRQIV+getLXofWDDyEvEuQeioY7FT o+bq61V5Agqlh80BvzTP7OuqtfOqGb7OFMnhTgd6ZPunOwOLA9g+VgdxWHAe8WbD7n+i 6iZlEXEWRxOmjxkGErOOWASEDw5p1A5wTWWYS6EMx8JeKBhLMIVZRaqdPBomJLq5oTWn sVUcXgoAVCAwlYoLs+sqxd+bAdzVBaXdw4F9ux2MhPc5Ixt3nix0vNrsan9yPB6zYudy CkZA== X-Received: by 10.141.28.21 with SMTP id f21mr28766985qhe.13.1445114386146; Sat, 17 Oct 2015 13:39:46 -0700 (PDT) Received: from charmander.corp.emc.com ([50.245.130.59]) by smtp.gmail.com with ESMTPSA id k193sm10712567qhc.34.2015.10.17.13.39.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Oct 2015 13:39:45 -0700 (PDT) Sender: Mark Johnston Date: Sat, 17 Oct 2015 13:39:38 -0700 From: Mark Johnston To: Shrikanth Kamath Cc: freebsd-dtrace@freebsd.org Subject: Re: Running DTrace Userland probes at times terminates traced process Message-ID: <20151017203938.GA46117@charmander.corp.emc.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) 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: Sat, 17 Oct 2015 20:39:47 -0000 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.