Nginx-LuaJIT core

Sirsiwal, Umesh usirsiwal at
Tue May 10 07:45:59 MSD 2011

Thanks agentzh,

Here is some additional information:
This does not happen on every request. It happens 2-3 hours running 2000-16000 requests/sec (Lua and Nginx rock:))

We are using CentOS 5.6 with 2.6.32-16 based Kernel. 

nginx -V
We have two custom modules which act as content handler:

nginx: nginx version: nginx/1.0.1
nginx: built by gcc 4.1.2 20080704 (Red Hat 4.1.2-50)
nginx: TLS SNI support disabled
nginx: configure arguments: --prefix=/usr/local/CoBlitz/nginx --add-module=../../../CoAgentMod/copass_module --add-module=../../../CoAgentMod/coagent_mon_module --with-http_secure_link_module --with-http_stub_status_module --without-http_autoindex_module --without-http_auth_basic_module --without-http_split_clients_module --without-http_uwsgi_module --without-http_scgi_module --without-http_memcached_module --without-http_empty_gif_module --without-http_charset_module --without-http_userid_module --with-http_ssl_module --with-debug --add-module=../agentzh-headers-more-nginx-module --add-module=../agentzh-memc-nginx-module --add-module=../chaoslawful-lua-nginx-module --add-module=../simpl-ngx_devel_kit --add-module=../ngx_http_upstream_keepalive --add-module=../nginx-upstream-carp

The following is the only location which uses access.
  location / {
        limit_except GET{
          deny all;
        set $lua_acess_url $copass_access_url;
        set $lua_access_type $copass_access_type;
        set $copass_url_suffix '';
        access_by_lua_file 'lua/access.lua';

The variables copass_access_url and access_type set by our C module. In this case access_type returns 0:
Here is the access.lua:

function accesscheck()
   local access_type = ngx.var['lua_access_type']
   if(access_type ~= nil and access_type ~= '') then
    .... Other access type handling


We also periodically make request to another HTTP location served by Lua: The location configuration is:
   location / {
         content_by_lua_file 'lua/comon.lua' ;
The comon.lua looks like:

local prox = 3201
local nrAgent = 8
output = "coblitzstat\n"
for p = prox, prox+nrAgent-1 do
        local l = "/prox" .. p .. ngx.var['request_uri']
        print("copass: fetching location " .. l)
        local res = ngx.location.capture(l)

        if (res.status ~= ngx.HTTP_OK and res.status ~= 504) then
        if(res.status == ngx.HTTP_OK and string.len(res.body) > 0) then
          output = output .. res.body


output can be rather large (10s of MB). 


From: agentzh [agentzh at]
Sent: Monday, May 09, 2011 11:17 PM
To: nginx-devel at
Subject: Re: Nginx-LuaJIT core

On Tue, May 10, 2011 at 10:57 AM, Sirsiwal, Umesh <usirsiwal at> wrote:
> I am receiving the following core using LuaJIT-2.0 Beta7. and chaoslawful-lua-nginx-module-v0.1.5rc2. I receive similar crash with chaoslawful-lua-nginx-module-v0.1.6rc6. Note that the newly created coroutine is set to -1.

Thank you for the report, but we need more information for this issue ;)

It'll be great if you can provide

1. the minimized version of your nginx.conf that can reproduce this problem,
2. the operating system you're using,
3. and the output of your "nginx -V"


nginx-devel mailing list
nginx-devel at

More information about the nginx-devel mailing list