This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug uprobes/5083] rmmod uprobes should be safer
- From: "jkenisto at us dot ibm dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 9 Oct 2007 22:30:51 -0000
- Subject: [Bug uprobes/5083] rmmod uprobes should be safer
- References: <20071001193106.5083.jkenisto@us.ibm.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From jkenisto at us dot ibm dot com 2007-10-09 22:30 -------
Fixed in Rev 1.3 of src/runtime/uprobes/uprobes.c.
Here's how to verify the fix. Given the following user program
----- sleep15.c -----
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
static int naps = 0;
static void nap() /* set the retprobe here */
{
sleep(15);
}
main()
{
printf("pid = %d &nap = %p\n", getpid(), nap);
for (;;) {
nap();
printf("Nap #%d completed\n", ++naps);
}
}
---------------------
and the following stap script
----- uprobe1.stp -----
probe begin {
log("Probing...")
}
probe process($1).statement($2).absolute.return,
process($1).statement($2).absolute
{
log (pp())
}
-----------------------
do the following:
In window #1:
$ cc -o sleep15 sleep15.c
$ ./sleep15
pid = 31880 &nap = 0x80483e4
Nap #1 completed
Nap #2 completed
...
In window #2:
# stap uprobe1.stp 31880 0x80483e4
Probing...
process(31880).statement(134513636).absolute
process(31880).statement(134513636).absolute.return
process(31880).statement(134513636).absolute
...
^C
# rmmod --wait uprobes
rmmod should run until the current nap completes (see window #1),
then finish.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://sourceware.org/bugzilla/show_bug.cgi?id=5083
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.