各位大神好!
最近公司的openresty worker进程老是内存暴增,动则增加到3g多,感觉是lua内存泄露的问题,尝试生成内存占用最大的worker的内存火焰图:
遇到如下错误:
$ sudo ./samples/sample-bt-leaks.sxx -v -x 22298 --arg time=5 -D STP_NO_OVERLOAD -D MAXMAOENTRIES=10000 > a.bt
Ignored ambiguous library /usr/local/openresty/lualib/cjson.so for "libc"
Pass 1: parsed user script and 471 library scripts using 83656virt/50424res/4944shr/46200data kb, in 190usr/0sys/221real ms.
semantic error: while resolving probe point: identifier 'process' at <input>:17:7
source: probe process("/usr/lib/x86_64-linux-gnu/sasl2/libcrammd5.so.2.0.25").function("malloc").return,
^
semantic error: no match (similar functions: memcpy, memset, _fini, _init, _plug_buf_alloc)
semantic error: while resolving probe point: identifier 'process' at :18:7
source: process("/usr/lib/x86_64-linux-gnu/sasl2/libcrammd5.so.2.0.25").function("calloc").return,
^
semantic error: no match (similar functions: _fini, _init, _plug_buf_alloc, strcat, memcpy)
semantic error: while resolving probe point: identifier 'process' at :19:7
source: process("/usr/lib/x86_64-linux-gnu/sasl2/libcrammd5.so.2.0.25").function("realloc").return
^
semantic error: no match (similar functions: _fini, _init, _plug_buf_alloc, gettime, memcpy)
semantic error: while resolving probe point: identifier 'process' at :74:7
source: probe process("/usr/lib/x86_64-linux-gnu/sasl2/libcrammd5.so.2.0.25").function("free")
^
semantic error: no match (similar functions: _fini, memset, _init, gettime, strcat)
Pass 2: analyzed script: 2 probes, 185 functions, 3 embeds, 5 globals using 85512virt/53836res/6616shr/48056data kb, in 40usr/70sys/722real ms.
Pass 2: analysis failed. [man error::pass2]
之前在libcrypto.so 中遇到了这个问题,然后通过安装openssl-dbgsym解决了,现在这个sasl2的我装了cyrus-sasl2-dbg但是并没有效果,不知道各位大佬是否碰到过此类问题?
Ubuntu下需要安装哪些包?或者有可能跳过这个库么?还望不吝赐教
# Ubuntu用systemtap有点难受。。。
- 线上环境: ubuntu server 14.04.5
- openresty 版本:
$ nginx -V
nginx version: openresty/1.11.2.1
built by gcc 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
built with OpenSSL 1.0.1f 6 Jan 2014
TLS SNI support enabled
configure arguments: --prefix=/usr/local/openresty/nginx --with-cc-opt=-O2 --add-module=../ngx_devel_kit-0.3.0 --add-module=../echo-nginx-module-0.60 --add-module=../xss-nginx-module-0.05 --add-module=../ngx_coolkit-0.2rc3 --add-module=../set-misc-nginx-module-0.31 --add-module=../form-input-nginx-module-0.12 --add-module=../encrypted-session-nginx-module-0.06 --add-module=../srcache-nginx-module-0.31 --add-module=../ngx_lua-0.10.6 --add-module=../ngx_lua_upstream-0.06 --add-module=../headers-more-nginx-module-0.31 --add-module=../array-var-nginx-module-0.05 --add-module=../memc-nginx-module-0.17 --add-module=../redis2-nginx-module-0.13 --add-module=../redis-nginx-module-0.3.7 --add-module=../rds-json-nginx-module-0.14 --add-module=../rds-csv-nginx-module-0.07 --with-http_stub_status_module --with-http_sub_module --with-http_ssl_module
- sasl2的包安装情况(我都不知道这个包是拿来干嘛的
$ sudo dpkg -l | grep sasl2
ii cyrus-sasl2-dbg 2.1.25.dfsg1-17build1 amd64 Cyrus SASL - debugging symbols
ii cyrus-sasl2-mit-dbg 2.1.25.dfsg1-17build1 amd64 Cyrus SASL - debugging symbols for MIT modules
ii libsasl2-2:amd64 2.1.25.dfsg1-17build1 amd64 Cyrus SASL - authentication abstraction library
ii libsasl2-dev 2.1.25.dfsg1-17build1 amd64 Cyrus SASL - development files for authentication abstraction library
ii libsasl2-modules:amd64 2.1.25.dfsg1-17build1 amd64 Cyrus SASL - pluggable authentication modules
ii libsasl2-modules-db:amd64 2.1.25.dfsg1-17build1 amd64 Cyrus SASL - pluggable authentication modules (DB)
ii libsasl2-modules-gssapi-mit:amd64 2.1.25.dfsg1-17build1 amd64 Cyrus SASL - pluggable authentication modules (GSSAPI)