Hi all!
I've just kicked out OpenResty 1.7.2.1 RC2 for testing:
http://openresty.org/download/ngx_openresty-1.7.2.1rc2.tar.gz
There was an important memory leak regression (regarding user "light
threads" *and* ngx.on_abort) in ngx_lua 0.9.9 included in the previous
RC1 release. It has been fixed in 0.9.10 included in this RC2.
Another highlight is the new resty.lrucache.pureffi class in lua-resty-lrucache.
Complete change log since the last 1.7.2.1 RC1 release:
* upgraded LuaJIT to v2.1-20140707:
https://github.com/openresty/luajit2/tags
* imported Mike Pall's latest bug fixes and other changes:
* bugfix: Fix ABC elimination (for negative table indexes,
for example).
* bugfix: FFI: Fix compilation of reference field access.
* upgraded the lua-resty-lrucache library to 0.02.
* feature: added an alternative implementation using FFI-based
hash-table in the form of the new class
"resty.lrucache.pureffi", which is much faster than the
default "resty.lrucache" class when there are a lot of key
variations. thanks Shuxin Yang for the patch.
* upgraded the ngx_lua module to 0.9.10.
* bugfix: when the ngx.on_abort() user thread was created but
never run *and* some other pending user thread was aborted
prematurely, the latter thread might get leaked. thanks Dane
Knecht for the report. this regression had appeared in the
v0.9.9 release.
* bugfix: we should use "c->buffered &
NGX_HTTP_LOWLEVEL_BUFFERED" instead of "c->buffered" for
testing if the downstream connection is busy writing.
* bugfix: we did not handle an out-of-memory case in
ngx.req.set_body_data().
* bugfix: ngx_http_lua_chain_get_free_buf(): avoided returning
zero-sized memory bufs.
* bugfix: body_filter_by_lua*: we might incorrecly pass
zero-size bufs (in the form of "special sync bufs") at the
beginning of a chain, which could get stuck in the buffer of
"ngx_http_writer_filter_module" (or in other words, being
"busy") while could still get recycled in the content
handler (like content_by_lua), leading to buffer
corruptions. thanks westhood for the report and patch.
* bugfix: we did not clear all the fields in the "ngx_buf_t" C
struct when recycling chain link buffers.
* bugfix: the *_by_lua_file directives failed to load .lua
files of exactly the size "n*LUAL_BUFFERSIZE" bytes with the
error "'end' expected (to close 'function' at line 1) near
'<eof>'". thanks kworr for the report.
* bugfix: fixed a compilation error regression when using the
Microsoft Visual C/C++ compiler. thanks itpp16 for the
patch.
* change: now we always iterate through all the user light
threads to ensure all threads are de-anchored even when the
"uthreads" counter gets out of sync. also added an assertion
on the "uthreads" counter.
* change: now we turn off our C-land assertions by default
unless the user explicitly specifies the C compiler option
"-DNGX_LUA_USE_ASSERT".
* change: throw out the "no memory" Lua error consistently
(instead of "out of memory") when failing to allocate on the
nginx side.
* doc: documented the "NGX_LUA_USE_ASSERT" and
"NGX_LUA_ABORT_AT_PANIC" C macros.
* upgraded the ngx_srcache module to 0.28.
* feature: log an error message when srcache_store subrequest
has an error or returns a bad HTTP status code. thanks Yann
Coleu for the report.
* doc: typo fix from javasboy.
* upgraded the ngx_memc module to 0.15.
* bugfix: we did not log error messages for invalid values of
$memc_flags, $memc_exptime, and $memc_value, leading to
hard-to-debug HTTP 400 status errors. thanks Yann Coleu for
the report.
* change: "./configure --with-debug" now also pass the extra C
compiler options "-DNGX_LUA_USE_ASSERT -DNGX_LUA_ABORT_AT_PANIC"
to the the ngx_lua module build.
You're very welcome to try out this RC release on your side. Any
feedback will be highly appreciated. Thank you!
Best regards,
-agentzh