From owner-freebsd-dtrace@freebsd.org Tue Sep 5 11:05:03 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 B500FE02EEF for ; Tue, 5 Sep 2017 11:05:03 +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 79EC1733AB for ; Tue, 5 Sep 2017 11:05:03 +0000 (UTC) (envelope-from longwitz@incore.de) Received: from inetmail.dmz (inetmail.dmz [10.3.0.3]) by dss.incore.de (Postfix) with ESMTP id 0243167898 for ; Tue, 5 Sep 2017 12:58:24 +0200 (CEST) X-Virus-Scanned: amavisd-new at incore.de Received: from dss.incore.de ([10.3.0.3]) by inetmail.dmz (inetmail.dmz [10.3.0.3]) (amavisd-new, port 10024) with LMTP id 0-cqYs6_Pvz0 for ; Tue, 5 Sep 2017 12:58:23 +0200 (CEST) Received: from mail.local.incore (fwintern.dmz [10.0.0.253]) by dss.incore.de (Postfix) with ESMTP id 29D6567873 for ; Tue, 5 Sep 2017 12:58:23 +0200 (CEST) Received: from bsdlo.incore (bsdlo.incore [192.168.0.84]) by mail.local.incore (Postfix) with ESMTP id 0144C508A9 for ; Tue, 5 Sep 2017 12:58:22 +0200 (CEST) Message-ID: <59AE834E.1090700@incore.de> Date: Tue, 05 Sep 2017 12:58:22 +0200 From: Andreas Longwitz User-Agent: Thunderbird 2.0.0.19 (X11/20090113) MIME-Version: 1.0 To: "freebsd-dtrace@freebsd.org" Subject: dtrace pid provider on entry == Trace/BPT trap process Content-Type: text/plain; charset=ISO-8859-15 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, 05 Sep 2017 11:05:03 -0000 I use FreeBSD 10.3-STABLE r317936 with updated /usr/lib/dtrace/ip.c and see an issue that in my opinion should have been solved in r269342: I run a simple program looptest, that loops around a sprintf() call and want to check this program with dtrace -n 'pid$target:libc.so.*::entry {@[probefunc] = count();}' -p $(pgrep looptest) dtrace: description 'pid$target:libc.so.*::entry ' matched 3863 probes After some seconds I hit CTRL-C and see __vfprintf 741685 localeconv_l 741685 memset 741685 sprintf 741685 vsprintf 741685 __sfvwrite 1483369 memcpy 2225052 and at the same time looptest stops with Trace/BPT trap (Speicherabzug geschrieben) and on the console I see the kernel message pid 67550 (looptest), uid 1003: exited on signal 5 (core dumped) The trap does not occur all the time, but it is no problem to repeat the trap. --- Andreas Longwitz From owner-freebsd-dtrace@freebsd.org Tue Sep 5 14:41:16 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 15539E0CBB8 for ; Tue, 5 Sep 2017 14:41:16 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt0-x22a.google.com (mail-qt0-x22a.google.com [IPv6:2607:f8b0:400d:c0d::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B2808766BA for ; Tue, 5 Sep 2017 14:41:15 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qt0-x22a.google.com with SMTP id b52so7938972qtb.3 for ; Tue, 05 Sep 2017 07:41:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=uQBOVwLCdveNrC3DeyBBoT7iQ+OJ5NPiMIRy/hbZA2M=; b=oL/KLE7hg8Igxjo3tWjGbj8J2DYXiONZrEmU+wtYF1cpvxR9XW+5r4UUc3qDMez08+ HCbMVZoOGisxTIhkt1ICK3OUfVKVjM2yAycMB+FYjv0+9P2GgUnrtEe0HOMhrnCDdErY eDROIB1lR7GHvQhOps2Mh81HclRxQDwyd1DHiQ+s3D1Qx96N0u4ka+g8I2qYiIP1BfLJ Fa8pzVBW3O62lYBDBGpGS6JFrAkGuuHNbjDkyjnbBCllHoOQaVasHftJvjpmacbvMBWA j7finVDtaAGnlUNyiIF/AXSkEWuElhu4DhbiifPNq95sH9f0V5bneKXI8x7RKeDvNBkq i0+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=uQBOVwLCdveNrC3DeyBBoT7iQ+OJ5NPiMIRy/hbZA2M=; b=eDK1mTmEBBtE1QZV5qm9uPJX0WX6mxLW6WIxU1NLMl2KrUVCR0tktG1TX4JXL00Dv8 kBrqs65Ow/C4a9uylvydJhJmjQmM4XW9uK9XrDHJQI8uesgg0vnAnOk5h0qqxVCzEB+m c5VAVhyyMYAM9GT3j0ZVM+rg91wBnmWrjTuJauoeymcbQlpRxOZHoOKzwGoOCQaLeSGl 2yZtMM+HhSDZtJXPEG2FmJ2EnNcdYofyOyUftXH4bWVrH3/uKyir6ensELoYuzZFGdQT butmfM2lrLv9D7JGgjub1zj55zE9MsmWOV1j8Y44tZ2Gn3FNQZ/gUYhhYFHj7bc5my12 YF1A== X-Gm-Message-State: AHPjjUgGZAB+hu4TzhTyZbDnIjoTKAf/DBOswulIx9a1zgN7d6NUvK8i U6T7B7vnIWckTQ== X-Google-Smtp-Source: ADKCNb5zTZZ5sOS7wRphufYm0rCUsqE9P28rMJvjPoBarGe2NNDMpKUOV0D4EkOnYEK8YIngFHyy0w== X-Received: by 10.200.39.185 with SMTP id w54mr5391604qtw.234.1504622474749; Tue, 05 Sep 2017 07:41:14 -0700 (PDT) Received: from wkstn-mjohnston.west.isilon.com (c-76-104-203-143.hsd1.wa.comcast.net. [76.104.203.143]) by smtp.gmail.com with ESMTPSA id 54sm491410qts.39.2017.09.05.07.41.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Sep 2017 07:41:14 -0700 (PDT) Sender: Mark Johnston Date: Tue, 5 Sep 2017 07:41:54 -0700 From: Mark Johnston To: Andreas Longwitz Cc: "freebsd-dtrace@freebsd.org" Subject: Re: dtrace pid provider on entry == Trace/BPT trap process Message-ID: <20170905144154.GC65864@wkstn-mjohnston.west.isilon.com> References: <59AE834E.1090700@incore.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <59AE834E.1090700@incore.de> User-Agent: Mutt/1.8.3 (2017-05-23) 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, 05 Sep 2017 14:41:16 -0000 On Tue, Sep 05, 2017 at 12:58:22PM +0200, Andreas Longwitz wrote: > I use FreeBSD 10.3-STABLE r317936 with updated /usr/lib/dtrace/ip.c and > see an issue that in my opinion should have been solved in r269342: 10.3 would be missing a number of other fixes for issues that might cause the symptom you're seeing. Unfortunately, userland DTrace is not very usable on FreeBSD before 11.0. > I run a simple program looptest, that loops around a sprintf() call and > want to check this program with > > dtrace -n 'pid$target:libc.so.*::entry {@[probefunc] = count();}' -p > $(pgrep looptest) > dtrace: description 'pid$target:libc.so.*::entry ' matched 3863 probes > > After some seconds I hit CTRL-C and see > > __vfprintf 741685 > localeconv_l 741685 > memset 741685 > sprintf 741685 > vsprintf 741685 > __sfvwrite 1483369 > memcpy 2225052 > > and at the same time looptest stops with > Trace/BPT trap (Speicherabzug geschrieben) > and on the console I see the kernel message > pid 67550 (looptest), uid 1003: exited on signal 5 (core dumped) > > The trap does not occur all the time, but it is no problem to repeat the > trap.