systemtap:while resolving probe point: identifier

2019-09-13 15:36发布

问题:

I had installed nginx and lua in my docker image, but I didn't install nginx on my physical CentOS system. I "docker run my image" and start nginx on my physical CentOS system. So the nginx master and worker process are working. I run an example of nginx-systemtap-toolkit. I run:

sudo ./ngx-active-reqs -p 24945

24945 is worker process id. errors as following:

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

In fact, "/data1/nginx/sbin/nginx" is the nginx path in docker image, nginx is not installed on my physical system. So whether I must install nginx on my physical system , or is there other method to use nginx's process function? I don't know how to solve the problem.

回答1:

To install debug symbol which package is not included in the repositories in the form of -dbg package, you need to add a new repository as detailed in the Debugging Guide:

  1. Add the repositories:

echo "deb http://ddebs.ubuntu.com $(lsb_release -cs) main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ddebs.list

echo "deb http://ddebs.ubuntu.com $(lsb_release -cs)-updates main restricted universe multiverse

deb http://ddebs.ubuntu.com $(lsb_release -cs)-security main restricted universe multiverse

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

  1. Add the GPG key:

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

  1. Update your package list:

sudo apt-get update

  1. Install the debugging symbols package, in this case coreutils-dbgsym:

sudo apt-get install coreutils-dbgsym