systemtap error when i run `sudo ./ngx-lua-bt --luajit20 -p 1580`

119 views
Skip to first unread message

len...@gmail.com

unread,
Apr 25, 2016, 11:38:43 PM4/25/16
to openresty
The error info :

WARNING: "__tracepoint_sched_process_fork" [/tmp/stapH5cHsd/stap_958d0ff0e571c9357f1e193511d8baa3_269311.ko] undefined!
WARNING: "__tracepoint_sys_exit" [/tmp/stapH5cHsd/stap_958d0ff0e571c9357f1e193511d8baa3_269311.ko] undefined!
WARNING: "__tracepoint_sys_enter" [/tmp/stapH5cHsd/stap_958d0ff0e571c9357f1e193511d8baa3_269311.ko] undefined!
WARNING: "__tracepoint_sched_process_exec" [/tmp/stapH5cHsd/stap_958d0ff0e571c9357f1e193511d8baa3_269311.ko] undefined!
WARNING: "__tracepoint_sched_process_exit" [/tmp/stapH5cHsd/stap_958d0ff0e571c9357f1e193511d8baa3_269311.ko] undefined!
ERROR: Couldn't insert module '/tmp/stapH5cHsd/stap_958d0ff0e571c9357f1e193511d8baa3_269311.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.

My env:
       
# cat /proc/version
Linux version 3.16.0-70-generic (buildd@lgw01-01) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #90~14.04.1-Ubuntu SMP Wed Apr 6 22:56:34 UTC 2016

stap -V
Systemtap translator/driver (version 2.3/0.158, Debian version 2.3-1ubuntu1.4 (trusty))
Copyright (C) 2005-2013 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
enabled features: AVAHI LIBSQLITE3 NSS TR1_UNORDERED_MAP NLS

dpkg --list | grep `uname -r` 
ii  linux-headers-3.16.0-70-generic                       3.16.0-70.90~14.04.1                                amd64        Linux kernel headers for version 3.16.0 on 64 bit x86 SMP
ii  linux-image-3.16.0-70-generic                         3.16.0-70.90~14.04.1                                amd64        Linux kernel image for version 3.16.0 on 64 bit x86 SMP
ii  linux-image-3.16.0-70-generic-dbgsym                  3.16.0-70.90~14.04.1                                amd64        Linux kernel debug image for version 3.16.0 on 64 bit x86 SMP
ii  linux-image-extra-3.16.0-70-generic                   3.16.0-70.90~14.04.1                                amd64        Linux kernel extra modules for version 3.16.0 on 64 bit x86 SMP
ii  linux-signed-image-3.16.0-70-generic                  3.16.0-70.90~14.04.1                                amd64        Signed kernel image generic

# cat /proc/kallsyms | grep __tracepoint_sched_process_fork                                                                                                             
0000000000000000 D __tracepoint_sched_process_fork



len...@gmail.com

unread,
Apr 25, 2016, 11:46:45 PM4/25/16
to openresty
补充一下, 通过查资料, 发现最后查看符号表都是0 是因为普通用户没法得到真正的符号地址。 
# sudo cat /proc/kallsyms | grep __tracepoint_sched_process_fork
ffffffff81cecbe0 D __tracepoint_sched_process_fork


Yichun Zhang (agentzh)

unread,
Apr 26, 2016, 7:54:42 PM4/26/16
to openresty
Hello!

On Mon, Apr 25, 2016 at 8:38 PM, <len...@gmail.com> wrote:
> WARNING: "__tracepoint_sched_process_fork"
> [/tmp/stapH5cHsd/stap_958d0ff0e571c9357f1e193511d8baa3_269311.ko] undefined!
> WARNING: "__tracepoint_sys_exit"
> [/tmp/stapH5cHsd/stap_958d0ff0e571c9357f1e193511d8baa3_269311.ko] undefined!
> WARNING: "__tracepoint_sys_enter"
> [/tmp/stapH5cHsd/stap_958d0ff0e571c9357f1e193511d8baa3_269311.ko] undefined!
> WARNING: "__tracepoint_sched_process_exec"
> [/tmp/stapH5cHsd/stap_958d0ff0e571c9357f1e193511d8baa3_269311.ko] undefined!
> WARNING: "__tracepoint_sched_process_exit"
> [/tmp/stapH5cHsd/stap_958d0ff0e571c9357f1e193511d8baa3_269311.ko] undefined!
> ERROR: Couldn't insert module
> '/tmp/stapH5cHsd/stap_958d0ff0e571c9357f1e193511d8baa3_269311.ko': Unknown
> symbol in module

没遇到过这种错误,或许可以尝试升级一下 systemtap 或者到 systemtap 官方邮件列表问询。清除一下
~/.systemtap/cache/ 缓存也是一个好主意。

另外需要确认一下你当前使用的 C 编译器版本与最初用来编译你的二进制 kernel 的版本是否严格一致。

Regards,
-agentzh

len...@gmail.com

unread,
May 10, 2016, 3:33:05 AM5/10/16
to openresty
谢谢春哥.
 这个问题的原因是systemtap的版本过低导致的, 原因是因为内核版本3.15之后, 修改了tracepoint的API, 而systemtap是在2.5之后处理的这个改变. 详见

而通过 apt-get 安装得到的 systemtap 是 2.3版本的, 所以在内核版本为3.15或更高的系统上, 会出现这个问题.
自己下载高于2.5版本的[systemtab源码包](https://sourceware.org/systemtap/ftp/releases/)并编译, 就可以解决这个问题. 

希望能帮助到之后再碰到这个问题的同学.

Regards.
-leng
Reply all
Reply to author
Forward
0 new messages