Unknown symbol error using stap in 2.6.31 on ARM

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Unknown symbol error using stap in 2.6.31 on ARM

Cipher Chen
Hi,
   I met the same problem descripted here:
    http://sourceware-org.1504.n7.nabble.com/Unknown-symbol-error-using-stap-in-RHEL-5-4-td176251.html

   What's different is that it's an ARM target. After i got
ntfs_watching.ko, "staprun ntfs_watching.ko" on that, it told me:
dmesg here:
ntfs_watching: Unknown symbol utrace_control
ntfs_watching: Unknown symbol utrace_barrier
ntfs_watching: Unknown symbol __utrace_engine_release
ntfs_watching: Unknown symbol unregister_uretprobe
ntfs_watching: Unknown symbol register_uprobe
ntfs_watching: Unknown symbol unmap_uretprobe
ntfs_watching: Unknown symbol utrace_attach_task
ntfs_watching: Unknown symbol register_uretprobe
ntfs_watching: Unknown symbol unmap_uprobe
ntfs_watching: Unknown symbol utrace_set_events
ntfs_watching: Unknown symbol unregister_uprobe

 So i tried something mentioned in that thread, it didnt work since
it's linux-2.6.31.5 without CONFIG_UPROBES.
 It doesnt have any modules running.
 Can we say that staprun ran with its own uprobes.ko?

 Then I also copied the uprobes.ko in /tmp/stap**** generated on host
to the ARM target, and "insmod uprobes.ko"
dmesg here:
uprobes: Unknown symbol utrace_control
uprobes: Unknown symbol utrace_attach_pid
uprobes: Unknown symbol utrace_set_events
("staprun ntfs_watching -u" told me these too)

Any thoughts on what might be causing this problem?



Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Unknown symbol error using stap in 2.6.31 on ARM

Alexander Lochmann
Hi,

try to run stap with "--compatible=1.8".
Stap needs uprobe support for some builtin functions as weel. Using this
option it will use old fashion builtin function.

Greetings
Alex

On 12/30/2012 02:55 AM, Cipher Chen wrote:

> Hi,
>     I met the same problem descripted here:
>      http://sourceware-org.1504.n7.nabble.com/Unknown-symbol-error-using-stap-in-RHEL-5-4-td176251.html
>
>     What's different is that it's an ARM target. After i got
> ntfs_watching.ko, "staprun ntfs_watching.ko" on that, it told me:
> dmesg here:
> ntfs_watching: Unknown symbol utrace_control
> ntfs_watching: Unknown symbol utrace_barrier
> ntfs_watching: Unknown symbol __utrace_engine_release
> ntfs_watching: Unknown symbol unregister_uretprobe
> ntfs_watching: Unknown symbol register_uprobe
> ntfs_watching: Unknown symbol unmap_uretprobe
> ntfs_watching: Unknown symbol utrace_attach_task
> ntfs_watching: Unknown symbol register_uretprobe
> ntfs_watching: Unknown symbol unmap_uprobe
> ntfs_watching: Unknown symbol utrace_set_events
> ntfs_watching: Unknown symbol unregister_uprobe
>
>   So i tried something mentioned in that thread, it didnt work since
> it's linux-2.6.31.5 without CONFIG_UPROBES.
>   It doesnt have any modules running.
>   Can we say that staprun ran with its own uprobes.ko?
>
>   Then I also copied the uprobes.ko in /tmp/stap**** generated on host
> to the ARM target, and "insmod uprobes.ko"
> dmesg here:
> uprobes: Unknown symbol utrace_control
> uprobes: Unknown symbol utrace_attach_pid
> uprobes: Unknown symbol utrace_set_events
> ("staprun ntfs_watching -u" told me these too)
>
> Any thoughts on what might be causing this problem?
>
>
>
> Thanks!

Reply | Threaded
Open this post in threaded view
|

Re: Unknown symbol error using stap in 2.6.31 on ARM

Cipher Chen
Hi, Alexander

On Sun, Dec 30, 2012 at 5:23 PM, Alexander Lochmann
<[hidden email]> wrote:
> Hi,
>
> try to run stap with "--compatible=1.8".
> Stap needs uprobe support for some builtin functions as weel. Using this
> option it will use old fashion builtin function.



    I'm not sure this would help, since I've already tried version 1.8
and snapshot 20122222(?), too(I mean re-install the whole systemtap).
And it didn't work either.(current used is 2.0)
    Anyway, I'll try that again tomorrow.

    Thanks.







>
> Greetings
> Alex
>
>
> On 12/30/2012 02:55 AM, Cipher Chen wrote:
>>
>> Hi,
>>     I met the same problem descripted here:
>>
>> http://sourceware-org.1504.n7.nabble.com/Unknown-symbol-error-using-stap-in-RHEL-5-4-td176251.html
>>
>>     What's different is that it's an ARM target. After i got
>> ntfs_watching.ko, "staprun ntfs_watching.ko" on that, it told me:
>> dmesg here:
>> ntfs_watching: Unknown symbol utrace_control
>> ntfs_watching: Unknown symbol utrace_barrier
>> ntfs_watching: Unknown symbol __utrace_engine_release
>> ntfs_watching: Unknown symbol unregister_uretprobe
>> ntfs_watching: Unknown symbol register_uprobe
>> ntfs_watching: Unknown symbol unmap_uretprobe
>> ntfs_watching: Unknown symbol utrace_attach_task
>> ntfs_watching: Unknown symbol register_uretprobe
>> ntfs_watching: Unknown symbol unmap_uprobe
>> ntfs_watching: Unknown symbol utrace_set_events
>> ntfs_watching: Unknown symbol unregister_uprobe
>>
>>   So i tried something mentioned in that thread, it didnt work since
>> it's linux-2.6.31.5 without CONFIG_UPROBES.
>>   It doesnt have any modules running.
>>   Can we say that staprun ran with its own uprobes.ko?
>>
>>   Then I also copied the uprobes.ko in /tmp/stap**** generated on host
>> to the ARM target, and "insmod uprobes.ko"
>> dmesg here:
>> uprobes: Unknown symbol utrace_control
>> uprobes: Unknown symbol utrace_attach_pid
>> uprobes: Unknown symbol utrace_set_events
>> ("staprun ntfs_watching -u" told me these too)
>>
>> Any thoughts on what might be causing this problem?
>>
>>
>>
>> Thanks!
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Unknown symbol error using stap in 2.6.31 on ARM

