From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5301 invoked by alias); 30 Nov 2016 19:10:00 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 4801 invoked by uid 48); 30 Nov 2016 19:09:46 -0000 From: "dsmith at redhat dot com" To: systemtap@sourceware.org Subject: [Bug runtime/20820] another "soft lockup" BUG on RHEL7 ppc64 Date: Wed, 30 Nov 2016 19:10:00 -0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: runtime X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dsmith at redhat dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- 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: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2016-q4/txt/msg00102.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D20820 --- Comment #10 from David Smith --- I played around with this one a bit more, trying to fix the "division by ze= ro" error. To fix this, I switched to using the monotonic clock function cpu_clock_us() instead of using gettimeofday_us() on the linux runtime. I t= hen started getting MAXNESTING errors with the dyninst runtime, so I switched t= he time() function to a macro. Here's the patch: =3D=3D=3D=3D diff --git a/testsuite/systemtap.base/optim_stats1.stp b/testsuite/systemtap.base/optim_stats1.stp index 4348ec2..884f753 100644 --- a/testsuite/systemtap.base/optim_stats1.stp +++ b/testsuite/systemtap.base/optim_stats1.stp @@ -4,17 +4,24 @@ @define feed(agg, tagg) %( - t =3D time() + t =3D @time foreach(k in randvals) @agg <<< k - @tagg +=3D time() - t + @tagg +=3D @time - t %) global x, tx =3D 0, y, ty =3D 0 global a, ta =3D 0, b, tb =3D 0 global randvals[@RANDCNT] -function time() { return gettimeofday_us() } +@define time +%( + %( runtime =3D=3D "dyninst" %? + gettimeofday_us() + %: + cpu_clock_us(cpu()) + %) +%) probe begin { diff --git a/testsuite/systemtap.base/optim_stats2.stp b/testsuite/systemtap.base/optim_stats2.stp index 4e28bdd..4ca82a9 100644 --- a/testsuite/systemtap.base/optim_stats2.stp +++ b/testsuite/systemtap.base/optim_stats2.stp @@ -4,17 +4,24 @@ @define feed(agg, tagg) %( - t =3D time() + t =3D @time foreach(k in randvals) @agg <<< k - @tagg +=3D time() - t + @tagg +=3D @time - t %) global x, tx =3D 0, y, ty =3D 0 global a, ta =3D 0, b, tb =3D 0 global randvals[@RANDCNT] -function time() { return gettimeofday_us() } +@define time +%( + %( runtime =3D=3D "dyninst" %? + gettimeofday_us() + %: + cpu_clock_us(cpu()) + %) +%) probe begin { =3D=3D=3D=3D With these changes, I get no "division by zero" errors or MAXNESTING errors, but I do start to see a FAIL. =3D=3D=3D=3D Running /root/src/testsuite/systemtap.base/optim_stats.exp ... PASS: TEST1 (0, 0) PASS: TEST2 (10, 45) PASS: TEST1 dyninst (0, 2) PASS: TEST2 dyninst (10, 38) FAIL: TEST3 (0, -4) PASS: TEST4 (10, 16) PASS: TEST3 dyninst (0, 8) PASS: TEST4 dyninst (10, 26) =3D=3D=3D=3D Thoughts? --=20 You are receiving this mail because: You are the assignee for the bug.