From owner-freebsd-current@FreeBSD.ORG Sun Sep 25 22:50:55 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B1D6106566B for ; Sun, 25 Sep 2011 22:50:55 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 35CAB8FC13 for ; Sun, 25 Sep 2011 22:50:54 +0000 (UTC) Received: by wwe3 with SMTP id 3so5438759wwe.31 for ; Sun, 25 Sep 2011 15:50:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=IxazBEejr9hQbFG9XsTGYEHHKJC0Bsf5Mc/XhfG3kQE=; b=FG6qg+2GG42fzOI7/KSWLv0w18AIRQwUHOok2nXEsL9C+sD6bSf7EOizodg2UzicsO GO1DR02VyVtMU47aNFHvKqQbM0E+2bOIjgFJr9qtAN+Z0skRPhFSxo+7NyGjC/2xzDLY y7qa25Db0PGrJyJe9SISeR5e01XUrVYZ3bAOc= MIME-Version: 1.0 Received: by 10.227.72.138 with SMTP id m10mr6257015wbj.90.1316991054070; Sun, 25 Sep 2011 15:50:54 -0700 (PDT) Received: by 10.180.96.104 with HTTP; Sun, 25 Sep 2011 15:50:54 -0700 (PDT) Date: Sun, 25 Sep 2011 18:50:54 -0400 Message-ID: From: Ryan Stone To: FreeBSD Current Content-Type: text/plain; charset=ISO-8859-1 Subject: [PATCH] dtrace crashes when trying to trace fbt probes without CTF data X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Sep 2011 22:50:55 -0000 I get a panic if I try to run a dtrace script that uses an fbt probe from a module that does not have CTF data. The polling patch resolves the issue for me: Index: sys/cddl/dev/fbt/fbt.c =================================================================== --- sys/cddl/dev/fbt/fbt.c (revision 225756) +++ sys/cddl/dev/fbt/fbt.c (working copy) @@ -1261,7 +1261,7 @@ desc->dtargd_ndx = DTRACE_ARGNONE; /* Get a pointer to the CTF data and it's length. */ - if (linker_ctf_get(ctl, &lc) != 0) + if (linker_ctf_get(ctl, &lc) != 0 || lc.ctfoffp == NULL) /* No CTF data? Something wrong? *shrug* */ return; However, I'm not entirely sure whether this is the correct approach to fixing the problem(making linker_ctf_get() return an error seems to break dtrace entirely). Does anybody who has familiarity with dtrace's internals have an opinion?