* [Bug tapsets/10421] task.stp pid2task tapset function fails on 2.6.31-0.67.rc2
2009-07-20 20:29 [Bug tapsets/10421] New: task.stp pid2task tapset function fails on 2.6.31-0.67.rc2 dsmith at redhat dot com
@ 2009-07-20 20:33 ` dsmith at redhat dot com
2009-07-21 3:12 ` wenji dot huang at oracle dot com
` (5 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: dsmith at redhat dot com @ 2009-07-20 20:33 UTC (permalink / raw)
To: systemtap
------- Additional Comments From dsmith at redhat dot com 2009-07-20 20:33 -------
Here's a reproducer (and output). Note that pid2execname() calls pid2task():
# stap -v --vp 0001 -e 'probe begin {printf("%s\n", pid2execname(0)); exit()}'
Pass 1: parsed user script and 55 library script(s) in 120usr/70sys/184real ms.
Pass 2: analyzed script: 1 probe(s), 6 function(s), 1 embed(s), 0 global(s) in
60usr/2400sys/3828real ms.
Pass 3: translated to C into "/tmp/stapNRfcrq/stap_27264.c" in 0usr/0sys/2real ms.
Running make -C "/lib/modules/2.6.31-0.67.rc2.git9.fc12.x86_64/build"
M="/tmp/stapNRfcrq" modules >/dev/null
WARNING: "find_task_by_vpid" [/tmp/stapNRfcrq/stap_27264.ko] undefined!
Pass 4: compiled C into "stap_27264.ko" in 5240usr/3730sys/9267real ms.
Pass 5: starting run.
Error inserting module '/tmp/stapNRfcrq/stap_27264.ko': Unknown symbol in module
Retrying, after attempted removal of module stap_27264 (rc -1)
Error inserting module '/tmp/stapNRfcrq/stap_27264.ko': Unknown symbol in module
Pass 5: run completed in 0usr/30sys/38real ms.
Pass 5: run failed. Try again with another '--vp 00001' option.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10421
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tapsets/10421] task.stp pid2task tapset function fails on 2.6.31-0.67.rc2
2009-07-20 20:29 [Bug tapsets/10421] New: task.stp pid2task tapset function fails on 2.6.31-0.67.rc2 dsmith at redhat dot com
2009-07-20 20:33 ` [Bug tapsets/10421] " dsmith at redhat dot com
@ 2009-07-21 3:12 ` wenji dot huang at oracle dot com
2009-07-21 4:29 ` ananth at in dot ibm dot com
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: wenji dot huang at oracle dot com @ 2009-07-21 3:12 UTC (permalink / raw)
To: systemtap
------- Additional Comments From wenji dot huang at oracle dot com 2009-07-21 03:12 -------
Created an attachment (id=4069)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=4069&action=view)
patch for 2.6.31
Use find_get_pid and pid_task for 2.6.31. Works fine on 2.6.31/29/26.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10421
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tapsets/10421] task.stp pid2task tapset function fails on 2.6.31-0.67.rc2
2009-07-20 20:29 [Bug tapsets/10421] New: task.stp pid2task tapset function fails on 2.6.31-0.67.rc2 dsmith at redhat dot com
2009-07-20 20:33 ` [Bug tapsets/10421] " dsmith at redhat dot com
2009-07-21 3:12 ` wenji dot huang at oracle dot com
@ 2009-07-21 4:29 ` ananth at in dot ibm dot com
2009-07-21 4:41 ` wenji dot huang at oracle dot com
` (3 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: ananth at in dot ibm dot com @ 2009-07-21 4:29 UTC (permalink / raw)
To: systemtap
------- Additional Comments From ananth at in dot ibm dot com 2009-07-21 04:28 -------
find_get_pid() gets a ref to the pid. You'll need to put_pid() too. Else, you'll
continue to hold the ref and that's incorrect.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10421
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tapsets/10421] task.stp pid2task tapset function fails on 2.6.31-0.67.rc2
2009-07-20 20:29 [Bug tapsets/10421] New: task.stp pid2task tapset function fails on 2.6.31-0.67.rc2 dsmith at redhat dot com
` (2 preceding siblings ...)
2009-07-21 4:29 ` ananth at in dot ibm dot com
@ 2009-07-21 4:41 ` wenji dot huang at oracle dot com
2009-07-21 5:06 ` Ananth N Mavinakayanahalli
2009-07-21 5:07 ` ananth at in dot ibm dot com
` (2 subsequent siblings)
6 siblings, 1 reply; 9+ messages in thread
From: wenji dot huang at oracle dot com @ 2009-07-21 4:41 UTC (permalink / raw)
To: systemtap
------- Additional Comments From wenji dot huang at oracle dot com 2009-07-21 04:40 -------
(In reply to comment #3)
> find_get_pid() gets a ref to the pid. You'll need to put_pid() too. Else, you'll
> continue to hold the ref and that's incorrect.
Sorry, don't notice it. So the sequence should be like the follwing?
...
struct pid *p_pid = find_get_pid(t_pid);
t = pid_task(p_pid, PIDTYPE_PID);
put_pid(p_pid);
...
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10421
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Bug tapsets/10421] task.stp pid2task tapset function fails on 2.6.31-0.67.rc2
2009-07-21 4:41 ` wenji dot huang at oracle dot com
@ 2009-07-21 5:06 ` Ananth N Mavinakayanahalli
0 siblings, 0 replies; 9+ messages in thread
From: Ananth N Mavinakayanahalli @ 2009-07-21 5:06 UTC (permalink / raw)
To: wenji dot huang at oracle dot com; +Cc: systemtap
On Tue, Jul 21, 2009 at 04:40:59AM -0000, wenji dot huang at oracle dot com wrote:
> Sorry, don't notice it. So the sequence should be like the follwing?
> ...
> struct pid *p_pid = find_get_pid(t_pid);
> t = pid_task(p_pid, PIDTYPE_PID);
> put_pid(p_pid);
> ...
Yes that should work, though you don't check for p_pid == NULL, 'cos
pid_task and put_pid have stubs that check for it.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tapsets/10421] task.stp pid2task tapset function fails on 2.6.31-0.67.rc2
2009-07-20 20:29 [Bug tapsets/10421] New: task.stp pid2task tapset function fails on 2.6.31-0.67.rc2 dsmith at redhat dot com
` (3 preceding siblings ...)
2009-07-21 4:41 ` wenji dot huang at oracle dot com
@ 2009-07-21 5:07 ` ananth at in dot ibm dot com
2009-07-22 6:02 ` wenji dot huang at oracle dot com
2009-07-22 14:42 ` dsmith at redhat dot com
6 siblings, 0 replies; 9+ messages in thread
From: ananth at in dot ibm dot com @ 2009-07-21 5:07 UTC (permalink / raw)
To: systemtap
------- Additional Comments From ananth at in dot ibm dot com 2009-07-21 05:06 -------
Subject: Re: task.stp pid2task tapset function fails on
2.6.31-0.67.rc2
On Tue, Jul 21, 2009 at 04:40:59AM -0000, wenji dot huang at oracle dot com wrote:
> Sorry, don't notice it. So the sequence should be like the follwing?
> ...
> struct pid *p_pid = find_get_pid(t_pid);
> t = pid_task(p_pid, PIDTYPE_PID);
> put_pid(p_pid);
> ...
Yes that should work, though you don't check for p_pid == NULL, 'cos
pid_task and put_pid have stubs that check for it.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10421
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tapsets/10421] task.stp pid2task tapset function fails on 2.6.31-0.67.rc2
2009-07-20 20:29 [Bug tapsets/10421] New: task.stp pid2task tapset function fails on 2.6.31-0.67.rc2 dsmith at redhat dot com
` (4 preceding siblings ...)
2009-07-21 5:07 ` ananth at in dot ibm dot com
@ 2009-07-22 6:02 ` wenji dot huang at oracle dot com
2009-07-22 14:42 ` dsmith at redhat dot com
6 siblings, 0 replies; 9+ messages in thread
From: wenji dot huang at oracle dot com @ 2009-07-22 6:02 UTC (permalink / raw)
To: systemtap
------- Additional Comments From wenji dot huang at oracle dot com 2009-07-22 06:02 -------
commit a6fade8983a61ecfe58f4824923a5a0f6726c818
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10421
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tapsets/10421] task.stp pid2task tapset function fails on 2.6.31-0.67.rc2
2009-07-20 20:29 [Bug tapsets/10421] New: task.stp pid2task tapset function fails on 2.6.31-0.67.rc2 dsmith at redhat dot com
` (5 preceding siblings ...)
2009-07-22 6:02 ` wenji dot huang at oracle dot com
@ 2009-07-22 14:42 ` dsmith at redhat dot com
6 siblings, 0 replies; 9+ messages in thread
From: dsmith at redhat dot com @ 2009-07-22 14:42 UTC (permalink / raw)
To: systemtap
------- Additional Comments From dsmith at redhat dot com 2009-07-22 14:42 -------
Wenji's commit fixes the problem.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://sourceware.org/bugzilla/show_bug.cgi?id=10421
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 9+ messages in thread