Skip to content
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

not support Nginx 1.15.6? #1464

Closed
ylfforme opened this issue Feb 1, 2019 · 6 comments
Closed

not support Nginx 1.15.6? #1464

ylfforme opened this issue Feb 1, 2019 · 6 comments

Comments

@ylfforme
Copy link

ylfforme commented Feb 1, 2019

I build nginx1.15.6 use https://github.com/openresty/luajit2,but when run nginx -t,return segmentfault,it seems there is something wrong with lua_shared_dict

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/usr/local/nginx/sbin/nginx -t'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007f294b93d870 in ?? () from /usr/local/lib/libluajit-5.1.so.2
(gdb) bt
#0 0x00007f294b93d870 in ?? () from /usr/local/lib/libluajit-5.1.so.2
#1 0x00007f294b955c4d in lua_loadx () from /usr/local/lib/libluajit-5.1.so.2
#2 0x00007f294b955e7c in luaL_loadbufferx () from /usr/local/lib/libluajit-5.1.so.2
#3 0x00000000005dc57c in ngx_http_lua_init_by_inline (log=0x2701ed8, lmcf=0x2715cd0, L=0x0)
at /root/rpmbuild/compile/modules/ngx_lua.aef03eb/src/ngx_http_lua_initby.c:22
#4 0x00000000005d7844 in ngx_http_lua_shared_memory_init (shm_zone=0x2702500, data=0x0)
at /root/rpmbuild/compile/modules/ngx_lua.aef03eb/src/ngx_http_lua_api.c:203
#5 0x0000000000479060 in ngx_init_cycle (old_cycle=0x7ffe55caaf60) at src/core/ngx_cycle.c:484
#6 0x000000000045944d in main (argc=2, argv=0x7ffe55cab2e8) at src/core/nginx.c:291

@thibaultcha
Copy link
Member

Hi, please try the latest release of this module, v0.10.14rc5. It should resolve the segfault.

@ylfforme
Copy link
Author

ylfforme commented Feb 1, 2019

Hi, please try the latest release of this module, v0.10.14rc5. It should resolve the segfault.

it worked,thank you

@ylfforme ylfforme closed this as completed Feb 1, 2019
@AlexProfi
Copy link

Hi, please try the latest release of this module, v0.10.14rc5. It should resolve the segfault.
I use 0.10.14.rc6 ngx-lua
I use it in docker container

after few calling of nginx -t

and get this error
nginx -v
nginx version: nginx/1.15.6
root@648176df1326:/usr/app# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
root@648176df1326:/usr/app# nginx -t
Segmentation fault (core dumped)
root@648176df1326:/usr/app# nginx -V
nginx version: nginx/1.15.6
built by gcc 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.11)
built with OpenSSL 1.1.0h 27 Mar 2018
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --with-ld-opt=-Wl,-rpath,/usr/local/lib --add-module=/usr/app/ngx_devel_kit-0.3.0 --add-module=/usr/app/lua-nginx-module-0.10.14rc6 --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --user=root --group=www-data --user=www-data --group=www-data --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-debug --with-cc-opt='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie'

root@648176df1326:/usr/app# nginx -t
Segmentation fault (core dumped)

@thibaultcha
Copy link
Member

@AlexProfi Which version of this module are you using? Also, can you provide a backtrace for this segfault? Thank you.

@AlexProfi
Copy link

AlexProfi commented Feb 8, 2019

@AlexProfi Which version of this module are you using? Also, can you provide a backtrace for this segfault? Thank you.
Hello
I cant recieve core dumps
I make custom docker container with nginx and lua

thats some additional info about used packs

nginx -t
Segmentation fault (core dumped)
root@95178c2dd8b7:/var/log/nginx# nginx -v
nginx version: nginx/1.15.6
root@95178c2dd8b7:/var/log/nginx# nginx -V
nginx version: nginx/1.15.6
built by gcc 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.11)
built with OpenSSL 1.1.0h 27 Mar 2018
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --with-ld-opt=-Wl,-rpath,/usr/local/lib --add-module=/usr/app/ngx_devel_kit-0.3.0 --add-module=/usr/app/lua-nginx-module-0.10.14rc6 --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --user=root --group=www-data --user=www-data --group=www-data --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-debug --with-cc-opt='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie'
root@95178c2dd8b7:/var/log/nginx# ls -l
total 0
-rw-r--r-- 1 root root 0 Feb 8 11:09 error.log
root@95178c2dd8b7:/var/log/nginx# ls -l /tmp/cores
total 0

part of nginx.conf
user www-data www-data;
worker_processes 12;
error_log /var/log/nginx/error.log debug;
worker_rlimit_nofile 100000;
working_directory /tmp/cores/;
worker_rlimit_core 500M;
pid /run/nginx.pid;

@agentzh
Copy link
Member

agentzh commented Feb 8, 2019

@ylfforme Also need to use gdb to obtain the full C backtrace at the crash site. Please see the following doc for details:

https://www.nginx.com/resources/wiki/start/topics/tutorials/debugging/#core-dump

BTW, better create a separate issue for this instead of hijacking this closed issue ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants