From owner-freebsd-dtrace@FreeBSD.ORG Mon Dec 8 15:39:47 2014 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE17F15D for ; Mon, 8 Dec 2014 15:39:47 +0000 (UTC) Received: from mail-wi0-x233.google.com (mail-wi0-x233.google.com [IPv6:2a00:1450:400c:c05::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6C51E1CF for ; Mon, 8 Dec 2014 15:39:47 +0000 (UTC) Received: by mail-wi0-f179.google.com with SMTP id ex7so5187284wid.0 for ; Mon, 08 Dec 2014 07:39:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=6vnE3SHwDewsHBn2K7B4c8w4FcRdLBhDfnczUZll8/0=; b=ixjdjWhdVG6+Kq5Rv4Ns3pTSpD3V0RghuitW9OBGHxdEdOieDmgeQm26z3LrQaLURe Yfeepa8Jn/z6N/uZjazZnsTUELxW1JdYRBKWDyAQggeyEPEIg5DLgAHOQKqx3N4us938 u1ZHuBWvaNFCkMoe0OUqcjnL/RV9Qie+ZuqSmNG9IC2EcPQ5X1GNxynUZMnZ1ng/4PDb k9NJy5t/QWptIXNEXOAkYqenHrO+zHY+xQ6bJgHUuKPydB6lYi77nDhx5jR2kkDYsxIR dk686IzZo0WvvZ04JIFyF/RbhPueejOsm/SnV3yIradHxdzkE4BcovHFTrFd3THstJne jnRQ== X-Received: by 10.180.82.226 with SMTP id l2mr24586662wiy.61.1418053185789; Mon, 08 Dec 2014 07:39:45 -0800 (PST) Received: from ?IPv6:2001:470:1f0b:408:c16f:5efc:fabd:821a? ([2001:470:1f0b:408:c16f:5efc:fabd:821a]) by mx.google.com with ESMTPSA id bo18sm10225021wib.11.2014.12.08.07.39.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Dec 2014 07:39:45 -0800 (PST) Sender: ultramage Message-ID: <5485C63E.3090002@gmail.com> Date: Mon, 08 Dec 2014 16:39:42 +0100 From: =?UTF-8?B?VmlrdG9yIMWgdHVqYmVy?= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: freebsd-dtrace@freebsd.org Subject: missing system struct definitions during compilation files in /usr/lib/dtrace/ in local releng/10.1 build Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.18-1 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: Mon, 08 Dec 2014 15:39:48 -0000 I was running releng/10.0 from 10-jul-2014 and dtrace was working fine. I built/installed releng/10.1 from 07-dec-2014 and now when running "dtrace -s anyfile", even an empty file, it prints the following errors: dtrace: failed to compile script test.d: "/usr/lib/dtrace/tcp.d", line 166: operator -> cannot be applied to a forward declaration: no struct tcpcb definition is available (same with io.d struct devstat and struct bio) I tried a clean install of release/10.1 from the 12-nov-2014 iso file, and it works fine there. There doesn't seem to have been any changes to the branch since the release. I went through all the directories in / and /usr, making sure there are no stale config/header/lib files, and that the contents of all existing config/header files is identical to the clean version (plusminus my custom changes). I also temporarily moved the entire /usr/local tree to make sure its contents don't interfere; did not help. Finally I tried just shoving the missing system C header information into the D code, which might have worked, but after the 5th time I got tired of it. I would like to fix this problem without doing a full system reinstall. However at this point I'm stuck. I don't know how to make the D compiler built into dtrace to print diagnostic information about the build process. I'm not even sure what exactly the compiler is trying to do - does it parse the system C headers (possibly indicating an INCLUDE path problem)? But I think I checked all the files... Maybe something went wrong during buildworld and the executable itself is broken? From owner-freebsd-dtrace@FreeBSD.ORG Mon Dec 8 23:08:12 2014 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DBF3E8C2 for ; Mon, 8 Dec 2014 23:08:12 +0000 (UTC) Received: from mail-ie0-x231.google.com (mail-ie0-x231.google.com [IPv6:2607:f8b0:4001:c03::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A3D9DE2B for ; Mon, 8 Dec 2014 23:08:12 +0000 (UTC) Received: by mail-ie0-f177.google.com with SMTP id rd18so5271172iec.8 for ; Mon, 08 Dec 2014 15:08:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ZDb5nD9vRCu+IwNhEsuK4F2taOQo4lzzEVQyadPMZxM=; b=GwNm9vjeKjSuOulAtWRBYmD9/jhwczZxIV/SuXBdksByzwtPJa8yA4hMFetADzvi6/ H5r/iWWKJ76SiTm3s64pAl0o9FcgFOOITo03mfQ5DU/JHMIQ18zP9twT/JcyEqIzxaNi 4QViPMbmdfJJisebI9LfivwKaza1kYOOPwwkuUoWBse4T2PMrLm54dpIAaJd5eVbaYrx 0e5zkXVEwNv6pzFUw1DSs0C6/AFm/zpLiwPBnDp7/IZutGP023oHS5G/HdywVFk0Op9y 4GX8hTuUVPwqqv9c2eokUtiW88P++Vg40UIz2ySN31i+hzHQzIezw/bIByhSA/D0XDlJ iLsA== MIME-Version: 1.0 X-Received: by 10.50.137.65 with SMTP id qg1mr17277975igb.37.1418080092187; Mon, 08 Dec 2014 15:08:12 -0800 (PST) Received: by 10.107.10.31 with HTTP; Mon, 8 Dec 2014 15:08:12 -0800 (PST) In-Reply-To: <5485C63E.3090002@gmail.com> References: <5485C63E.3090002@gmail.com> Date: Mon, 8 Dec 2014 18:08:12 -0500 Message-ID: Subject: Re: missing system struct definitions during compilation files in /usr/lib/dtrace/ in local releng/10.1 build From: Ryan Stone To: =?UTF-8?Q?Viktor_=C5=A0tujber?= Content-Type: text/plain; charset=UTF-8 Cc: "freebsd-dtrace@freebsd.org" X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.18-1 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: Mon, 08 Dec 2014 23:08:13 -0000 dtrace gets the structure definitions from CTF debugging data in the kernel image. Did you use a custom kernel configuraton file? Make sure that you have these lines in your kernel config: makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions WITH_CTF=1 # Run ctfconvert(1) for DTrace support From owner-freebsd-dtrace@FreeBSD.ORG Tue Dec 9 00:14:38 2014 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 772274C4 for ; Tue, 9 Dec 2014 00:14:38 +0000 (UTC) Received: from mail-wi0-x236.google.com (mail-wi0-x236.google.com [IPv6:2a00:1450:400c:c05::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 078DA813 for ; Tue, 9 Dec 2014 00:14:38 +0000 (UTC) Received: by mail-wi0-f182.google.com with SMTP id h11so44626wiw.15 for ; Mon, 08 Dec 2014 16:14:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=CA1apwvV8ubXoSrd0zmdHJcvXlxEbvyijeeLkdq1DR0=; b=z59xnIx3mH3z/BX4eO6t4+rq0BQPNsehkwf/+LtqRO2htpIw5AHb91gM4HFze3lUyz Ft63vDoZ3gnr48roKWa2hXRZ04p9RafJ7HJvxwCoZYbVyg2pO/x1efo2i59GsfZgI6Lz sOOfhRd+8jB+5HBx083UzJ0lWxwFL/lkWFNjhM2zgTevbu29cn2z7pZgrmI4U/BSz0yo Y7Fl1OD4i/A81b8d9Gd75PE06PqwT9poBoyV4pbjQ7Zq2IU4Id93D/YhKuhWsJ1QYEkV q6eoSzNxkAh67B5kr4QWyOJkSgpFfA6USB4OPdobCXkw73u7gfcbpoBhpw0Iuw37zGXq m8MA== X-Received: by 10.194.81.38 with SMTP id w6mr113592wjx.17.1418084076366; Mon, 08 Dec 2014 16:14:36 -0800 (PST) Received: from ?IPv6:2001:470:1f0b:408:c16f:5efc:fabd:821a? ([2001:470:1f0b:408:c16f:5efc:fabd:821a]) by mx.google.com with ESMTPSA id d2sm58491387wjs.32.2014.12.08.16.14.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Dec 2014 16:14:35 -0800 (PST) Sender: ultramage Message-ID: <54863EE8.8050603@gmail.com> Date: Tue, 09 Dec 2014 01:14:32 +0100 From: =?UTF-8?B?VmlrdG9yIMWgdHVqYmVy?= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Ryan Stone Subject: Re: missing system struct definitions during compilation files in /usr/lib/dtrace/ in local releng/10.1 build References: <5485C63E.3090002@gmail.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "freebsd-dtrace@freebsd.org" X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.18-1 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: Tue, 09 Dec 2014 00:14:38 -0000 I built the kernel using 'make buildkernel' using a kernconf derived from GENERIC, only difference is some 'device' entries added and removed. I did keep a backup of the old kernel, so I ran ctfdump -S on both of them: old: total number of struct members = 38700 new: total number of struct members = 528 So there's definitely something to this. If all else fails, I'll remove make.conf / src.conf and build GENERIC to see if I can get a baseline setup that works. From owner-freebsd-dtrace@FreeBSD.ORG Tue Dec 9 00:19:16 2014 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39A4C52F for ; Tue, 9 Dec 2014 00:19:16 +0000 (UTC) Received: from mail-qa0-x231.google.com (mail-qa0-x231.google.com [IPv6:2607:f8b0:400d:c00::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DF98B83D for ; Tue, 9 Dec 2014 00:19:15 +0000 (UTC) Received: by mail-qa0-f49.google.com with SMTP id s7so4052231qap.8 for ; Mon, 08 Dec 2014 16:19:15 -0800 (PST) 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:content-transfer-encoding :in-reply-to:user-agent; bh=FvQuLKQZpSpICI7OxFztYULrWOapEPurAOUO6JXFwvs=; b=eG83b5A4z4rB/EbD49BazXY3I6ABSf3xULLHMSrPgpgJomC1wsLIfKewrMVHI+AxVz NYsvbjrvwUuxDDXhSEpNpGrrtKqlmdFXVDIHJPHeO8NujSLOFqHZgrvbjVoEyLWHV189 MJfZ34e9ADFPbn7+vsSEd0Bypj0SjMDNcnsqGas48pWyUc1dTkm5X6IOA1mDAyzP2NzD 9i4AsWrroZwr2OGLWgO7yIC3OJ34cpDkVdqBjd2NO/Po40J1KTYVRnucuz7Xl9eEdy3U PfM1hUOhyemzejt3kVnvpECeT6yeicCjAnh2J429jSz/nj+ZsIxpBFouHOd/rJT9sC1i mWIA== X-Received: by 10.140.88.100 with SMTP id s91mr152144qgd.65.1418084355014; Mon, 08 Dec 2014 16:19:15 -0800 (PST) Received: from ip-172-31-25-62.ec2.internal (ec2-54-85-57-1.compute-1.amazonaws.com. [54.85.57.1]) by mx.google.com with ESMTPSA id 90sm12001309qgk.42.2014.12.08.16.19.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Dec 2014 16:19:14 -0800 (PST) Sender: Mark Johnston Date: Tue, 9 Dec 2014 00:27:01 +0000 From: Mark Johnston To: Viktor =?utf-8?Q?=C5=A0tujber?= Subject: Re: missing system struct definitions during compilation files in /usr/lib/dtrace/ in local releng/10.1 build Message-ID: <20141209002701.GA41582@ip-172-31-25-62.ec2.internal> References: <5485C63E.3090002@gmail.com> <54863EE8.8050603@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <54863EE8.8050603@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "freebsd-dtrace@freebsd.org" X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.18-1 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: Tue, 09 Dec 2014 00:19:16 -0000 On Tue, Dec 09, 2014 at 01:14:32AM +0100, Viktor Ć tujber wrote: > I built the kernel using 'make buildkernel' using a kernconf derived > from GENERIC, only difference is some 'device' entries added and > removed. I did keep a backup of the old kernel, so I ran ctfdump -S on > both of them: > > old: total number of struct members = 38700 > new: total number of struct members = 528 > > So there's definitely something to this. If all else fails, I'll remove > make.conf / src.conf and build GENERIC to see if I can get a baseline > setup that works. Can you try recompiling the 10.1 kernel? There were some changes in the transition from clang 3.3 to 3.4 which broke the ctf tools. If the 10.1 kernel was built with the 10.0 ctf* tools, it'll have malformed CTF data; rebuilding the kernel a second time should fix it, since you'd be using the 10.1 tools. From owner-freebsd-dtrace@FreeBSD.ORG Tue Dec 9 02:09:32 2014 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF35C96C; Tue, 9 Dec 2014 02:09:32 +0000 (UTC) Received: from mail-wg0-x236.google.com (mail-wg0-x236.google.com [IPv6:2a00:1450:400c:c00::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 76F31633; Tue, 9 Dec 2014 02:09:32 +0000 (UTC) Received: by mail-wg0-f54.google.com with SMTP id l2so7652609wgh.41 for ; Mon, 08 Dec 2014 18:09:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=xzcrIk4NeCUWnaf1h3WXmp80S/1rvcT/MSTa9NFdC9s=; b=v1pS3blXfHL7M6PSOs+HBUa5AfauXYOq6EgDLkIDAYKJwscVaB+Fkgv8VxT9DVOXMh xLfcmoeIaK5jSDk9kYa3EJPraGCqRyb/9os1Jzzwu1Z2zKcT3yuYy08RiFKiYn8LNj9B rxF5X5MndBp0WhTGCeGIrDOjbhSxtx1cOfAykGQ5X7RZ+8pzDekbDbFs+YhyYFykxyb9 tGiZDOJ7jJtns2OcE6alSOfVinCQGxXze8/7POz+vBV/9ve8FjLxlhr1yO/Klj2GTIy2 ATqJMgtZuajD967nMot0CYMXMfwruBU78FlJWXh5Y/cD/faGQImGhiDHC5+I00at0lfH w2jw== X-Received: by 10.194.6.199 with SMTP id d7mr691231wja.124.1418090970866; Mon, 08 Dec 2014 18:09:30 -0800 (PST) Received: from ?IPv6:2001:470:1f0b:408:c16f:5efc:fabd:821a? ([2001:470:1f0b:408:c16f:5efc:fabd:821a]) by mx.google.com with ESMTPSA id r10sm11894063wiy.13.2014.12.08.18.09.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Dec 2014 18:09:30 -0800 (PST) Sender: ultramage Message-ID: <548659D7.4010104@gmail.com> Date: Tue, 09 Dec 2014 03:09:27 +0100 From: =?UTF-8?B?VmlrdG9yIMWgdHVqYmVy?= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Mark Johnston Subject: Re: missing system struct definitions during compilation files in /usr/lib/dtrace/ in local releng/10.1 build References: <5485C63E.3090002@gmail.com> <54863EE8.8050603@gmail.com> <20141209002701.GA41582@ip-172-31-25-62.ec2.internal> In-Reply-To: <20141209002701.GA41582@ip-172-31-25-62.ec2.internal> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "freebsd-dtrace@freebsd.org" X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.18-1 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: Tue, 09 Dec 2014 02:09:33 -0000 Yes, that was the solution, thank you very much! It was surprising to find out that an executable outside of the kernel-toolchain is used to build the kernel. But I guess a line has to be drawn somewhere (only the entire output of 'buildworld' is guaranteed to cover everything ... which I wouldn't mind too much since I normally build them together :) On 9. 12. 2014 1:27, Mark Johnston wrote: > Can you try recompiling the 10.1 kernel? There were some changes in > the transition from clang 3.3 to 3.4 which broke the ctf tools. If the > 10.1 kernel was built with the 10.0 ctf* tools, it'll have malformed > CTF data; rebuilding the kernel a second time should fix it, since > you'd be using the 10.1 tools.