From owner-freebsd-dtrace@FreeBSD.ORG Mon Oct 21 03:49:39 2013 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D8457883 for ; Mon, 21 Oct 2013 03:49:39 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-ie0-x22e.google.com (mail-ie0-x22e.google.com [IPv6:2607:f8b0:4001:c03::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A91B42698 for ; Mon, 21 Oct 2013 03:49:39 +0000 (UTC) Received: by mail-ie0-f174.google.com with SMTP id qd12so10545854ieb.5 for ; Sun, 20 Oct 2013 20:49:39 -0700 (PDT) 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:in-reply-to:user-agent; bh=AGaonP/RH6U9hBMmzVsjF3MXIm1hM52aUhVBI9RVVf8=; b=V3A1XfTJjTiEEG5aCb6EPldhVEqyH25Gk+BTocayajLgan91+heYHAg2gkkJYYVR0G 1vK0poD88DLWR5NHZRVkKNydnxL8Jidduo3wj5FMPD24FtJ8ATesT817JNTQzHFi6EFT hGw/vHTkAUpbwAIg2J1mpgfIMlDXSXgBTeKSJYpNe9b0hFkdbJlZ7itVc+oW6J98HGkB SMm32uyHWtlyRvYE8a+myA3f81752ACAh4emeKRpel9m6SmfXR0rN7VlmlIirWd7BYZO kJwWHV5DomPqtfi+Vzxq0vBc0YLNbyXXVHatxN/35zX+lXjDbnImx8N5aQCic+qtBgsB Ca4A== X-Received: by 10.50.225.39 with SMTP id rh7mr8035877igc.10.1382327378970; Sun, 20 Oct 2013 20:49:38 -0700 (PDT) Received: from charmander (24-212-218-13.cable.teksavvy.com. [24.212.218.13]) by mx.google.com with ESMTPSA id x6sm28253552igb.3.2013.10.20.20.49.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 20 Oct 2013 20:49:38 -0700 (PDT) Sender: Mark Johnston Date: Sun, 20 Oct 2013 23:48:59 -0400 From: Mark Johnston To: John-Mark Gurney Subject: Re: new issues w/ dtrace aborting... Message-ID: <20131021034859.GA2402@charmander> References: <20131017200658.GG56872@funkthat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20131017200658.GG56872@funkthat.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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: Mon, 21 Oct 2013 03:49:39 -0000 On Thu, Oct 17, 2013 at 01:06:58PM -0700, John-Mark Gurney wrote: > I'm see this failure which is reproducable: > # dtrace -s ./disklatencycmd.d -x evaltime=postinit -c ./catall > Tracing... Hit Ctrl-C to end. > > Now, I have spent some time trying to debug this error and have > gotten a stack trace: > #0 dt_divide_128 (dividend=0x7fffffffd240, divisor=0, quotient=0x7fffffffd240) > at /usr/src/cddl/lib/libdtrace/../../../cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c:221 > #1 0x0000000800a8d343 in dt_stddev (data=0x802bb3e48, normal=1) > at /usr/src/cddl/lib/libdtrace/../../../cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c:372 > #2 0x0000000800a9549a in dt_aggregate_valcmp (lhs=, > rhs=) > at /usr/src/cddl/lib/libdtrace/../../../cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c:120 > #3 0x0000000800a93821 in dt_aggregate_varvalcmp (lhs=0x804679240, > rhs=0x804679260) > at /usr/src/cddl/lib/libdtrace/../../../cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c:950 > #4 0x0000000801a3d6aa in qsort () from /lib/libc.so.7 > #5 0x0000000800a93c88 in dt_aggregate_walk_sorted (dtp=0x80281d000, > func=0x800a8f7d0 , arg=0x7fffffffd498, > sfunc=) > at /usr/src/cddl/lib/libdtrace/../../../cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c:1275 > #6 0x0000000800a951c6 in dtrace_aggregate_print (dtp=0x80281d000, > fp=, func=) > at /usr/src/cddl/lib/libdtrace/../../../cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c:1880 > #7 0x000000000040387f in main (argc=, > argv=0x7fffffffd700) > at /usr/src/cddl/usr.sbin/dtrace/../../../cddl/contrib/opensolaris/cmd/dtrace/dtrace.c:1921 > > Now the weird part is that between frame 3 and frame 0, the address of > lhs/data changes, yet if you look at the code, it is passing the pointer > straight through w/o modification... The value pointed to by lhs is > valid and non-zero, but in frame 0 the different pointer is now zero.. > > The script catall: > #!/bin/sh - > > #since dtrace has issues: > find /mnt -type f -exec cat {} + > /dev/null > > The directory /mnt has a FS that only contains a recent export of HEAD.. > I also umount/mount before each run to make sure the disk cache is clear, > otherwise it's possible that all the data will be cached in memory, and > not perform any io... I can reproduce this by just running it on my laptop and killing it with ctrl-C. I'll work on figuring it out this week. Thanks for reporting it. > > It looks like it's an issue w/ clear(@stddev) as this is the script I've > reduced it to reproduce the failiure: > #pragma D option quiet > #pragma D option dynvarsize=16m > > io:::start > { > start_time[arg0] = timestamp; > } > > io:::done > /this->start = start_time[arg0]/ > { > this->delta = (timestamp - this->start) / 1000; > @stddev[args[1]->device_name, args[1]->unit_number] = stddev(this->delta > ); > start_time[arg0] = 0; > } > > dtrace:::END > { > clear(@stddev); > } > > Obviously for this to be useful, you'd print out the stddev, but the > abort happens either way... > > Thanks. > > -- > John-Mark Gurney Voice: +1 415 225 5579 > > "All that I will do, has been done, All that I have, has not." > _______________________________________________ > freebsd-dtrace@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-dtrace > To unsubscribe, send any mail to "freebsd-dtrace-unsubscribe@freebsd.org"