Peter Feiner | 22 May 2013 22:04
Picon
Gravatar

[PATCH] fix aggregate stats in mutex-contention example

Stats that were supposed to be collected per FUTEX_WAIT call site were being
collected per mutex init stack. So, in the "aggregate stats" section of the
report, you'd see a bunch of stacks with pthread_mutex_init at the top ... which
was very confusing because a futex isn't contended when it's created :-)
---
 .../process/mutex-contention.stp                   |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/testsuite/systemtap.examples/process/mutex-contention.stp b/testsuite/systemtap.examples/process/mutex-contention.stp
index 4bd0486..eec4b4c 100755
--- a/testsuite/systemtap.examples/process/mutex-contention.stp
+++ b/testsuite/systemtap.examples/process/mutex-contention.stp
 <at>  <at>  -65,26 +65,22  <at>  <at>  probe syscall.futex.return {
   if (keep_stats) {
     mutex_contention[$uaddr] <<< elapsed
     stack = sprint_ubacktrace()
+    mutex_cont_stack[stack] <<< elapsed
     mutex_last_cont_stack[$uaddr] = stack
     if ($uaddr in mutex_init_stack) {
       if (verbose) {
         printf("contention time %d on mutex %p initialized at\n%s\n", elapsed, $uaddr, mutex_init_stack[$uaddr])
       }
-      stack = mutex_init_stack[$uaddr]
-      mutex_cont_stack[stack] <<< elapsed
     } else if ($uaddr in mutex_uninit) {
       if (verbose) {
         printf("contention time %d on popup mutex %p at\n%s\n", elapsed, $uaddr, stack)
       }
-      stack = mutex_uninit[$uaddr]
-      mutex_cont_stack[stack] <<< elapsed
(Continue reading)

Alexander Y. Fomichev | 22 May 2013 16:00
Picon

systemtap broken by USER_NS for now

Hi

for now user_ns unconditionally requires
CONFIG_UIDGID_STRICT_TYPE_CHECKS and the latter in turn breaks things
this way:

typedef struct {
        uid_t val;
} kuid_t;

and so:

stap # ./probe.stp
In file included from /usr/share/systemtap/runtime/linux/task_finder.c:17:0,
                 from /usr/share/systemtap/runtime/linux/runtime.h:188,
                 from /usr/share/systemtap/runtime/runtime.h:24,
                 from
/tmp/.private/root/stap7M7WmA/stap_6ce999ddb8d32c70dcbe287153f6957f_16537_src.c:22:
/usr/share/systemtap/runtime/linux/task_finder2.c: In function
'__stp_utrace_attach_match_filename':
/usr/share/systemtap/runtime/linux/task_finder2.c:816:11: error:
incompatible types when assigning to type 'uid_t' from type 'kuid_t'
  tsk_euid = task_euid(tsk);
           ^
.....................................................................

It seems like fix is straightforward - just use from_kuid_munged to
get euid if CONFIG_UIDGID_STRICT_TYPE_CHECKS is defined. (really it
always works on latest kernels but breaks older ones). I've attached a
simple patch and it works for 3.9 (both with and without
(Continue reading)

Masami Hiramatsu | 22 May 2013 11:34
Picon

[PATCH 1/2] [BUGFIX] kprobes: Fix to free gone and unused optprobes

Fix to free gone and unused optprobes. This bug will
cause a kernel panic if the user reuse the killed and
unused probe.

Reported: http://sourceware.org/ml/systemtap/2013-q2/msg00142.html

In the normal path, an optprobe on an init function is
unregistered when a module goes live.

unregister_kprobe(kp)
 -> __unregister_kprobe_top
   ->__disable_kprobe
     ->disarm_kprobe(ap == op)
       ->__disarm_kprobe
        ->unoptimize_kprobe : the op is queued
                              on unoptimizing_list
and do nothing in __unregister_kprobe_bottom

After a while (usually wait 5 jiffies), kprobe_optimizer
runs to unoptimize and free optprobe.

kprobe_optimizer
 ->do_unoptimize_kprobes
   ->arch_unoptimize_kprobes : moved to free_list
 ->do_free_cleaned_kprobes
   ->hlist_del: the op is removed
   ->free_aggr_kprobe
     ->arch_remove_optimized_kprobe
     ->arch_remove_kprobe
     ->kfree: the op is freed
(Continue reading)

Timo Juhani Lindfors | 22 May 2013 08:39
Picon
Picon
Favicon
Gravatar

[PATCH 1/3] man: add man page for stap-report(1)

---
 man/stap-report.1 |   54 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 54 insertions(+), 0 deletions(-)
 create mode 100644 man/stap-report.1

diff --git a/man/stap-report.1 b/man/stap-report.1
new file mode 100644
index 0000000..41c544e
--- /dev/null
+++ b/man/stap-report.1
 <at>  <at>  -0,0 +1,54  <at>  <at> 
+.\" -*- nroff -*-
+.TH STAP\-REPORT 1
+.SH NAME
+stap\-report \- collect system information that is useful for debugging systemtap bugs
+
+.\" macros
+.de SAMPLE
+.br
+.RS
+.nf
+.nh
+..
+.de ESAMPLE
+.hy
+.fi
+.RE
+..
+
+.SH SYNOPSIS
(Continue reading)

Jonathan Lebon | 21 May 2013 23:10
Picon
Favicon

[PATCH] fixed typo in doc -- replaced /n by \n

Hello everyone,

My name is Jonathan. I'm a new intern at Red Hat in Toronto.
I study Computer Engineering at York University.

Just pushed a small patch to get used to the system!
Looking forward to work with you all!

Cheers,

Jonathan

dsmith at redhat dot com | 21 May 2013 21:22
Favicon

[Bug dyninst/15513] New: add a "runtime" preprocessor conditional

http://sourceware.org/bugzilla/show_bug.cgi?id=15513

             Bug #: 15513
           Summary: add a "runtime" preprocessor conditional
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: dyninst
        AssignedTo: systemtap <at> sourceware.org
        ReportedBy: dsmith <at> redhat.com
    Classification: Unclassified

It would be helpful when writing system scripts to have a preprocessor
conditional that would indicate the runtime in use. This would allow script
writers to do things like:

====
%( runtime == "linux" %?
# do something we can only do in kernel mode
%)

%( runtime == "dyninst" %?
# ...
%)

====

This would be most useful in conditionally including kernel probes, only if
(Continue reading)

fche | 18 May 2013 16:27
Favicon

new systemtap snapshot available

A new automated systemtap source snapshot is available
ftp://sourceware.org/pub/systemtap/snapshots/systemtap-20130518.tar.bz2
2079411 bytes, 90efadc tag
See also ftp://sourceware.org/pub/systemtap/snapshots/

dsmith at redhat dot com | 17 May 2013 19:33
Favicon

[Bug dyninst/15486] New: stapdyn get hung when printing debug messages

http://sourceware.org/bugzilla/show_bug.cgi?id=15486

             Bug #: 15486
           Summary: stapdyn get hung when printing debug messages
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: dyninst
        AssignedTo: systemtap <at> sourceware.org
        ReportedBy: dsmith <at> redhat.com
    Classification: Unclassified

In dyninst mode, stapdyn can get hung when printing multiple debug messages.
Here's the test script:

====
probe begin
{
    %{ { _stp_dbug(__FUNCTION__, __LINE__, "debug line 1\n"); 0; } %}
    %{ { _stp_dbug(__FUNCTION__, __LINE__, "debug line 2\n"); 0; } %}
    %{ { _stp_dbug(__FUNCTION__, __LINE__, "debug line 3\n"); 0; } %}
    %{ { _stp_dbug(__FUNCTION__, __LINE__, "debug line 4\n"); 0; } %}
    %{ { _stp_dbug(__FUNCTION__, __LINE__, "debug line 5\n"); 0; } %}
    %{ { _stp_dbug(__FUNCTION__, __LINE__, "debug line 6\n"); 0; } %}
    %{ { _stp_dbug(__FUNCTION__, __LINE__, "debug line 7\n"); 0; } %}
    %{ { _stp_dbug(__FUNCTION__, __LINE__, "debug line 8\n"); 0; } %}
    %{ { _stp_dbug(__FUNCTION__, __LINE__, "debug line 9\n"); 0; } %}
    %{ { _stp_dbug(__FUNCTION__, __LINE__, "debug line 10\n"); 0; } %}
(Continue reading)

fche at redhat dot com | 17 May 2013 16:27
Favicon

[Bug runtime/15484] New: child of PR13193, optimized-kprobes kernel crashes

http://sourceware.org/bugzilla/show_bug.cgi?id=15484

             Bug #: 15484
           Summary: child of PR13193, optimized-kprobes kernel crashes
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: runtime
        AssignedTo: systemtap <at> sourceware.org
        ReportedBy: fche <at> redhat.com
    Classification: Unclassified

It looks like bug #13193 is still kicking; we need to restore the systemtap
workaround disabled in bug #13814.

--

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Timo Juhani Lindfors | 17 May 2013 13:10
Picon
Picon
Favicon
Gravatar

systemtap 2.2.1 installcheck => kernel BUG at .. kprobes.c:707

Hi,

systemtap 2.2.1 installcheck gets stuck on my debian amd64 unstable
system with linux 3.8 as xen domU.

Here's full dmesg and ps axuf:

[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 3.8-1-amd64 (debian-kernel <at> lists.debian.org) (gcc version 4.7.2 (Debian 4.7.2-5) ) #1 SMP Debian 3.8.12-1
[    0.000000] Command line: root=UUID=ee66b917-5151-4a4b-944a-99385b7d4d62 ro 
[    0.000000] ACPI in unprivileged domain disabled
[    0.000000] e820: BIOS-provided physical RAM map:
[    0.000000] Xen: [mem 0x0000000000000000-0x000000000009ffff] usable
[    0.000000] Xen: [mem 0x00000000000a0000-0x00000000000fffff] reserved
[    0.000000] Xen: [mem 0x0000000000100000-0x00000000407fffff] usable
[    0.000000] NX (Execute Disable) protection: active
[    0.000000] DMI not present or invalid.
[    0.000000] e820: update [mem 0x00000000-0x0000ffff] usable ==> reserved
[    0.000000] e820: remove [mem 0x000a0000-0x000fffff] usable
[    0.000000] No AGP bridge found
[    0.000000] e820: last_pfn = 0x40800 max_arch_pfn = 0x400000000
[    0.000000] initial memory mapped: [mem 0x00000000-0x03bc9fff]
[    0.000000] Base memory trampoline at [ffff88000009a000] 9a000 size 24576
[    0.000000] init_memory_mapping: [mem 0x00000000-0x407fffff]
[    0.000000]  [mem 0x00000000-0x407fffff] page 4k
[    0.000000] kernel direct mapping tables up to 0x407fffff  <at>  [mem 0x01a26000-0x01c2cfff]
[    0.000000] xen: setting RW the range 1c0b000 - 1c2d000
[    0.000000] RAMDISK: [mem 0x01c2d000-0x03bc9fff]
[    0.000000] NUMA turned off
(Continue reading)

jistone at redhat dot com | 17 May 2013 03:51
Favicon

[Bug dyninst/15481] New: stapdyn end probes fail with a -c command

http://sourceware.org/bugzilla/show_bug.cgi?id=15481

             Bug #: 15481
           Summary: stapdyn end probes fail with a -c command
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: dyninst
        AssignedTo: systemtap <at> sourceware.org
        ReportedBy: jistone <at> redhat.com
    Classification: Unclassified

With the new stapdyn transport, no end probes fire at all when there's a target
command given.  First command is good; the second missed 'end':

$ stap -e 'probe begin, end { println(pp()) }' --dyninst
begin
end

$ stap -e 'probe begin, end { println(pp()) }' --dyninst -c true
begin

Timing reports are similarly affected:

$ stap -e 'probe begin, end { println(pp()) }' --dyninst -t
begin
end
----- probe hit report: 
(Continue reading)


Gmane