Skip to content

Instantly share code, notes, and snippets.

@membphis
Created August 25, 2019 06:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save membphis/14f35bd9c7750c1f855a7fed44d78e0e to your computer and use it in GitHub Desktop.
Save membphis/14f35bd9c7750c1f855a7fed44d78e0e to your computer and use it in GitHub Desktop.
[root@ppp-202 apisix]# gdb /usr/local/openresty/nginx/sbin/nginx /tmp/apisix_cores/core.21067
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-114.el7
Copyright (C) 2013 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-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/local/openresty/nginx/sbin/nginx...Reading symbols from /usr/local/openresty/nginx/sbin/nginx...(no debugging symbols found)...done.
(no debugging symbols found)...done.
warning: core file may not match specified executable file.
[New LWP 21067]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `nginx: worker process '.
Program terminated with signal 4, Illegal instruction.
#0 0x00007fd7d3a1c76d in AddState (index=2, l=..., this=0x7ffe0bcbb700) at /tmp/luarocks_rapidjson-0.6.1-1-6477/lua-rapidjson/rapidjson/include/rapidjson/internal/regex.h:693
693 /tmp/luarocks_rapidjson-0.6.1-1-6477/lua-rapidjson/rapidjson/include/rapidjson/internal/regex.h: No such file or directory.
Missing separate debuginfos, use: debuginfo-install openresty-1.15.8.1-1.el7.x86_64
(gdb) bt
#0 0x00007fd7d3a1c76d in AddState (index=2, l=..., this=0x7ffe0bcbb700) at /tmp/luarocks_rapidjson-0.6.1-1-6477/lua-rapidjson/rapidjson/include/rapidjson/internal/regex.h:693
#1 rapidjson::internal::GenericRegexSearch<rapidjson::internal::GenericRegex<rapidjson::UTF8<char>, rapidjson::CrtAllocator>, rapidjson::CrtAllocator>::AddState (
this=0x7ffe0bcbb700, l=..., index=<optimized out>) at /tmp/luarocks_rapidjson-0.6.1-1-6477/lua-rapidjson/rapidjson/include/rapidjson/internal/regex.h:689
#2 0x00007fd7d3a1cebf in SearchWithAnchoring<rapidjson::GenericStringStream<rapidjson::UTF8<> > > (anchorEnd=<optimized out>, anchorBegin=false, is=..., this=0x7ffe0bcbb700)
at /tmp/luarocks_rapidjson-0.6.1-1-6477/lua-rapidjson/rapidjson/include/rapidjson/internal/regex.h:654
#3 Search<rapidjson::GenericStringStream<rapidjson::UTF8<> > > (is=..., this=0x7ffe0bcbb700)
at /tmp/luarocks_rapidjson-0.6.1-1-6477/lua-rapidjson/rapidjson/include/rapidjson/internal/regex.h:633
#4 Search (s=0x21411b8 "127.0.0.1:8001", this=0x7ffe0bcbb700) at /tmp/luarocks_rapidjson-0.6.1-1-6477/lua-rapidjson/rapidjson/include/rapidjson/internal/regex.h:638
#5 IsPatternMatch (str=0x21411b8 "127.0.0.1:8001", pattern=<optimized out>) at /tmp/luarocks_rapidjson-0.6.1-1-6477/lua-rapidjson/rapidjson/include/rapidjson/schema.h:1147
#6 Key (len=14, str=0x21411b8 "127.0.0.1:8001", context=..., this=0x21528e0) at /tmp/luarocks_rapidjson-0.6.1-1-6477/lua-rapidjson/rapidjson/include/rapidjson/schema.h:896
#7 rapidjson::GenericSchemaValidator<rapidjson::GenericSchemaDocument<rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >, rapidjson::CrtAllocator>, rapidjson::BaseReaderHandler<rapidjson::UTF8<char>, void>, rapidjson::CrtAllocator>::Key (this=this@entry=0x2159df0,
str=0x21411b8 "127.0.0.1:8001", len=14, copy=<optimized out>) at /tmp/luarocks_rapidjson-0.6.1-1-6477/lua-rapidjson/rapidjson/include/rapidjson/schema.h:2122
#8 0x00007fd7d3a1def6 in rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::Accept<rapidjson::GenericSchemaValidator<rapidjson::GenericSchemaDocument<rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >, rapidjson::CrtAllocator>, rapidjson::BaseReaderHandler<rapidjson::UTF8<char>, void>, rapidjson::CrtAllocator> > (this=0x21413e8, handler=...)
at /tmp/luarocks_rapidjson-0.6.1-1-6477/lua-rapidjson/rapidjson/include/rapidjson/document.h:1873
#9 0x00007fd7d3a1df0a in rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::Accept<rapidjson::GenericSchemaValidator<rapidjson::GenericSchemaDocument<rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >, rapidjson::CrtAllocator>, rapidjson::BaseReaderHandler<rapidjson::UTF8<char>, void>, rapidjson::CrtAllocator> > (this=0x2152ac0, handler=...)
at /tmp/luarocks_rapidjson-0.6.1-1-6477/lua-rapidjson/rapidjson/include/rapidjson/document.h:1875
#10 0x00007fd7d3a0eee3 in SchemaValidator_validate (L=0x7fd7d9c95e28) at /tmp/luarocks_rapidjson-0.6.1-1-6477/lua-rapidjson/src/Schema.cpp:97
#11 0x00007fd7d92dd9c5 in lj_BC_FUNCC () from /usr/local/openresty/luajit/lib/libluajit-5.1.so.2
#12 0x00000000004f3391 in ngx_http_lua_run_thread ()
#13 0x00000000004fe0ef in ngx_http_lua_socket_tcp_resume_helper ()
#14 0x00000000004fd56c in ngx_http_lua_socket_tcp_read ()
#15 0x00000000004fccb0 in ngx_http_lua_socket_tcp_handler ()
#16 0x000000000044a020 in ngx_epoll_process_events ()
#17 0x0000000000441164 in ngx_process_events_and_timers ()
#18 0x000000000044829a in ngx_worker_process_cycle ()
#19 0x0000000000446d5a in ngx_spawn_process ()
#20 0x00000000004493ee in ngx_master_process_cycle ()
#21 0x00000000004216c2 in main ()
@membphis
Copy link
Author

[root@ppp-202 apisix]# uname -r
5.2.3-1.el7.elrepo.x86_64

[root@ppp-202 apisix]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)

@membphis
Copy link
Author

[root@ppp-202 apisix]# ll /usr/bin/openresty
lrwxrwxrwx 1 root root 37 Aug 23 15:28 /usr/bin/openresty -> /usr/local/openresty/nginx/sbin/nginx

[root@ppp-202 apisix]# openresty -V
nginx version: openresty/1.15.8.1
built by gcc 7.3.1 20180303 (Red Hat 7.3.1-5) (GCC)
built with OpenSSL 1.1.0j 20 Nov 2018 (running with OpenSSL 1.1.0k 28 May 2019)
TLS SNI support enabled
configure arguments: --prefix=/usr/local/openresty/nginx --with-cc-opt='-O2 -DNGX_LUA_ABORT_AT_PANIC -I/usr/local/openresty/zlib/include -I/usr/local/openresty/pcre/include -I/usr/local/openresty/openssl/include' --add-module=../ngx_devel_kit-0.3.1rc1 --add-module=../echo-nginx-module-0.61 --add-module=../xss-nginx-module-0.06 --add-module=../ngx_coolkit-0.2 --add-module=../set-misc-nginx-module-0.32 --add-module=../form-input-nginx-module-0.12 --add-module=../encrypted-session-nginx-module-0.08 --add-module=../srcache-nginx-module-0.31 --add-module=../ngx_lua-0.10.15 --add-module=../ngx_lua_upstream-0.07 --add-module=../headers-more-nginx-module-0.33 --add-module=../array-var-nginx-module-0.05 --add-module=../memc-nginx-module-0.19 --add-module=../redis2-nginx-module-0.15 --add-module=../redis-nginx-module-0.3.7 --add-module=../ngx_stream_lua-0.0.7 --with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib -L/usr/local/openresty/zlib/lib -L/usr/local/openresty/pcre/lib -L/usr/local/openresty/openssl/lib -Wl,-rpath,/usr/local/openresty/zlib/lib:/usr/local/openresty/pcre/lib:/usr/local/openresty/openssl/lib' --with-pcre-jit --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_v2_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-http_stub_status_module --with-http_realip_module --with-http_addition_module --with-http_auth_request_module --with-http_secure_link_module --with-http_random_index_module --with-http_gzip_static_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-threads --with-dtrace-probes --with-stream --with-stream_ssl_preread_module --with-http_ssl_module
[root@ppp-202 apisix]# which openresty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment