This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug runtime/20820] another "soft lockup" BUG on RHEL7 ppc64


https://sourceware.org/bugzilla/show_bug.cgi?id=20820

--- Comment #10 from David Smith <dsmith at redhat dot com> ---
I played around with this one a bit more, trying to fix the "division by zero"
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 then
started getting MAXNESTING errors with the dyninst runtime, so I switched the
time() function to a macro.

Here's the patch:

====
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 = time()
+    t = @time
     foreach(k in randvals)
        @agg <<< k
-    @tagg += time() - t
+    @tagg += @time - t
 %)

 global x, tx = 0, y, ty = 0
 global a, ta = 0, b, tb = 0
 global randvals[@RANDCNT]

-function time() { return gettimeofday_us() }
+@define time
+%(
+    %( runtime == "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 = time()
+    t = @time
     foreach(k in randvals)
        @agg <<< k
-    @tagg += time() - t
+    @tagg += @time - t
 %)

 global x, tx = 0, y, ty = 0
 global a, ta = 0, b, tb = 0
 global randvals[@RANDCNT]

-function time() { return gettimeofday_us() }
+@define time
+%(
+    %( runtime == "dyninst" %?
+       gettimeofday_us()
+    %:
+       cpu_clock_us(cpu())
+    %)
+%)

 probe begin
 {
====

With these changes, I get no "division by zero" errors or MAXNESTING errors,
but I do start to see a FAIL.

====
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)
====

Thoughts?

-- 
You are receiving this mail because:
You are the assignee for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]