【问题标题】:systemtap:while resolving probe point: identifier 'process' at source: probe process().function no matchsystemtap:解析探测点时:源中的标识符“进程”:探测进程()。函数不匹配
【发布时间】:2015-06-02 08:17:06
【问题描述】:

我已经在我的 docker 镜像中安装了 nginx 和 lua,但是我没有在我的物理 CentOS 系统上安装 nginx。我“docker run my image”并在我的物理 CentOS 系统上启动 nginx。所以 nginx master 和 worker 进程都在工作。我运行了一个 nginx-systemtap-toolkit 的示例。我跑:

sudo ./ngx-active-reqs -p 24945

24945 是工作进程 ID。错误如下:

semantic error: while resolving probe point: identifier 'process' at <input>:6:7
    source: probe   process("/data1/nginx/sbin/nginx").function("ngx_process_events_and_timers"),
                    ^
semantic error: no match
Pass 2: analysis failed.  [man error::pass2]
Number of similar error messages suppressed: 1

其实“/data1/nginx/sbin/nginx”就是docker镜像中的nginx路径,我的物理系统上没有安装nginx。那么是否必须在我的物理系统上安装 nginx ,还是有其他方法可以使用 nginx 的进程功能?我不知道如何解决这个问题。

【问题讨论】:

  • 你安装了 nginx-debuginfo 吗?遵循 error::pass2 手册页中的任何建议?
  • @fche,我在我的物理CentOS系统上安装了nginx-debuginfo,也在我的docker容器上安装了它,但是问题没有解决。我运行:sudo stap -d 0.0.0.0:2000:/data1/nginx/sbin/nginx --ldd -L 'process("/data1/nginx/sbin/nginx").function("*")',但是什么也没返回。(2000是docker容器的端口,/data1/nginx/sbin/nginx是docker容器中的nginx路径)

标签: nginx process docker systemtap


【解决方案1】:

要以-dbg包的形式安装不包含在存储库中的调试符号,您需要添加一个新的存储库,详见Debugging Guide

  1. 添加存储库:

echo "deb http://ddebs.ubuntu.com $(lsb_release -cs) 主受限宇宙多元宇宙" | sudo tee -a /etc/apt/sources.list.d/ddebs.list

echo "deb http://ddebs.ubuntu.com $(lsb_release -cs)-updates 主受限宇宙多元宇宙

deb http://ddebs.ubuntu.com $(lsb_release -cs)-security main 受限宇宙多元宇宙

deb http://ddebs.ubuntu.com $(lsb_release -cs)-proposed main 受限宇宙 multiverse" | sudo tee -a /etc/apt/sources.list.d/ddebs.list

  1. 添加 GPG 密钥:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 428D7C01

  1. 更新您的软件包列表:

sudo apt-get 更新

  1. 安装调试符号包,在本例中为 coreutils-dbgsym:

sudo apt-get install coreutils-dbgsym

【讨论】:

    猜你喜欢
    • 2020-11-01
    • 1970-01-01
    • 1970-01-01
    • 2019-12-20
    • 1970-01-01
    • 1970-01-01
    • 2017-08-15
    • 1970-01-01
    相关资源
    最近更新 更多