This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug runtime/12642] utrace: taskfinder misses events when main thread does not go through at least one quiesce
- From: "dsmith at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Fri, 02 Nov 2012 16:03:32 +0000
- Subject: [Bug runtime/12642] utrace: taskfinder misses events when main thread does not go through at least one quiesce
- Auto-submitted: auto-generated
- References: <bug-12642-6586@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=12642
--- Comment #3 from David Smith <dsmith at redhat dot com> 2012-11-02 16:03:32 UTC ---
Depending on how you count, we've got 3 or 4 sets of utrace-like functionality
here, with different behaviors:
1) the original version of utrace, which is present in RHEL5, handled by
runtime/linux/task_finder.c. In this case we do send the main thread a
UTRACE_STOP, which causes it to stop and we attach correctly.
Here your testcase passes.
2) Version 2 of utrace, which is present in RHEL6 (also handled by
runtime/linux/task_finder.c). In this case we do send the main thread a
UTRACE_STOP - however the stop doesn't/can't interrupt a system call.
Here your testcase fails.
3) On new kernels without "real" utrace, we fake it with tracepoint handlers
and task_work_add(). This code is in runtime/linux/task_finder2.c and
runtime/stp_utrace.c. This code uses task_work_add() to run code when the task
is stopped. This can't interrupt a system call.
Here your testcase fails.
4) The new dyninst runtime ("--runtime=dyninst") uses the dyninst library to
attach, which ends up using ptrace. Attaching to a running process isn't quite
there yet, but I think it should be possible to interrupt a system call.
So, for cases 2) and 3) above, we've still got some thinking to do.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.