This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug runtime/14659] task_finder2 breaks ptrace apps
- From: "jistone at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Mon, 08 Oct 2012 19:26:18 +0000
- Subject: [Bug runtime/14659] task_finder2 breaks ptrace apps
- Auto-submitted: auto-generated
- References: <bug-14659-6586@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=14659
--- Comment #2 from Josh Stone <jistone at redhat dot com> 2012-10-08 19:26:18 UTC ---
(In reply to comment #1)
> The vma pragma turns on vma tracking in task_finder2, which turns on syscall
> tracing. I'll bet that is what is interfering with ptrace().
>
> When doing syscall tracing, task_finder2 attaches to the 'sys_enter' and
> 'sys_exit' tracepoints. Setting a handler on those tracepoints sets the
> TIF_SYSCALL_TRACEPOINT task flag, which gets checked along with the
> TIF_SYSCALL_TRACE task flag (which ptrace uses) in _TIF_WORK_SYSCALL_MASK.
I'm skeptical of this root cause, because syscall tracepoints don't cause any
problem with perf:
$ perf record -e raw_syscalls:sys_* strace -e read true
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@\30\242b<\0\0\0"...,
832) = 832
+++ exited with 0 +++
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.088 MB perf.data (~3830 samples) ]
Actually, even stap is fine on the raw tracepoints:
$ stap eventcount.stp 'kernel.trace("sys_enter")' \
'kernel.trace("sys_exit")' -c 'strace -e read true'
read(4, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@\30\242b<\0\0\0"...,
832) = 832
+++ exited with 0 +++
Starting event counting at Mon Oct 8 12:24:46 2012 PDT, pid 27963 + children
Finished event counting at Mon Oct 8 12:24:47 2012 PDT.
Total time elapsed: 34 ms, 760 events total, 686 after filtering.
TID EVENT COUNT (RATE Hz)
--- ----- ---------------
stapio(27963) kernel.trace("sys_enter") 7 (205.88)
stapio(27963) kernel.trace("sys_exit") 7 (205.88)
strace(27963) kernel.trace("sys_enter") 305 (8970.58)
strace(27963) kernel.trace("sys_exit") 305 (8970.58)
strace(27966) kernel.trace("sys_exit") 3 (88.23)
strace(27966) kernel.trace("sys_enter") 3 (88.23)
strace(27967) kernel.trace("sys_exit") 5 (147.05)
strace(27967) kernel.trace("sys_enter") 5 (147.05)
true(27967) kernel.trace("sys_exit") 23 (676.47)
true(27967) kernel.trace("sys_enter") 23 (676.47)
> I'll think about ways to avoid syscall tracing when doing vma tracking.
If there's really a problem between the kernel's syscall tracing and ptrace,
then we should report this as a kernel bug. But right now, it seems like
there's more going on...
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.