This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Segmentation Fault: Task died at uprobe probepoint
- From: Gaurav Dhiman <dimanuec at gmail dot com>
- To: systemtap at sourceware dot org
- Date: Fri, 11 Jun 2010 19:58:30 -0700
- Subject: Segmentation Fault: Task died at uprobe probepoint
Hi All,
I have recently installed SystemTap on my Ubuntu 9.04 based system. I
have Linux kernel 2.6.29.1 with utrace support (I used the utrace
patch from http://people.redhat.com/roland/utrace/old/2.6.29/) . I
wrote a very simple program to test out the userspace probe
functionality. Here is the stap script I wrote:
probe process("/home/gdhiman/tests/uprobe-test").begin
{
printf("uprobe-test begin!!\n")
}
probe process("/home/gdhiman/tests/uprobe-test").function("test_func")
{
printf("test_func called!\n");
log($$parms);
}
The uprobe-test code is as follows:
int test_func(int i)
{
printf("%d\n", i);
return j;
}
int main()
{
int i;
i = test_func(5);
return 0;
}
Then I ran the script as root using stap -v test.stp; it is compiled
and inserted successfully. I see the following message if I do dmesg:
[ 1694.148460] stap_9736f2321b446f9fc03126194f89aac2_1643: systemtap:
1.2/0.131, base: ffffffffa0010000, memory:
136data/29text/10ctx/13net/34alloc kb, probes: 2
However, when i actually run uprobe-test, although both the probes
fire successfully, the task generates a segmentation fault and dies on
the 'test_func' probe. I see the following message on doing dmesg:
[ 1709.650827] Task died at uprobe probepoint: pid/tgid = 3934/3934,
probepoint = 0x400517
I am not sure why is this happening. Is there something wrong in the
patch I used, or am I making some stupid mistake in programming the
probes? Any insights into what might be happening and how to resolve
the issue would be really helpful.
Thanks in advance,
-Gaurav