Skip to content

nginx -t segfaults after upgrading lua-nginx-module to v0.10.14rc4 #1462

Closed
@fancy-rabbit

Description

@fancy-rabbit

CentOS7, kernel 3.10.0-862.11.6.el7.x86_64, nginx core 1.15.8, luajit 2.1-20190130
lua-nginx-module v0.10.14rc4, lua-resty-core v0.1.16rc4
expected behavior:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
but failed with:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
Segmentation fault

minimal reproducible test case:

init_by_lua_block {
require "resty.core"
}
lua_shared_dict test 128k;

commenting out either init_by_lua_block or lua_shared_dict will succeed.

gdb result:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7514ae0 in lj_vm_cpcall () from /lib64/libluajit-5.1.so.2
(gdb) bt
#0 0x00007ffff7514ae0 in lj_vm_cpcall () from /lib64/libluajit-5.1.so.2
#1 0x00007ffff756105d in lua_loadx () from /lib64/libluajit-5.1.so.2
#2 0x00007ffff75613dc in luaL_loadbufferx () from /lib64/libluajit-5.1.so.2
#3 0x0000555555710039 in ngx_http_lua_init_by_inline ()
#4 0x000055555570ce07 in ngx_http_lua_shared_memory_init ()
#5 0x000055555562d031 in ngx_init_cycle ()
#6 0x0000555555619eb8 in main ()

reverting commit 7c2b58e (#1377) resolved this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions