使用systemtap调试Nginx,出现中断问题。

75 views
Skip to first unread message

Neil Wai

unread,
Jul 15, 2019, 4:29:37 AM7/15/19
to openresty
大家好!
      我在尝试启动 systemtap 调试 nginx 时, nginx总是出现中断问题,  
systemtap安装成功的,火焰图也成功生成, nginx 编译是有加上  ./configure --with-debug --with-cc-opt='-O0 -g'
不过想追踪进程获取变量值就失败l
#cat get_http_uri.stp
probe process("/opt/nginx/sbin/nginx").function("ngx_http_process_request").call {
    printf("r->uri: %s\nr->uri(n): %s\n", user_string($r->uri->data), user_string_n($r->uri->data, $r->uri->len))
}

#stap get_http_uri.stp

启动后 ,nginx 就会出现, epoll_wait() failed (4: Interrupted system call)  
然后请求nginx就会中断,无法响应。   请问这个问题如何解决? 谢谢!

DeJiang Zhu

unread,
Jul 19, 2019, 12:22:40 PM7/19/19
to open...@googlegroups.com
此时你的 stap 是什么个行为表现呢,比如你可以 top 看下各个进程的表现

应该是你这个 stap 脚本有问题,user_string 是要求必须有 null 结尾的,但是显然 r->uri->data 没有

Neil Wai <wei.g...@gmail.com> 于2019年7月15日周一 下午4:29写道:
--
--
邮件来自列表“openresty”,专用于技术讨论!
订阅: 请发空白邮件到 openresty...@googlegroups.com
发言: 请发邮件到 open...@googlegroups.com
退订: 请发邮件至 openresty+...@googlegroups.com
归档: http://groups.google.com/group/openresty
官网: http://openresty.org/
仓库: https://github.com/agentzh/ngx_openresty
教程: http://openresty.org/download/agentzh-nginx-tutorials-zhcn.html
---
您收到此邮件是因为您订阅了Google网上论坛上的“openresty”群组。
要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到openresty+...@googlegroups.com
要在网络上查看此讨论,请访问https://groups.google.com/d/msgid/openresty/45324350-bbc4-4aa1-b2a5-f9b08fdabc6c%40googlegroups.com
Reply all
Reply to author
Forward
0 new messages