Cipher Chen
In reply to this post by Alexander Lochmann
hi, Alexander
Just as what i mentioned below, it didnt work.

On Sun, Dec 30, 2012 at 5:23 PM, Alexander Lochmann
<[hidden email]> wrote:

> Hi,
>
> try to run stap with "--compatible=1.8".
> Stap needs uprobe support for some builtin functions as weel. Using this
> option it will use old fashion builtin function.
>
> Greetings
> Alex
>
>
> On 12/30/2012 02:55 AM, Cipher Chen wrote:
>>
>> Hi,
>>     I met the same problem descripted here:
>>
>> http://sourceware-org.1504.n7.nabble.com/Unknown-symbol-error-using-stap-in-RHEL-5-4-td176251.html
>>
>>     What's different is that it's an ARM target. After i got
>> ntfs_watching.ko, "staprun ntfs_watching.ko" on that, it told me:
>> dmesg here:
>> ntfs_watching: Unknown symbol utrace_control
>> ntfs_watching: Unknown symbol utrace_barrier
>> ntfs_watching: Unknown symbol __utrace_engine_release
>> ntfs_watching: Unknown symbol unregister_uretprobe
>> ntfs_watching: Unknown symbol register_uprobe
>> ntfs_watching: Unknown symbol unmap_uretprobe
>> ntfs_watching: Unknown symbol utrace_attach_task
>> ntfs_watching: Unknown symbol register_uretprobe
>> ntfs_watching: Unknown symbol unmap_uprobe
>> ntfs_watching: Unknown symbol utrace_set_events
>> ntfs_watching: Unknown symbol unregister_uprobe
>>
>>   So i tried something mentioned in that thread, it didnt work since
>> it's linux-2.6.31.5 without CONFIG_UPROBES.
>>   It doesnt have any modules running.
>>   Can we say that staprun ran with its own uprobes.ko?
>>
>>   Then I also copied the uprobes.ko in /tmp/stap**** generated on host
>> to the ARM target, and "insmod uprobes.ko"
>> dmesg here:
>> uprobes: Unknown symbol utrace_control
>> uprobes: Unknown symbol utrace_attach_pid
>> uprobes: Unknown symbol utrace_set_events
>> ("staprun ntfs_watching -u" told me these too)
>>
>> Any thoughts on what might be causing this problem?
>>
>>
>>
>> Thanks!
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Unknown symbol error using stap in 2.6.31 on ARM

Josh Stone-5
In reply to this post by Cipher Chen
On 12/30/2012 04:40 AM, Cipher Chen wrote:
> On Sun, Dec 30, 2012 at 5:23 PM, Alexander Lochmann wrote:
>> try to run stap with "--compatible=1.8".
>> Stap needs uprobe support for some builtin functions as weel. Using this
>> option it will use old fashion builtin function.
>
>     I'm not sure this would help, since I've already tried version 1.8
> and snapshot 20122222(?), too(I mean re-install the whole systemtap).
> And it didn't work either.(current used is 2.0)
>     Anyway, I'll try that again tomorrow.

I gather from the name "ntfs_watching" that you're not actually trying
to probe any userspace?  In that case, Alex is referring to the
probefunc() change, which --compatible=1.8 ought to fix.  I also
recently added a ppfunc() to git which acts like the old way, parsing
the function name out of pp().

In any case, it would help if you shared the script you're using, or at
least enough of it that triggers the issue.

Thanks,
Josh
Reply | Threaded
Open this post in threaded view
|

Re: Unknown symbol error using stap in 2.6.31 on ARM

Cipher Chen
On Thu, Jan 3, 2013 at 2:44 AM, Josh Stone <[hidden email]> wrote:

> On 12/30/2012 04:40 AM, Cipher Chen wrote:
>> On Sun, Dec 30, 2012 at 5:23 PM, Alexander Lochmann wrote:
>>> try to run stap with "--compatible=1.8".
>>> Stap needs uprobe support for some builtin functions as weel. Using this
>>> option it will use old fashion builtin function.
>>
>>     I'm not sure this would help, since I've already tried version 1.8
>> and snapshot 20122222(?), too(I mean re-install the whole systemtap).
>> And it didn't work either.(current used is 2.0)
>>     Anyway, I'll try that again tomorrow.
>
> I gather from the name "ntfs_watching" that you're not actually trying
> to probe any userspace?  In that case, Alex is referring to the
> probefunc() change, which --compatible=1.8 ought to fix.  I also
> recently added a ppfunc() to git which acts like the old way, parsing
> the function name out of pp().
>
> In any case, it would help if you shared the script you're using, or at
> least enough of it that triggers the issue.
>

In fact, that wasn't a real utrace patch for ARM. I downloaded
utrace.patch for 2.6.31, patched it and wrote some similarly functions
for ARM by myself which were needed when building the kernel, since
that's a really old kernel.

ntfs_watching.stp is a simple script, the only user-space probe would be:
probe process("/path/to/ntfsmount/").function("*") {
  printf("%s\n", probefunc())
}

Thanks,
Cipher

> Thanks,
> Josh