This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Systemtap user space probing issue - Unknown symbol in module


I checked the dmesg log with stap -ve 'probe
process("./h264ref").function("*") { printf("hello\n"); }'

It shows some unknown symbols.

[7681057.827483] stap_610f349f374e883560aeeb9de1523c1f__13285: Unknown
symbol __tracepoint_sched_process_exit (err 0)
[7681057.827649] stap_610f349f374e883560aeeb9de1523c1f__13285: Unknown
symbol __tracepoint_sched_process_exec (err 0)
[7681057.827703] stap_610f349f374e883560aeeb9de1523c1f__13285: Unknown
symbol __tracepoint_sys_enter (err 0)
[7681057.827759] stap_610f349f374e883560aeeb9de1523c1f__13285: Unknown
symbol __tracepoint_sys_exit (err 0)
[7681057.827776] stap_610f349f374e883560aeeb9de1523c1f__13285: Unknown
symbol __tracepoint_sched_process_fork (err 0)

On Tue, Jul 19, 2016 at 11:01 AM, buddhika chamith
<chamibuddhika@gmail.com> wrote:
> Thanks. So I tried the following. The basic call that you've given
> works (I was also able to get a similar one working before).
>
> # stap -ve 'probe begin { printf("hello world\n"); exit() }'
>
> Pass 1: parsed user script and 113 library scripts using
> 65884virt/29736res/4868shr/25512data kb, in 170usr/10sys/176real ms.
> Pass 2: analyzed script: 1 probe, 1 function, 0 embeds, 0 globals
> using 66676virt/31068res/5444shr/26304data kb, in 0usr/0sys/3real ms.
> Pass 3: using cached
> /u/budkahaw/.systemtap/cache/36/stap_3678792131e4a93931146ace8f2569d0_1020.c
> Pass 4: using cached
> /u/budkahaw/.systemtap/cache/36/stap_3678792131e4a93931146ace8f2569d0_1020.ko
> Pass 5: starting run.
> hello world
> Pass 5: run completed in 0usr/40sys/367real ms.
>
>
>
>
> But the next one fails. Missing kernel symbols?
>
> # stap -ve 'probe nd_syscall.read { printf("hello world\n"); exit() }'
>
> WARNING: Kernel function symbol table missing [man warning::symbols]
> Pass 1: parsed user script and 113 library scripts using
> 65884virt/29804res/4936shr/25512data kb, in 130usr/0sys/132real ms.
> semantic error: while resolving probe point: identifier 'kprobe' at
> /opt/systemtap/3.0/share/systemtap/tapset/linux/nd_syscalls2.stp:1021:27
>         source: probe __nd_syscall.read = kprobe.function("sys_read")
>                                           ^
>
> semantic error: no match
>
> semantic error: while resolving probe point: identifier '__nd_syscall'
> at :1011:2
>         source: __nd_syscall.read
>                 ^
>
> semantic error: no match
>
> semantic error: while resolving probe point: identifier 'nd_syscall'
> at <input>:1:7
>         source: probe nd_syscall.read { printf("hello world\n"); exit() }
>                       ^
>
> semantic error: no match
>
> Pass 2: analyzed script: 0 probes, 0 functions, 0 embeds, 0 globals
> using 66676virt/31136res/5512shr/26304data kb, in 0usr/0sys/3real ms.
> Pass 2: analysis failed.  [man error::pass2]
>
>
>
>
> Interestingly the call # stap -vL 'process("./h264ref").function("*")'
> seem to be working with it spitting out some information on probe
> points. I am building this with debugging symbols.
>
> Thanks
>
>
>
> On Mon, Jul 18, 2016 at 2:11 PM, David Smith <dsmith@redhat.com> wrote:
>> On 07/18/2016 05:58 AM, buddhika chamith wrote:
>>> Hi All,
>>>
>>> Not sure if this has been addressed before. Checked the archive and
>>> couldn't find a solution there. I tried user space probing with
>>> Systemtap 3.0. But it gives me the following error.
>>>
>>> $ sudo stap -e 'probe process("./h264ref").function("*") { printf("hello\n"); }'
>>> ERROR: Couldn't insert module
>>> '/tmp/stapsPVPF2/stap_b964ab648506800b700ce82c4e1cf5cd_167937.ko':
>>> Unknown symbol in module
>>> WARNING: /usr/bin/staprun exited with status: 1
>>> Pass 5: run failed.  [man error::pass5]
>>> Tip: /usr/share/doc/systemtap/README.Debian should help you get started.
>>
>> ... stuff deleted ...
>>
>>> What do I need to do in order to fix this?
>>
>> The first thing to try would be to see if your systemtap installation
>> can run simple systemtap scripts. The error you see of "Unknown symbol
>> in module" makes me doubt that it can. Can you look in your kernel logs
>> to see if the unknown symbol is actually listed?
>>
>> Let's try the most basic systemtap script possible:
>>
>> # stap -ve 'probe begin { printf("hello world\n"); exit() }'
>>
>> Let's try a bit more challenging script:
>>
>> # stap -ve 'probe nd_syscall.read { printf("hello world\n"); exit() }'
>>
>> If those 2 scripts work, then we'll look at your executable you are
>> trying to probe. Was your 'h264ref' executable compiled with debugging
>> info (-g)?
>>
>> Try the following:
>>
>> # stap -vL 'process("./h264ref").function("*")'
>>
>> --
>> David Smith
>> dsmith@redhat.com
>> Red Hat
>> http://www.redhat.com
>> 256.217.0141 (direct)
>> 256.837.0057 (fax)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]