Running DTrace Userland probes at times terminates traced process

Shrikanth Kamath shrikanth07 at gmail.com
Sun Oct 18 16:33:05 UTC 2015


Thanks Mark, appreciate it.

--
Shrikanth R K

On Sat, Oct 17, 2015 at 1:39 PM, Mark Johnston <markj at freebsd.org> 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 at bsdvm#dtrace -ln 'pid$target::*:entry' -p <pid of login>
>>
>> root at bsdvm:~ # ps
>>  PID TT  STAT    TIME COMMAND
>> 1820 u0  Ss   0:00.02 login [pam] (login)
>> ...
>>
>> root at bsdvm:~ # uname -a
>> FreeBSD bsdvm 10.2-STABLE FreeBSD 10.2-STABLE #0 r286878: Tue Aug 18
>> 22:14:16 UTC 2015
>> root at 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


More information about the freebsd-dtrace mailing list