GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
attach: No such file or directory.
Attaching to process 10354
Reading symbols from /usr/local/openresty/nginx/sbin/nginx...done.
Reading symbols from /lib/x86_64-linux-gnu/libpthread.so.0...(no debugging symbols found)...done.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Loaded symbols for /lib/x86_64-linux-gnu/libpthread.so.0
Reading symbols from /lib/x86_64-linux-gnu/libcrypt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libcrypt.so.1
Reading symbols from /usr/local/openresty/luajit/lib/libluajit-5.1.so.2...done.
Loaded symbols for /usr/local/openresty/luajit/lib/libluajit-5.1.so.2
Reading symbols from /lib/x86_64-linux-gnu/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libm.so.6
Reading symbols from /lib/x86_64-linux-gnu/libpcre.so.3...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libpcre.so.3
Reading symbols from /lib/x86_64-linux-gnu/libssl.so.1.0.0...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libssl.so.1.0.0
Reading symbols from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
Reading symbols from /lib/x86_64-linux-gnu/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libz.so.1
Reading symbols from /lib/x86_64-linux-gnu/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libc.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib/x86_64-linux-gnu/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libdl.so.2
Reading symbols from /lib/x86_64-linux-gnu/libgcc_s.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libgcc_s.so.1
Reading symbols from /lib/x86_64-linux-gnu/libnss_compat.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libnss_compat.so.2
Reading symbols from /lib/x86_64-linux-gnu/libnsl.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libnsl.so.1
Reading symbols from /lib/x86_64-linux-gnu/libnss_nis.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libnss_nis.so.2
Reading symbols from /lib/x86_64-linux-gnu/libnss_files.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libnss_files.so.2
Reading symbols from /usr/local/openresty/lualib/cjson.so...done.
Loaded symbols for /usr/local/openresty/lualib/cjson.so
Reading symbols from /usr/lib/x86_64-linux-gnu/libuuid.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libuuid.so
0x00007fed36d5453b in ?? ()
(gdbbt full
#0 0x00007fed36d5453b in ?? ()
No symbol table info available.
#1 0x0000000040216cb8 in ?? ()
No symbol table info available.
#2 0x4000000000000000 in ?? ()
No symbol table info available.
#3 0x0000000000000000 in ?? ()
No symbol table info available.
完整的gdb 信息是这样的 上面提示了很多没有debug symbol 有关系吗?
在 2017年1月5日星期四 UTC+8下午5:55:04,YuanSheng写道:
2017-01-05 16:13 GMT+08:00 redcloser
<jianh...@gmail.com>:
线上出现,一段时间之后nginx worker 会一个接一个的cpu100,怀疑是lua代码有死循环
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
25937 www-data 20 0 415m 179m 17m R 100 0.1 824:56.13 nginx
可以看看这个帖子:
这个问题必须使用 lua.resty.core 包才能绕过。
你怀疑是 LUA 代码有死循环,其实 Nginx 也可能是死循环,所以看一下 Nginx 的堆栈信息也很有必要。
看了邮件列表用 ngx-lua-bt去查
+ /home/game/flameGraph/nginx-systemtap-toolkit-master/ngx-lua-bt -p 25937 --luajit20
WARNING: Tracing 25937 (/usr/local/openresty/nginx/sbin/nginx) for LuaJIT 2.0...
一直处于这个阶段,没有下面的内容,
然后其他worker就一个一个的都cpu跑满,停掉ngx-lua-bt之后又恢复正常。
请问是什么原因,要怎么排查cpu 100的问题呢?
--
--
YuanSheng Wang
---------------------------------------
OpenResty lover ^_^