lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> I am working on a web framework that uses lua embedded in multithreaded web
> server - https://github.com/sergeyzavadski/breeze.
> 
> It uses multiple threads for HTTP requests processing, each having separate
> lua state
> 
> When performing benchmarking tests under linux,  I am intermittently seeing
> crash in lua garbage collection (as demonstrated by following stacktrace)
> 
> [...]
> 
> Is this a legitimate lua issue and is there a workaround possible?

Some points to keep in mind:

* Currently Lua GC has no known bugs, and bugs there are rare (or at least
rarely found).

* Because the GC traverses all objects in the system, it is one of the
main "candidates" to suffer from a memory corruption created somewhere
else.

* The GC is one the most complex parts of Lua, and the most
difficult to test. Bugs there can never be rulled out.

* Multithreading is also notoriously hard to get right.

Have you tried something like valgrind?

-- Roberto