Hi,
I am testing a lua script similar to this posting:
https://groups.google.com/forum/#!msg/phusion-passenger/Go1NgugrpOU/QmG0zk8MDGkJ
stracing nginx:
read(9, "-- test subrequest naar passenge"..., 4096) = 230
read(9, "", 4096) = 0
close(9) = 0
munmap(0x7fd2e4035000, 4096) = 0
stat("/e/my_nfs-app/rails/current/public/ping", 0x177ee70) = -1 ENOENT (No such file or directory)
stat("/e/my_nfs-app/rails/current/public/ping.html", 0x177f070) = -1 ENOENT (No such file or directory)
stat("/e/my_nfs-app/rails/current/
config.ru", {st_mode=S_IFREG|0664, st_size=154, ...}) = 0
epoll_ctl(11, EPOLL_CTL_MOD, 3, {EPOLLIN|EPOLLOUT|EPOLLET|0x2000, {u32=24756209, u64=24756209}}) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
Process 4587 detached
So after loading the lua script it seems to start executing passenger
instead of handing it over to the passenger socket, and then segfaulting
because passenger should not run like that.
SWhould I file a bugreport?
Steps to reproduce are building nginx with lua support:
nginx-1.6.0.tar.gz
passenger-4.0.45.tar.gz
LuaJIT-2.0.2.tar.gz
nginx.conf:
server {
...
location /testsub {
lua_code_cache on;
content_by_lua_file /e/app/testsub.lua;
}
}
------------------lua script-----------
-- test subrequest naar passenger
ngx.req.read_body()
local res = ngx.location.capture("/ping")
if res.status ~= 200 then
ngx.exit(res.status)
end
ngx.status = 200
ngx.say("einde test")
------------------lua script-----------
luajit was compiled:
make install PREFIX=/e/my/LuaJIT-2.0.2
nginx was compiled:
export LUAJIT_LIB=/e/my/LuaJIT-2.0.2/lib
export LUAJIT_INC=/e/my/LuaJIT-2.0.2/include/luajit-2.0
./configure \
...
--add-module=my-ext/lua_nginx_module
--add-module=my-ext/passenger_nginx_module
--
Leo Baltus, internetbeheerder
NPO ICT Internet Services
Bart de Graaffweg 2, 1217 ZL Hilversum
servi...@omroep.nl, 035-6773555