[Bug uprobes/5083] rmmod uprobes should be safer
jkenisto at us dot ibm dot com
sourceware-bugzilla@sourceware.org
Tue Oct 9 22:31:00 GMT 2007
------- 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.
More information about the Systemtap
mailing list