FS#73664 - [powerdns-recursor] new luajit makes it crash

Attached to Project: Community Packages
Opened by Oleksandr Natalenko (post-factum) - Monday, 07 February 2022, 07:58 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Monday, 07 February 2022, 10:22 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Remi Gacogne (rgacogne)
Levente Polyak (anthraxx)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

After upgrading `luajit` from `2.0.5-3` to `2.1.0.beta3.r384.g1d7b5029-1` `pdns-recursor` started to crash often with the following error:

```
pdns_recursor: ext/luawrapper/include/LuaContext.hpp:107: LuaContext::LuaContext(bool)::<lambda(lua_State*)>: Assertion `false && "lua_atpanic triggered"' failed.
```

Downgrading `luajit` from `2.1.0.beta3.r384.g1d7b5029-1` to `2.0.5-3` solves the issue.

Lua is being used like this:

```
lua-dns-script=/etc/powerdns/process.lua
```

and then in `/etc/powerdns/process.lua`:

```
test_questions = getMetric("test_questions")
nontest_questions = getMetric("nontest_questions")

function preresolve(dq)
if string.find(dq.qname:toString(), "^%w+%.test%.dnscrypt%.$") ~= nil then
test_questions:inc()
else
nontest_questions:inc()
end

-- DoS
if dq.qtype == pdns.ANY then
dq.appliedPolicy.policyKind = pdns.policykinds.Drop
return false
end

return false
end
```
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Monday, 07 February 2022, 10:22 GMT
Reason for closing:  Not a bug
Additional comments about closing:  2022-02-07: A task closure has been requested. Reason for request: Custom `MemoryDenyWriteExecute=true` setting is the culprit.
Comment by Oleksandr Natalenko (post-factum) - Monday, 07 February 2022, 08:20 GMT
Disregard, it's because I have `MemoryDenyWriteExecute=true` in my `.service` file. I wonder why it worked with old `luajit`.

Loading...