From owner-freebsd-dtrace@freebsd.org Tue May 23 20:25:43 2017 Return-Path: Delivered-To: freebsd-dtrace@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53525D7B091 for ; Tue, 23 May 2017 20:25:43 +0000 (UTC) (envelope-from longwitz@incore.de) Received: from dss.incore.de (dss.incore.de [195.145.1.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B6B416E3 for ; Tue, 23 May 2017 20:25:42 +0000 (UTC) (envelope-from longwitz@incore.de) Received: from secmail.incore.de (inetdssm.dmz [10.11.0.4]) by dss.incore.de (Postfix) with ESMTP id B174F67A4A; Tue, 23 May 2017 22:25:33 +0200 (CEST) Received: from lolap.longwitz (87-57-220-129-dynamic.dk.customer.tdc.net [87.57.220.129]) by secmail.incore.de (Postfix) with ESMTPS id 857E067A2F; Tue, 23 May 2017 22:25:33 +0200 (CEST) Message-ID: <59249ABA.4020404@incore.de> Date: Tue, 23 May 2017 22:25:30 +0200 From: Andreas Longwitz User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:15.0) Gecko/20120917 Thunderbird/15.0.1 MIME-Version: 1.0 To: Domagoj Stolfa , freebsd-dtrace@freebsd.org Subject: Re: fbt:kernel:breadn_flags:entry): invalid address (0x0) in action #7 References: <591E01F5.8080208@incore.de> <6A020677-BC76-41E1-8372-10B7962F4EDE@apple.com> <20170518204534.GA37126@wraith> <20170518235207.GB37643@wkstn-mjohnston.west.isilon.com> <5921F56F.7090509@incore.de> <20170521210051.GA43039@vulture.cbsd.home> <5922CEFC.8020306@incore.de> <20170522120326.GA45031@vulture.cbsd.home> In-Reply-To: <20170522120326.GA45031@vulture.cbsd.home> 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.23 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, 23 May 2017 20:25:43 -0000 > > Could you please supply the full script please? It might give some clue as to > where the problem is. > I have found my mistake: "action #7" means line 7 in the probe and has nothing to do with the parameters of the probed function. So I could handle this NULL-problem and now my probe fires correct. This is the (corrected) probe: fbt::breadn_flags:entry /self->bread && args[6] == 0/ { this->bread_vnode = args[0]; this->bread_blkno = (unsigned long)args[1]; this->bread_inode = (struct inode *)(this->bread_vnode->v_data); this->bread_inum = this->bread_inode->i_number; this->bread_gj = this->bread_vnode->v_mount->mnt_gjprovider != NULL ? stringof(this->bread_vnode->v_mount->mnt_gjprovider) : ""; printf(" gj=%s, inum=%u, blkno=%lu\n", this->bread_gj, this->bread_inum, this->bread_blkno ); } and now it fires like this: 1 31371 breadn_flags:entry gj=, inum=0, blkno=320 Thaks for help!