Cheyi Lin wrote: > Sorry about lack of related context, here it is, foo.lua and main.lua. This does not reproduce any problem here. Please provide an short, isolated and complete test case, without any external dependencies that reproducibly shows the problem when run by the standard LuaJIT executable. > I embedded LuaJIT 2.0.2 (git e3d5b21) in C, an event-driven server > application, with a 'tick' timer that invokes a top level Lua function > periodically to processing queued events one by one. Maybe the error is in the use of the Lua/C API. Turn on assertions in LuaJIT and rebuild/relink. Also, when is the enqueuing function called? Make sure to never use any lua_* API from different threads without locking. --Mike