-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: openresty child process cpu user space occupies 100% #7550
Comments
It looks like the Can you provide more information? |
You can use lbt to get the Lua stack: |
hi, spacewander. The details:
What should i do? added ~/.gdbinit configuration:
|
I try to install openresty-debuginfo-1.19.9.1-1.el7 but lbt return nothing:
|
What does |
(gdb) bt |
You may need to generate a C level on-CPU framegraph. |
Here is the CI related to generating framegraph: https://github.com/apache/apisix/blob/master/.github/workflows/performance.yml |
I want to make sure of one question: do you deploy private code code, such as custom plugins? |
And you also need to provide some configuration information. Since you are using APISIX version 2.9, we have fixed some CPU usage 100% bugs after 2.9, so your information will help us to determine if it is a fixed issue. |
@spacewander the |
@tzssangglass yes, i have a custom plugin. The plugin use redis
|
added
|
If you can generate a flamgraph at 100% CPU, the problem would be obvious. |
I captured the perf.data using perf at 100% CPU, maybe it can provide some helpful message?
and then,
|
This is a useless flamgraph without any valid stack information. Perhaps you are using perf incorrectly, or you are running APISIX and apisix-base with missing debug information (the official releases of APISIX and apisix-base do have debug information). |
This issue has been marked as stale due to 350 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the [email protected] list. Thank you for your contributions. |
This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time. |
Current Behavior
openresty其中一个子进程cpu100%,使用ltrace追踪该异常进程,结果如下:
...
lua_gettop(0x7fda9c61f508, 0x7fdaa930300e, 0x7fda9c0e2b68, 0x7fda9c0e2c10) = 1
lua_getexdata(0x7fda9c61f508, 0x7fdaa930300e, 0x7fda9c0e2b68, 0x7fda9c0e2c10) = 0x91a650
luaL_checktype(0x7fda9c61f508, 1, 5, 0x7fda9c0e2c10) = 5
lua_rawgeti(0x7fda9c61f508, 1, 1, 44) = 0x7fda9c0e2b78
lua_touserdata(0x7fda9c61f508, 0xffffffff, 0xfff9ffda9c16b090, 44) = 0x7fda9c16b0c0
lua_pushnil(0x7fda9c61f508, -1, 69, -13) = 0x7fda9c0e2b80
lua_pushlstring(0x7fda9c61f508, 0x54cf9b, 6, -13) = 0xfffdffdaa9302ff0
lua_gettop(0x7fda9c61f508, 0x7fdaa930300e, 0x7fda9c0e2b68, 0x7fda9c0e2c10) = 1
lua_getexdata(0x7fda9c61f508, 0x7fdaa930300e, 0x7fda9c0e2b68, 0x7fda9c0e2c10) = 0x91a650
luaL_checktype(0x7fda9c61f508, 1, 5, 0x7fda9c0e2c10) = 5
lua_rawgeti(0x7fda9c61f508, 1, 1, 44) = 0x7fda9c0e2b78
lua_touserdata(0x7fda9c61f508, 0xffffffff, 0xfff9ffda9c16b090, 44) = 0x7fda9c16b0c0
lua_pushnil(0x7fda9c61f508, -1, 69, -13) = 0x7fda9c0e2b80
lua_pushlstring(0x7fda9c61f508, 0x54cf9b, 6, -13) = 0xfffdffdaa9302ff0
...
Expected Behavior
No response
Error Logs
No response
Steps to Reproduce
1.apisix是源码编译,部署在centos
2.不稳定复现,apisix运行两个月左右就出现一个nginx子进程cpu占用100%。
Environment
apisix version
): 2.9uname -a
): Linux test-181-102-abjc 3.10.0-514.10.2.el7.x86_64 change: added doc of how to load plugin. #1 SMP Fri Mar 3 00:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linuxopenresty -V
ornginx -V
): nginx version: openresty/1.19.9.1curl http://127.0.0.1:9090/v1/server_info
): 3.4.0luarocks --version
): /usr/local/bin/luarocks 3.4.0The text was updated successfully, but these errors were encountered: