This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug tapsets/18143] New: target_set tapset does not track threads created with clone()
- From: "maxvt at bu dot edu" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Wed, 18 Mar 2015 20:13:27 +0000
- Subject: [Bug tapsets/18143] New: target_set tapset does not track threads created with clone()
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=18143
Bug ID: 18143
Summary: target_set tapset does not track threads created with
clone()
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: tapsets
Assignee: systemtap at sourceware dot org
Reporter: maxvt at bu dot edu
Created attachment 8197
--> https://sourceware.org/bugzilla/attachment.cgi?id=8197&action=edit
tentative patch
I'm using systemtap to track system calls done by a specific process and its
descendants (e.g., sshd). Using ancient systemtap, the script works perfectly.
Using 2.6/0.159, no child process activity is picked up. After a little
debugging, it seems child processes are not being added to the target set.
Example probes:
probe syscall.execve {
if (target_set_pid(pid())) {
printf("t=%d p=%d (%s) execve (%s)\n", getjc(), pid(), execname(),
argstr)
}
}
probe syscall.fork.return {
if (target_set_pid(pid())) {
printf("t=%d p=%d (%s) fork %s into %s\n", getjc(), pid(), execname(),
name, retstr)
}
}
Expected output (original pid of sshd is 609, spawning threads 7336 and 7339):
$ stap -x 609 example.stp
t=49957 p=7336 (sshd) execve ("/usr/sbin/sshd" "-D" "-R")
t=50033 p=7339 (sshd) execve ("/bin/bash" )
Actual output:
none
Guess at the cause:
Looking at bug 16667 [1]: "The syscall.fork probe alias was broken up into
syscall.fork, syscall.vfork, and syscall.clone aliases." The target_set tapset
hooks syscall.fork which, reading comment 2 to the bug, tracked fork, fork, and
clone calls. But the change that closed the bug separated the three calls, so
now the tapset code tracks fork but not vfork, nor clone.
[1] https://sourceware.org/bugzilla/show_bug.cgi?id=16667
A tentative patch is attached.
--
You are receiving this mail because:
You are the assignee for the bug.