This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Segmentation Fault: Task died at uprobe probepoint
On Mon, Jun 14, 2010 at 12:00 AM, Srikar Dronamraju
<srikar@linux.vnet.ibm.com> wrote:
>> The uprobe-test code is as follows:
>>
>> int test_func(int i)
>> {
>> printf("%d\n", i);
>> return j;
> ^^^^^
> Guess you meant "return i;"
Yes, I meant 'i' :)
>> 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
>
> Looks to me that you are using a pretty recent systemtap with a pretty
> old elfutils. Is is possible to try building systemtap with a later
> version of elfutils?
>
I have version 0.13a installed on my system. Is that too old? I can
give it a shot with latter versions.
>> 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
>
>
> This means that the process died before the uprobe operation completed.
> i.e either it was still running the handler or singlestep operation
> hadnt occurred.
> - Did you try using the core with gdb? Does address in bt and
> disassemble output of test_func show the same address?
Actually the uprobe is firing. I see the output of the following
probe, when the function gets called:
probe process("/home/gdhiman/tests/uprobe-test").function("test_func")
{
printf("test_func called!\n");
log($$parms);
}
However, the program immediately dies. The address of the function is
0x400517, the same as that shown in the probepoint.
>
> I am not able to see this problem. (I am running on a different kernel)
>
Which versions (systemtap and kernel) are you using? I might give them
a shot as well.
Thanks,
-Gaurav