From owner-freebsd-dtrace@freebsd.org Sun Aug 20 03:40:12 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 B10D5DDA8DE for ; Sun, 20 Aug 2017 03:40:12 +0000 (UTC) (envelope-from xiaonan830818@gmail.com) Received: from mail-oi0-x22a.google.com (mail-oi0-x22a.google.com [IPv6:2607:f8b0:4003:c06::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 75A61713B7 for ; Sun, 20 Aug 2017 03:40:12 +0000 (UTC) (envelope-from xiaonan830818@gmail.com) Received: by mail-oi0-x22a.google.com with SMTP id f11so128132919oic.0 for ; Sat, 19 Aug 2017 20:40:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=VFMjCexwWw/6VK/ttH3sm0OZHqNpee2tM+mfi3dmQ7Q=; b=DMO+t8Hf6VT3Mr7U9PdlW2nEJiLu0S606U+0mjAA5ee/fB8bU2sHpeXhum1z7ZM6Bc qCF0jDBv+XKJtUzjJoEOsuRgwzV2pUW6J1Hw4B+CL2Ta6ah5RitMnd9+E64w5SSG3ht8 21aiVQC3QMi5gvjmkOu3Ve9V9QhyKtExrILzAriVbvGDaYUMXrKe1+9qqlsBDlvOACV7 yIYmzwWhuua1oP1CK6bPN+dyWsfZy5zJUj/lXjFxVX6uzxbUdt2Ry4QMcEuXqGI0EBG5 Sh8Nl9844rpKdVjKCTkfSVgzKyOn8uI5oI74EdQB2rNkg4YyJ/Z2+Ngjgrj6LsRLq9Rb l7EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=VFMjCexwWw/6VK/ttH3sm0OZHqNpee2tM+mfi3dmQ7Q=; b=byRgxs1AAEv3KNCz8BlC5jOabmtcET4Lng97Bblf0unsKbiYMltiNJq0QqF4y5/e2p h3rnFjIQ4cnQVmZ3Gng/4CQH6KtqGD0apU63XRQGHI4kzW1fMJQPNL4tnAEkLgEihi97 scaOruKnilkx75E20EwHiNF0bG/sxqbeWlDZnjIpc3pWyM0yMkTWLMyQS6sp3BW1d5Jr lhWD3Sbk9h/f/m175Oidi4UigXVd7o/MwKbrEccsIOFQ+Gb2JxOLENk98SYKgK7aN26z sNQVyVSXL1gQlPNzLTu/lEkv7AZTrJQSchnRRACfhODG/bdSbi+27BIlbBctd6CGKwdu gVSA== X-Gm-Message-State: AHYfb5g39aKBXISYkM+bgKh3b6pWyQNacYeLwZqP01UISA096jQGAkvR VCk1w9jBokjBOYkrqKroB22uCzE9ew== X-Received: by 10.202.108.150 with SMTP id h144mr19084536oic.290.1503200411603; Sat, 19 Aug 2017 20:40:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.8.74 with HTTP; Sat, 19 Aug 2017 20:40:11 -0700 (PDT) In-Reply-To: References: From: Nan Xiao Date: Sun, 20 Aug 2017 11:40:11 +0800 Message-ID: Subject: Re: Does DTrace on FreeBSD support macro argument? To: Ryan Stone Cc: "freebsd-dtrace@freebsd.org" Content-Type: text/plain; charset="UTF-8" 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: Sun, 20 Aug 2017 03:40:12 -0000 Hi Ryan, You are right! Thanks very much for your help! Best Regards Nan Xiao On Sun, Aug 20, 2017 at 4:45 AM, Ryan Stone wrote: > If a script uses a positional argument like $1, the script will error > out if you don't provide that parameter. Try instead supplying a pid > on the command line: > > # ./tracewrite.d 123 > > On Fri, Aug 18, 2017 at 3:27 AM, Nan Xiao wrote: >> Hi all, >> >> Greetings from me! >> >> I am trying the following simple script on FreeBSD 11: >> >> #!/usr/sbin/dtrace -s >> >> syscall::write:entry >> /pid == $1/ >> { >> } >> >> and get following error: >> >> # ./tracewrite.d >> dtrace: failed to compile script ./tracewrite.d: line 4: macro >> argument $1 is not defined >> >> From this link(http://docs.oracle.com/cd/E19253-01/817-6223/chp-script-3/index.html), >> it seems FreeBSD doesn't support macro argument, right? If I want to >> use it, what is the correct method? >> >> Thanks very much in advance! >> >> Best Regards >> Nan Xiao >> _______________________________________________ >> 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" From owner-freebsd-dtrace@freebsd.org Sun Aug 20 08:39:15 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 3E070DE7969 for ; Sun, 20 Aug 2017 08:39:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (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 2BBAA7D14D for ; Sun, 20 Aug 2017 08:39:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v7K8dFlg006490 for ; Sun, 20 Aug 2017 08:39:15 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-dtrace@FreeBSD.org Subject: [Bug 221641] www/firefox build fails with segmentation fault when running dtrace Date: Sun, 20 Aug 2017 08:39:15 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: jbeich@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: gecko@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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: Sun, 20 Aug 2017 08:39:15 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221641 Jan Beich changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |freebsd-dtrace@FreeBSD.org --- Comment #1 from Jan Beich --- What FreeBSD version? Can you get a stacktrace after building libc and libdtrace with debugging symbols? DTrace seems broken even on x86 with GCC (non-default) before 11.0-RELEASE. So, try disabling DTRACE port option. $ cd www/firefox $ make clean patch pre-configure BATCH=3D $ cd $(make -V WRKSRC)/js/src $ CC=3Dgcc6 CXX=3Dg++6 CPP=3Dcpp6 CFLAGS=3D-g CXXFLAGS=3D-g ./configure \ --disable-tests --disable-jemalloc --enable-dtrace $ gmake (gdb) r Starting program: /usr/sbin/dtrace -x nolibs -G -C -s /wrkdirs/usr/ports/www/firefox/work/firefox-55.0.2/js/src/devtools/javascri= pt-trace.d -o js-dtrace.o RegExp.o Parser.o StoreBuffer.o Disassembler-x86-shared.o jsarray.o jsatom.o jsdtoa.o jsmath.o jsutil.o pm_stub.o Interpreter.o TraceLogging.o TraceLoggingGraph.o TraceLoggingTypes.o Unified_cpp_js_src0.o Unified_cpp_js_src1.o Unified_cpp_js_src10.o Unified_cpp_js_src11.o Unified_cpp_js_src12.o Unified_cpp_js_src13.o Unified_cpp_js_src14.o Unified_cpp_js_src15.o Unified_cpp_js_src16.o Unified_cpp_js_src17.o Unified_cpp_js_src18.o Unified_cpp_js_src19.o Unified_cpp_js_src2.o Unified_cpp_js_src20.o Unified_cpp_js_src21.o Unified_cpp_js_src22.o Unified_cpp_js_src23.o Unified_cpp_js_src24.o Unified_cpp_js_src25.o Unified_cpp_js_src26.o Unified_cpp_js_src27.o Unified_cpp_js_src28.o Unified_cpp_js_src29.o Unified_cpp_js_src3.o Unified_cpp_js_src30.o Unified_cpp_js_src31.o Unified_cpp_js_src32.o Unified_cpp_js_src33.o Unified_cpp_js_src34.o Unified_cpp_js_src35.o Unified_cpp_js_src36.o Unified_cpp_js_src37.o Unified_cpp_js_src38.o Unified_cpp_js_src39.o Unified_cpp_js_src4.o Unified_cpp_js_src40.o Unified_cpp_js_src41.o Unified_cpp_js_src42.o Unified_cpp_js_src43.o Unified_cpp_js_src5.o Unified_cpp_js_src6.o Unified_cpp_js_src7.o Unified_cpp_js_src8.o Unified_cpp_js_src9.o Program received signal SIGSEGV, Segmentation fault. 0x0000000801b13482 in __jemalloc_bitmap_unset (bitmap=3D0x877020563, binfo=3D0x801e82e10, bit=3D0) at /usr/src/lib/libc/../../contrib/jemalloc/include/jemalloc/internal/bitmap.h= :156 156 g =3D *gp; (gdb) bt #0 0x0000000801b13482 in __jemalloc_bitmap_unset (bitmap=3D0x877020563, binfo=3D0x801e82e10, bit=3D0) at /usr/src/lib/libc/../../contrib/jemalloc/include/jemalloc/internal/bitmap.h= :156 #1 0x0000000801b05e60 in arena_run_reg_dalloc (run=3D0x80291a000, ptr=3D0x802932000) at jemalloc_arena.c:357 #2 0x0000000801b05c33 in __jemalloc_arena_dalloc_bin_locked (arena=3D0x8024000c0, chunk=3D0x802800000, ptr=3D0x802932000, mapelm=3D0x802801c50) at jemalloc_arena.c:1709 #3 0x0000000801b064b0 in __jemalloc_arena_dalloc_bin (arena=3D0x8024000c0, chunk=3D0x802800000, ptr=3D0x802932000, pageind=3D306, mapelm=3D0x802801c50) at jemalloc_are= na.c:1733 #4 0x0000000801b06537 in __jemalloc_arena_dalloc_small (arena=3D0x8024000c= 0, chunk=3D0x802800000, ptr=3D0x802932000, pageind=3D306) at jemalloc_arena.c:1749 #5 0x0000000801b1cfd1 in __jemalloc_arena_dalloc (arena=3D0x8024000c0, chunk=3D0x802800000, ptr=3D0x802932000, try_tcache=3Dtrue) at /usr/src/lib/libc/../../contrib/jemalloc/include/jemalloc/internal/arena.h:= 1005 #6 __jemalloc_idallocx (ptr=3D, try_tcache=3D, ptr=3D, try_tcache=3D) at /usr/src/lib/libc/../../contrib/jemalloc/include/jemalloc/internal/jemalloc= _internal.h:913 #7 __jemalloc_iqallocx (ptr=3D0x802932000, try_tcache=3Dtrue) at /usr/src/lib/libc/../../contrib/jemalloc/include/jemalloc/internal/jemalloc= _internal.h:932 #8 __jemalloc_iqalloc (ptr=3D0x802932000) at /usr/src/lib/libc/../../contrib/jemalloc/include/jemalloc/internal/jemalloc= _internal.h:939 #9 __free (ptr=3D0x802932000) at jemalloc_jemalloc.c:1277 #10 0x0000000800a7f644 in dt_free (dtp=3D0x802831000, data=3D0x802932000) at /usr/src/cddl/lib/libdtrace/../../../cddl/contrib/opensolaris/lib/libdtrace= /common/dt_subr.c:760 #11 0x0000000800a7a6b8 in dt_link_error (dtp=3D0x802831000, elf=3D0x8028a60= 20, fd=3D3, bufs=3D0x0, format=3D0x800aed9cf "failed to allocate space for probe") at /usr/src/cddl/lib/libdtrace/../../../cddl/contrib/opensolaris/lib/libdtrace= /common/dt_link.c:1176 #12 0x0000000800a7ba3e in process_obj (dtp=3D0x802831000, obj=3D0x7fffffffeae3 "Unified_cpp_js_src25.o", eprobesp=3D0x7fffffffd85= c) at /usr/src/cddl/lib/libdtrace/../../../cddl/contrib/opensolaris/lib/libdtrace= /common/dt_link.c:1609 #13 0x0000000800a79945 in dtrace_program_link (dtp=3D0x802831000, pgp=3D0x802894040, dflags=3D2, file=3D0x80281f030 "js-dtrace.o", objc=3D58, objv=3D0x802817088) at /usr/src/cddl/lib/libdtrace/../../../cddl/contrib/opensolaris/lib/libdtrace= /common/dt_link.c:1770 #14 0x0000000000403d3d in ?? () #15 0x000000000040231f in ?? () #16 0x000000080062f000 in ?? () #17 0x0000000000000000 in ?? () https://bugzilla.mozilla.org/show_bug.cgi?id=3D782962 --=20 You are receiving this mail because: You are on the CC list for the bug.= From owner-freebsd-dtrace@freebsd.org Sun Aug 20 16:00:11 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 066D4DDC355 for ; Sun, 20 Aug 2017 16:00:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (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 E89F56998B for ; Sun, 20 Aug 2017 16:00:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v7KG0AJx089715 for ; Sun, 20 Aug 2017 16:00:10 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-dtrace@FreeBSD.org Subject: [Bug 221641] www/firefox build fails with segmentation fault when running dtrace Date: Sun, 20 Aug 2017 16:00:11 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: solence@zoho.eu X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: gecko@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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: Sun, 20 Aug 2017 16:00:11 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221641 --- Comment #2 from Robin --- Thanks for the quick reply. I'm using FreeBSD 10.3, because 11.0+ is curren= tly broken on Powerbooks and doesn't boot (bug #216123). So I guess that may be= the cause of the problem. Unfortunately, I can't get a stacktrace, because I already figured that disabling DTrace may solve this and are currently rebuilding the port. This takes a day or two on a PowerPC, so I'll report back then. If DTrace is broken before FreeBSD 11.0, wouldn't it make sense not having = it activated by default? --=20 You are receiving this mail because: You are on the CC list for the bug.= From owner-freebsd-dtrace@freebsd.org Mon Aug 21 21:04:53 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 84E33DD2B7C for ; Mon, 21 Aug 2017 21:04:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (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 7393E1B27 for ; Mon, 21 Aug 2017 21:04:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v7LL4r2g051660 for ; Mon, 21 Aug 2017 21:04:53 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-dtrace@FreeBSD.org Subject: [Bug 219451] [dtrace] Certain llquantize() parameters trigger assertion Date: Mon, 21 Aug 2017 21:04:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.0-STABLE X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: markj@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: markj@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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: Mon, 21 Aug 2017 21:04:53 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D219451 --- Comment #2 from Mark Johnston --- It seems the real issue here is an overflow when computing 100^10? 9 is the largest power of 100 that fits in a 64-bit int. There's a check that's supposed to catch this. Indeed, it does if we change= the upper power from 10 to 11: git (dev/vm-init) markj@wkstn-mjohnston> sudo dtrace -n 'syscall:::return {@[execname] =3D llquantize(arg0, 100, 0, 11, 100);} tick-1s {exit(0);}' dtrace: invalid probe specifier syscall:::return {@[execname] =3D llquantize(arg0, 100, 0, 11, 100);} tick-1s {exit(0);}: llquantize( ) factor (100) raised to power of high magnitude (11) overflows 64-bits --=20 You are receiving this mail because: You are on the CC list for the bug.= From owner-freebsd-dtrace@freebsd.org Mon Aug 21 21:26:24 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 0EF44DD400E for ; Mon, 21 Aug 2017 21:26:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (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 F075D27D2 for ; Mon, 21 Aug 2017 21:26:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v7LLQNN9058314 for ; Mon, 21 Aug 2017 21:26:23 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-dtrace@FreeBSD.org Subject: [Bug 219451] [dtrace] Certain llquantize() parameters trigger assertion Date: Mon, 21 Aug 2017 21:26:23 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.0-STABLE X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: markj@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: markj@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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: Mon, 21 Aug 2017 21:26:24 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D219451 --- Comment #3 from Mark Johnston --- Right, so there's an off-by-one in that check. However, fixing that isn't sufficient: we also hit an overflow with a maximum power of 9. That's becau= se the upper bound ends up being base^{max+1}. For instance, with a 4-tuple (1= 0, 0, 3, 10) we show buckets up to 10000, i.e., 10^4. So it's actually an off-by-two. --=20 You are receiving this mail because: You are on the CC list for the bug.= From owner-freebsd-dtrace@freebsd.org Mon Aug 21 21:56:18 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 41887DD6169 for ; Mon, 21 Aug 2017 21:56:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (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 2F4913E94 for ; Mon, 21 Aug 2017 21:56:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v7LLuHP0027660 for ; Mon, 21 Aug 2017 21:56:18 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-dtrace@FreeBSD.org Subject: [Bug 219451] [dtrace] Certain llquantize() parameters trigger assertion Date: Mon, 21 Aug 2017 21:56:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.0-STABLE X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: commit-hook@freebsd.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: markj@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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: Mon, 21 Aug 2017 21:56:18 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D219451 --- Comment #4 from commit-hook@freebsd.org --- A commit references this bug: Author: markj Date: Mon Aug 21 21:56:03 UTC 2017 New revision: 322773 URL: https://svnweb.freebsd.org/changeset/base/322773 Log: Fix an off-by-two in the llquantize() action parameter validation. The aggregation created by llquantize() partitions values into buckets; t= he lower bound of the bucket containing the largest values is b^{m+1}, where b and m are the second and fourth parameters to the action, respectively. Bucket bounds are stored in a 64-bit integer, and so the llquantize() validation checks need to verify that b^{m+1} fits in 64 bits. However, it was only verifying that b^{m-1} fits in 64 bits, so certain parameter combinations could trigger assertion failures in libdtrace. PR: 219451 MFC after: 1 week Changes: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c --=20 You are receiving this mail because: You are on the CC list for the bug.=