public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug tapsets/9925] New: task_execname(task) incorrect in process.create
@ 2009-03-05 17:02 cap at nsc dot liu dot se
  2009-03-05 17:05 ` [Bug tapsets/9925] " mjw at redhat dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: cap at nsc dot liu dot se @ 2009-03-05 17:02 UTC (permalink / raw)
  To: systemtap

"task" in process.create is according to STAPPROBES.PROCESS(5):
 "a handle to the newly created process"

This seems to be true for some parts of "task" but not for all. The PID is
correct but execname is not (is actually the execname of the parent).

The following one-liner illustrates the issue:
 stap -e 'probe process.create { printf("currentpid: %d, newpid: %d,
newexecname: %s\n", pid(), task_pid(task), task_execname(task)) }'

With this running I started a few processes (/usr/bin/id, /bin/sleep) from my
bash resulting in:
 currentpid: 26872, newpid: 3156, newexecname: bash
 currentpid: 26872, newpid: 3157, newexecname: bash
 currentpid: 26872, newpid: 3158, newexecname: bash

In the data above currentpid (my bash) is correct, newpid (3156-3158) is also
correct. What's wrong is that newexecname should have been "id", "id", "sleep".

Tested on CentOS-5.3(QA) x86_64 (2.6.18-128.el5) with systemtap-0.7.2-2.el5 and
systemtap-20090228.

-- 
           Summary: task_execname(task) incorrect in process.create
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tapsets
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: cap at nsc dot liu dot se


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

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-03-14  1:13 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-05 17:02 [Bug tapsets/9925] New: task_execname(task) incorrect in process.create cap at nsc dot liu dot se
2009-03-05 17:05 ` [Bug tapsets/9925] " mjw at redhat dot com
2009-03-05 17:22 ` cap at nsc dot liu dot se
2009-03-05 17:32 ` cap at nsc dot liu dot se
2009-03-05 17:37 ` dsmith at redhat dot com
2009-03-06  1:28 ` jistone at redhat dot com
2009-03-06  8:19 ` jistone at redhat dot com
2009-03-06  9:18 ` wenji dot huang at oracle dot com
2009-03-06 14:18 ` cap at nsc dot liu dot se
2009-03-06 14:27 ` dsmith at redhat dot com
2009-03-15 16:44 ` jistone at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).