If any init_worker_by_lua block is present at all in my config, my worker processes core dump immediately. Below is the gdb trace of my core dump, version of resty and an example of the code triggering the problem. I have not been able to reproduce this problem in any other *_by_lua block.
dockerd[1968]: 2017/11/12 23:08:10 [alert] 1#1: worker process 29 exited on signal 11 (core dumped)
init_worker_by_lua '
local function hi(premature)
ngx.log(ngx.ERR, "hi")
end ngx.timer.at(0, hi)
';
dockerd[1968]: 2017/11/12 23:08:10 [alert] 1#1: worker process 29 exited on signal 11 (core dumped)
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 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".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/local/openresty/bin/openresty...done.
warning: core file may not match specified executable file.
[New LWP 78]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `nginx: master process /usr/local/openresty/bin/openresty -c /ngin'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 ngx_http_add_variable (cf=cf@entry=0x7ffe5328a9a0,
name=name@entry=0x9ec160 <ngx_http_aws_auth_vars>, flags=1)
at src/http/ngx_http_variables.c:387
387 src/http/ngx_http_variables.c: No such file or directory.
(gdb)
If any init_worker_by_lua block is present at all in my config, my worker processes core dump immediately. Below is the gdb trace of my core dump, version of resty and an example of the code triggering the problem. I have not been able to reproduce this problem in any other *_by_lua block.
dockerd[1968]: 2017/11/12 23:08:10 [alert] 1#1: worker process 29 exited on signal 11 (core dumped)
dockerd[1968]: 2017/11/12 23:08:10 [alert] 1#1: worker process 29 exited on signal 11 (core dumped)