dnsdist: Lock the Lua context before executing a LuaAction #3388

Merged
merged 1 commit into from Feb 16, 2016

Projects

None yet

2 participants

@rgacogne
Member

Otherwise the stack of the Lua context might get corrupted
whenever another Lua function (blockfilter, policy, maintenance or
another LuaAction) is simultaneously called from another thread.

We might be able to use a separate execution stack via
createThread()/lua_newthread(), but if I understand correctly how
it works, we would need to be sure that the Lua function called
does not access the global state at all, which is probably too
restrictive.

This should fix #3374, #3375, #3376, #3377, #3378, #3379, #3383,
and hopefully the random travis failures in our regression tests.

@rgacogne rgacogne dnsdist: Lock the Lua context before executing a LuaAction
Otherwise the stack of the Lua context might get corrupted
whenever another Lua function (blockfilter, policy, maintenance or
another LuaAction) is simultaneously called from another thread.

We might be able to use a separate execution stack via
createThread()/lua_newthread(), but if I understand correctly how
it works, we would need to be sure that the Lua function called
does not access the global state at all, which is probably too
restrictive.

This should fix #3374, #3375, #3376, #3377, #3378, #3379, #3383,
and hopefully the random travis failures in our regression tests.
01d9286
@ahupowerdns ahupowerdns merged commit a47cd53 into PowerDNS:master Feb 16, 2016

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@rgacogne rgacogne deleted the rgacogne:dnsdist-lua-lock branch Feb 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment