From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 23 12:08:47 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24C17106564A for ; Sat, 23 Jul 2011 12:08:47 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay04.ispgateway.de (smtprelay04.ispgateway.de [80.67.31.32]) by mx1.freebsd.org (Postfix) with ESMTP id D815D8FC1B for ; Sat, 23 Jul 2011 12:08:46 +0000 (UTC) Received: from [78.34.168.76] (helo=fabiankeil.de) by smtprelay04.ispgateway.de with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1QkaqV-0003Qo-H8; Sat, 23 Jul 2011 13:58:15 +0200 Date: Sat, 23 Jul 2011 13:56:55 +0200 From: Fabian Keil To: Yuri Message-ID: <20110723135655.4479d190@fabiankeil.de> In-Reply-To: <20110722202811.17302hol2s3ar084@newwebmail.rawbw.com> References: <20110722202811.17302hol2s3ar084@newwebmail.rawbw.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/La3w/NOhAik5nd.B9i5=6FC"; protocol="application/pgp-signature" X-Df-Sender: 775067 Cc: freebsd-hackers@freebsd.org Subject: Re: DTrace script asserts and kills the other process X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jul 2011 12:08:47 -0000 --Sig_/La3w/NOhAik5nd.B9i5=6FC Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Yuri wrote: > I am trying to run this dtrace script: >=20 > #!/usr/sbin/dtrace -s > pid123:libc::entry > { > self->timestmp[probefunc] =3D timestmp; > } > pid123:libc::return > /self->timestmp[probefunc] !=3D 0/ > { > @function_duration[probefunc] =3D sum(timestmp - > self->timestmp[probefunc]); timestmp[probefunc] =3D 0; > } >=20 > which I got from here: =20 > http://www.princeton.edu/~unix/Solaris/troubleshoot/dtrace.html > replacing 123 with the pid of some running process. >=20 > Result: dtrace utility asserts: > Assertion failed: (dpr !=3D NULL), file =20 > /usr/src/cddl/lib/libdtrace/../../../cddl/contrib/opensolaris/lib/libdtra= ce/common/dt_proc.c, > line 751. > Abort trap: 6 >=20 > Also the target process is killed too: > Killed: 9 >=20 > 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=3Dbin/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 --Sig_/La3w/NOhAik5nd.B9i5=6FC Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iEYEARECAAYFAk4qtwkACgkQBYqIVf93VJ2jDQCgn7hufjUgcKelrwWUxPujOswH nagAoMwD1X9mpR14L9TG72YO7ox9hFtS =ljLh -----END PGP SIGNATURE----- --Sig_/La3w/NOhAik5nd.B9i5=6FC--