DTrace script asserts and kills the other process

Fabian Keil freebsd-listen at fabiankeil.de
Sat Jul 23 12:08:47 UTC 2011


Yuri <yuri at rawbw.com> wrote:

> I am trying to run this dtrace script:
> 
> #!/usr/sbin/dtrace -s
> pid123:libc::entry
> {
> self->timestmp[probefunc] = timestmp;
> }
> pid123:libc::return
> /self->timestmp[probefunc] != 0/
> {
> @function_duration[probefunc] = sum(timestmp -
> self->timestmp[probefunc]); timestmp[probefunc] = 0;
> }
> 
> which I got from here:  
> http://www.princeton.edu/~unix/Solaris/troubleshoot/dtrace.html
> replacing 123 with the pid of some running process.
> 
> Result: dtrace utility asserts:
> Assertion failed: (dpr != NULL), file  
> /usr/src/cddl/lib/libdtrace/../../../cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c,
> line 751.
> Abort trap: 6
> 
> Also the target process is killed too:
> Killed: 9
> 
> 8.2-STABLE amd64

This is a known issue. You may be able to work around it by
letting dtrace start the traced process.

There's already a PR about it:
http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/158431
but the limitation isn't mentioned in the wiki:
http://wiki.freebsd.org/DTrace/userland

It's not clear to me if this has worked in the past or if it
works for other architectures (the reporter and I are both using
amd64, too).

Fabian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20110723/b6e21777/signature.pgp


More information about the freebsd-hackers mailing list