Welcome! Log In Create A New Profile

Advanced

Re: Nginx-LuaJIT core

Umesh Sirsiwal
May 10, 2011 06:14PM
I have not yet run the nginx with valgrind. However, changing the
original lua file to the following fixes the issue. It turns out the
output can be 100MB+. I will keep digging.

local prox = 3201
local nrAgent = 8
ngx.print("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
return(res.status)
end
if(res.status == ngx.HTTP_OK and string.len(res.body)> 0) then
ngx.print(res.body)
end
end



On 05/10/2011 05:54 AM, agentzh wrote:
> On Tue, May 10, 2011 at 11:45 AM, Sirsiwal, Umesh<usirsiwal@verivue.com> wrote:
>> 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:
>>
> Hmm, LuaJIT 2.0 beta7 passes ngx_lua's test suite completely with
> nginx 0.8.54 and 1.0.1 on my Slackware Linux, with or without valgrind
> and/or etcproxy. We cannot reproduce it on our side. Sigh. We cannot
> easily run your config due to your custom C modules which are not
> opensourced and are also open to lurking bugs.
>
> Your backtrace looks so funny that the lua_newthread function returned
> a pointer with the value -1, which is unspecified in the Lua
> documentation and is unlikely to happen. So it's very likely a
> consequence (rather than the real cause) of a corrupted heap that
> might appear much earlier than the crash.
>
> Could you try running your server with the standard Lua 5.1
> interpreter instead? If it does not crash any more, then it's very
> likely a bug in LuaJIT2.0 (or the way ngx_lua interacts with it in
> particular).
>
> Also, please consider running your server with valgrind's memcheck
> tool to see if there's any memory invalid reads/writes prior to the
> crash. Fortunately, valgrind runs very well on Linux, as compared to
> Mac OS X.
>
> Another suggestion is to further minimize your config to exclude your
> own modules such that we can run your sample on our side directly ;)
>
> Regards,
> -agentzh
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel@nginx.org
> http://nginx.org/mailman/listinfo/nginx-devel


_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Nginx-LuaJIT core

Sirsiwal, Umesh 3471 May 09, 2011 10:58PM

Re: Nginx-LuaJIT core

agentzh 816 May 09, 2011 11:18PM

RE: Nginx-LuaJIT core

Sirsiwal, Umesh 802 May 09, 2011 11:48PM

Re: Nginx-LuaJIT core

agentzh 712 May 10, 2011 05:56AM

Re: Nginx-LuaJIT core

Umesh Sirsiwal 774 May 10, 2011 06:14PM

Re: Nginx-LuaJIT core

agentzh 879 May 11, 2011 12:22AM

RE: Nginx-LuaJIT core

Sirsiwal, Umesh 1292 May 17, 2011 11:16PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 183
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready