From owner-freebsd-dtrace@FreeBSD.ORG Wed Jun 26 19:47:33 2013 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9C11059E for ; Wed, 26 Jun 2013 19:47:33 +0000 (UTC) (envelope-from as4idov@gmail.com) Received: from mail-qc0-x241.google.com (mail-qc0-x241.google.com [IPv6:2607:f8b0:400d:c01::241]) by mx1.freebsd.org (Postfix) with ESMTP id 61DA118DC for ; Wed, 26 Jun 2013 19:47:33 +0000 (UTC) Received: by mail-qc0-f193.google.com with SMTP id c1so4232154qcz.0 for ; Wed, 26 Jun 2013 12:47:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:x-google-sender-delegation:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=mp8hCU4MT8WS52JgzcvSYCCVbXmYJjk/asP1tFnc28g=; b=vPZ4YWlDMmF0qa4rWDURm7PJaEagC4hiWd4r0VBYm9t+hUt5OYmS+PgYi7wXoe/qHx shKXjm4NsSj4oHFYmv/OsDezDL61fISmNveEfDUX7Cl2A3cWHZrb8l02QT/KHy2bICOA ijDHFOlSKiagC3eEuX2M5+idgu+TSOuiWVWmCIS9RUcm1r03Q3aFXsMntCdvcM3k42Mu uYV0lg1qC9wrEAYPy8h5V0lC4qHc/sUxeb1jVvaJ5k8iOWm2GRaZHQBf1uKsVLsuiE8+ gRFGlDEVATbIEIE56A0CFxtYyVnYmiQlkxfNn07erKeMHqL0mLuGPBaKR1N3kWFdPrQI cljA== MIME-Version: 1.0 X-Received: by 10.229.172.10 with SMTP id j10mr1537002qcz.110.1372276052870; Wed, 26 Jun 2013 12:47:32 -0700 (PDT) Sender: xbro.aka.tj@gmail.com X-Google-Sender-Delegation: xbro.aka.tj@gmail.com Received: by 10.224.4.136 with HTTP; Wed, 26 Jun 2013 12:47:32 -0700 (PDT) Date: Wed, 26 Jun 2013 12:47:32 -0700 X-Google-Sender-Auth: hy1GVtsRwnlDlegDup2LYjv23Uc Message-ID: Subject: DTrace userland support doesn't work on post r219107 FreeBSD 8.x From: Akbar Saidov To: freebsd-dtrace@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.14 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: Wed, 26 Jun 2013 19:47:33 -0000 Hi Guys, George Neville-Neil suggested me to email this list describing the issue. I am currently working on backporting DTrace userland support to FreeBSD 8.2-Release from FreeBSD 9-Stable in an effort to evaluate the performance of our product, and perform an analysis and tracing of internal execution of our userland process. Some time ago I learned from Rui Paulo that this work was already done in FreeBSD 8.3 (r219107). To experiment, I installed FreeBSD 8.3-Release amd64, and recompiled the kernel and rebuilt the world per instructions provided here https://wiki.freebsd.org/Dtrace/ However, running the basic test in https://wiki.freebsd.org/DTrace/userlandfails in attempt to probe libc (or any system library) functions. (Note that the exact same issue happens when I manually backport userland support to FreeBSD 8.2-Release) # dtrace -s pid.d -c ./test test: failed to compile script pid.d: line 4: probe description pid2104:libc*:sleep:entry does not match any probes User signal 1 Similarly, probing stops and an application gets killed when its time to probe calls from ld-elf.so.1, libutil.so.8, libc.so.7, etc. Happens when you run: # dtrace -ln 'pid$target:::entry' -c date ID PROVIDER MODULE FUNCTION NAME 38195 pid2186 date usage entry 38196 pid2186 date badformat entry 38197 pid2186 date daysinmonth entry 38198 pid2186 date trans entry 38199 pid2186 date domktime entry 38200 pid2186 date adjhour entry 38201 pid2186 date adjyear entry 38202 pid2186 date adjmon entry 38203 pid2186 date adjday entry 38204 pid2186 date adjmin entry 38205 pid2186 date adjwday entry 38206 pid2186 date vary_destroy entry 38207 pid2186 date vary_append entry 38208 pid2186 date vary_apply entry 38209 pid2186 date netsettime entry 38210 pid2186 date _start entry 38211 pid2186 date main entry User signal 1 And, what is more strange, probing returns fails as well: # env DTRACE_DEBUG=1 dtrace -ln 'pid$target:::return' -c date Truncated debug output: ... libdtrace DEBUG: grabbed pid 2164 (cached) libdtrace DEBUG: date stret 0 0 0 0 libdtrace DEBUG: st_size of __do_global_dtors_aux is zero libdtrace DEBUG: st_size of frame_dummy is zero libdtrace DEBUG: st_size of __do_global_ctors_aux is zero libdtrace DEBUG: creating probe pid2164:date:usage:return libdtrace DEBUG: mr sparkle: Pread() failed libdtrace DEBUG: creating probe pid2164:date:badformat:return libdtrace DEBUG: mr sparkle: Pread() failed ... libdtrace DEBUG: creating probe pid2164:date:netsettime:return libdtrace DEBUG: mr sparkle: Pread() failed libdtrace DEBUG: creating probe pid2164:date:_start:return libdtrace DEBUG: mr sparkle: Pread() failed libdtrace DEBUG: creating probe pid2164:date:main:return libdtrace DEBUG: mr sparkle: Pread() failed libdtrace DEBUG: st_size of _fini is zero libdtrace DEBUG: st_size of _init is zero libdtrace DEBUG: st_size of _fini is zero libdtrace DEBUG: set context to pid2164:::return [0] prp=0x0 attr=[u/u/c] argc=0 libdtrace DEBUG: set label to libdtrace DEBUG: set label to ID PROVIDER MODULE FUNCTION NAME date: failed to match pid2164:::return: No probe matches description libdtrace DEBUG: killing pid 2164 User signal 1 Based on the email correspondence with Rui, he suspects that perhaps MFC wasn't done correctly, but currently doesn't have any idea of what is going on. I even tried FreeBSD 8-STABLE, and still same issue. I was hoping someone could shed some light and point me to a direction of how I can resolve this issue. I am open to any specific debugging suggestions you may have, and I will be glad to try them out to get you guys more information. I would very much appreciate any pointers. Thanks, -Akbar From owner-freebsd-dtrace@FreeBSD.ORG Thu Jun 27 01:12:11 2013 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EDC7C45F for ; Thu, 27 Jun 2013 01:12:11 +0000 (UTC) (envelope-from xbro.aka.tj@gmail.com) Received: from mail-la0-x22b.google.com (mail-la0-x22b.google.com [IPv6:2a00:1450:4010:c03::22b]) by mx1.freebsd.org (Postfix) with ESMTP id 7B5FB1AB7 for ; Thu, 27 Jun 2013 01:12:11 +0000 (UTC) Received: by mail-la0-f43.google.com with SMTP id gw10so143660lab.16 for ; Wed, 26 Jun 2013 18:12:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=C+i26UTPOh22mJpum9TousPY8PF6b5AxLLXbNudGavY=; b=shwbwC+DWht1Xclfugn7hJTEz4uzX+vseIJPtE9OsqwWN722gW9KMNGLtbvdWgacC2 wM8KOFh0TDNXbQzGDVi/bty28NOLU/RqteU2h4kiez92BwvWyNrQfoKkNVs6IK0YHrzd l+srm2z+ej5fBRXmqx49CWH64LKBYHaDvmnqYMRMdzCYZ5JXM6VwOQcUr1TYKKRA+DAo G0cectfDDzSYFCpbyCCZCdZPZmibwWqh9RhLdXE2cXg50MnchK9qFY2UNQg27I1U4B4Y Xagi5bwyeSo2HbBUCdJCM5O+FwOeKvaFaO5TFZc0+gKF1rHD+9aDhiMnv+eUCAz48JgM jLWw== MIME-Version: 1.0 X-Received: by 10.112.159.169 with SMTP id xd9mr3205028lbb.43.1372295530318; Wed, 26 Jun 2013 18:12:10 -0700 (PDT) Sender: xbro.aka.tj@gmail.com Received: by 10.112.171.195 with HTTP; Wed, 26 Jun 2013 18:12:10 -0700 (PDT) Date: Wed, 26 Jun 2013 18:12:10 -0700 X-Google-Sender-Auth: 0E6S7bvOSl85jWf2X5pD8NNAFRI Message-ID: Subject: Re: State of DTrace on FreeBSD From: Akbar Saidov To: freebsd-dtrace@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.14 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: Thu, 27 Jun 2013 01:12:12 -0000 > On fresh 8.4 install it's not possible to build a kernel or world WITH_CTF=1, build fails with WITH_CTF & WITHOUT_CTF can't both be set If I am not mistaken, I believe that issue is addressed in this revision http://svnweb.freebsd.org/base?view=revision&revision=241969 where it makes it possible to specify WITH_XXX in /etc/src.conf Regards, -Akbar From owner-freebsd-dtrace@FreeBSD.ORG Thu Jun 27 15:56:52 2013 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A02D1BAD for ; Thu, 27 Jun 2013 15:56:52 +0000 (UTC) (envelope-from gnn@freebsd.org) Received: from vps.hungerhost.com (vps.hungerhost.com [216.38.53.176]) by mx1.freebsd.org (Postfix) with ESMTP id 793561F64 for ; Thu, 27 Jun 2013 15:56:52 +0000 (UTC) Received: from [209.249.190.124] (port=52397 helo=gnnmac.hudson-trading.com) by vps.hungerhost.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.80.1) (envelope-from ) id 1UsEZ1-0003qU-37; Thu, 27 Jun 2013 11:56:51 -0400 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: State of DTrace on FreeBSD From: George Neville-Neil In-Reply-To: Date: Thu, 27 Jun 2013 11:56:56 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Akbar Saidov X-Mailer: Apple Mail (2.1508) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - freebsd.org X-Get-Message-Sender-Via: vps.hungerhost.com: authenticated_id: gnn@neville-neil.com Cc: freebsd-dtrace@freebsd.org X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.14 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: Thu, 27 Jun 2013 15:56:52 -0000 On Jun 26, 2013, at 21:12 , Akbar Saidov wrote: >> On fresh 8.4 install it's not possible to build a kernel or world > WITH_CTF=3D1, build fails with WITH_CTF & WITHOUT_CTF can't both be = set >=20 > If I am not mistaken, I believe that issue is addressed in this = revision > http://svnweb.freebsd.org/base?view=3Drevision&revision=3D241969 where = it makes > it possible to specify WITH_XXX in /etc/src.conf >=20 >=20 If you apply that locally does it fix your problem? I need to setup a = testing environment for 8.X and I don't have one to hand. Best, George From owner-freebsd-dtrace@FreeBSD.ORG Thu Jun 27 16:15:30 2013 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 0778E271 for ; Thu, 27 Jun 2013 16:15:30 +0000 (UTC) (envelope-from xbro.aka.tj@gmail.com) Received: from mail-la0-x22f.google.com (mail-la0-x22f.google.com [IPv6:2a00:1450:4010:c03::22f]) by mx1.freebsd.org (Postfix) with ESMTP id 85BEA1039 for ; Thu, 27 Jun 2013 16:15:29 +0000 (UTC) Received: by mail-la0-f47.google.com with SMTP id fe20so1055768lab.20 for ; Thu, 27 Jun 2013 09:15:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=wiqwnwGp9CiNH46z3D0hog8pEGN6gY4B4NHm/Z4OKRM=; b=Yugt3Iu39cDJgKef/36xjhoPvL28wOAay7KzAbEOBTls56j0x3gND5g01VGXUuBoPh Qgd+efOwzJalk8pf8VLyUy6NwqP2gGtBVH5G0Ro+TRi9N+q0WxfYa0azapL9/MI5kx1l xmYF7hh5uXSu67Y+P6H+0s9i/A37yJvxw6aRDQa2ihyErI5A5cU/Fa+eydU46YFwTW3T 7nnOUPAeJzxGVnF6Sqrs316GxKqgZ/ckt1wzZE4+UqEJxDKTE8gXESmQe8Nh/ftVbo4n MGMHf74PtLboWsxL9ZLdXOLBZ361Q3GOqYHpcITcphMxd0hD+Rfh2Rn37QHU0O6EgXO2 ogvQ== MIME-Version: 1.0 X-Received: by 10.152.120.136 with SMTP id lc8mr4423702lab.89.1372349728378; Thu, 27 Jun 2013 09:15:28 -0700 (PDT) Sender: xbro.aka.tj@gmail.com Received: by 10.112.171.195 with HTTP; Thu, 27 Jun 2013 09:15:28 -0700 (PDT) In-Reply-To: References: Date: Thu, 27 Jun 2013 09:15:28 -0700 X-Google-Sender-Auth: OjjJR7do0YX3i0i_FNZUpGVUY04 Message-ID: Subject: Fwd: State of DTrace on FreeBSD From: Akbar Saidov To: freebsd-dtrace@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.14 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: Thu, 27 Jun 2013 16:15:30 -0000 If you are referring to the problem I am experiencing (ie broken userland support), when I applied the fix locally, my problem still existed. On 8.3, where it is still possible to specify WITH_CTF=1 in command line, my problem still existed. On Thu, Jun 27, 2013 at 8:56 AM, George Neville-Neil wrote: > > On Jun 26, 2013, at 21:12 , Akbar Saidov wrote: > > >> On fresh 8.4 install it's not possible to build a kernel or world > > WITH_CTF=1, build fails with WITH_CTF & WITHOUT_CTF can't both be set > > > > If I am not mistaken, I believe that issue is addressed in this revision > > http://svnweb.freebsd.org/base?view=revision&revision=241969 where it > makes > > it possible to specify WITH_XXX in /etc/src.conf > > > > > > If you apply that locally does it fix your problem? I need to setup a > testing environment > for 8.X and I don't have one to hand. > > Best, > George > > > From owner-freebsd-dtrace@FreeBSD.ORG Sat Jun 29 20:42:42 2013 Return-Path: Delivered-To: dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B014ABC0 for ; Sat, 29 Jun 2013 20:42:42 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm5-vm4.bullet.mail.ne1.yahoo.com (nm5-vm4.bullet.mail.ne1.yahoo.com [98.138.91.165]) by mx1.freebsd.org (Postfix) with ESMTP id 6A01B1462 for ; Sat, 29 Jun 2013 20:42:39 +0000 (UTC) Received: from [98.138.90.57] by nm5.bullet.mail.ne1.yahoo.com with NNFMP; 29 Jun 2013 20:40:57 -0000 Received: from [98.138.226.129] by tm10.bullet.mail.ne1.yahoo.com with NNFMP; 29 Jun 2013 20:40:57 -0000 Received: from [127.0.0.1] by smtp216.mail.ne1.yahoo.com with NNFMP; 29 Jun 2013 20:40:57 -0000 X-Yahoo-Newman-Id: 683162.18050.bm@smtp216.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: ASYxG9UVM1msbxNS8GXZlL0QTTANDn1PWl1ExZor2k4htdz 0yensXZUiktgHyAlZa4cNdkddKl2.uhahV9cMHdaTgrGp8v3jwwtjE.0tFLQ pb7mn499qJalQ6fpChySXIG3WdWNiTc_zU18wWYZcv5hDiN8GnPLBwQSUXUV rlCt5lTtxa3xQzGf2PIFqGEd_T8uiR7qUtJH4sxxP3aMiEmDK4OxKPnnKPFp 3XkvAI60DPbl9qleoN8b1i2CoBzjjsJEdrAoVL7K.kRpfIYkjUWQ9HpD1Zzc 9vxTyHgJ1TDtdHqyQK_WrD.wMLOorkKQGXQAkgKXCvOJDqJlBFDg1u2zPbjJ maPr2_NiNMK7FaZ21K077xcg9ljmCH52pnv6kPmMfb8LnRRopZQk74T__wOR wdj3Z.UDuiDyRdg87q.IAEPvcIPmqjW.7kiZgQr6ItDl._PjhvZCnWum40ER 3QTAtJvMWb8DIZoiC0l_nCjBhdlDSnjo8_HjsEYw2v1SpuVNgaGTUNYBkCvH sZ8yJ7QNs8YtzvRgrBCzGaPJU094opzR5XA_ruJIhl.MjwouBSOL.4MK8e53 vUQzVILOcHHfMKYPy7AnQdm.wi1rWUezLAVS_366exj0DzUyW06x5Qjt3PyV 70c5o6NizvC6LRyaB.k4pMD.soD6GsF_nWgf3cbERkuVG5Wszghzme_NlDJB .Xm6aHaKwM8j8bWnxOMQInj8CLX7xYuiYAs8SmI9GJFJblUhIGsbEXpzkO_w FqS6Gz01koInvSKNP0oS8qqPMozNC1pXZYlrZcSVeJyMBolwQIj6pVTnvxcB a X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf X-Rocket-Received: from [192.168.0.102] (pfg@190.157.126.109 with ) by smtp216.mail.ne1.yahoo.com with SMTP; 29 Jun 2013 13:40:57 -0700 PDT Message-ID: <51CF4657.9060101@FreeBSD.org> Date: Sat, 29 Jun 2013 15:40:55 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130611 Thunderbird/17.0.6 MIME-Version: 1.0 To: dtrace@FreeBSD.org Subject: Help with libstdc++ DTrace provider Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.14 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, 29 Jun 2013 20:42:42 -0000 Hello; Sometime ago I found this patch for Apple's Darwin: http://www.opensource.apple.com/source/libstdcxx/libstdcxx-39/patches-4.2.1/dtrace.patch It appears to be the basis of a libstdc++ provider: there are some probes where exceptions are generated. The patch to our contrib/libstdc++ is this: http://people.freebsd.org/~pfg/patches/dtrace/libstdc++.patch However when I follow the instructions in: libstdc++/config/os/bsd/freebsd/dtrace_cxa_runtime.d it fails: dtrace -C -h -s dtrace_cxa_runtime.d -o dtrace_cxa_runtime.h dtrace: failed to compile script dtrace_cxa_runtime.d: "/usr/lib/dtrace/errno.d", line 2: type redeclared: struct devinfo Anyone knows what is missing/failing and how to fix this? Thanks in advance, Pedro.