Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] rspamd v3.8.0 fails to start with lua 5-1 (works with lua 5-3 and lua 5-4) #4784

Closed
1 task
erialor opened this issue Jan 20, 2024 · 1 comment · Fixed by #4785
Closed
1 task

[BUG] rspamd v3.8.0 fails to start with lua 5-1 (works with lua 5-3 and lua 5-4) #4784

erialor opened this issue Jan 20, 2024 · 1 comment · Fixed by #4785
Labels

Comments

@erialor
Copy link

erialor commented Jan 20, 2024

Prerequisites

Describe the bug
rspamd fail to start when using lua 5-1 with:

mail ~ # /etc/init.d/rspamd start
rcl parse error: cannot init lua file /usr/share/rspamd/rules/rspamd.lua: error loading module 'lua_maps' from file '/usr/share/rspamd/lualib/lua_maps.lua':
/usr/share/rspamd/lualib/lua_maps.lua:564: nesting of [[...]] is deprecated near '['; trace: [1]:{[C]:-1 - [C]}; [2]:{[C]:-1 - require [C]}; [3]:{/usr/share/rspamd/lualib/global_functions.lua:21 - [main]}; [4]:{[C]:-1 - require [C]}; [5]:{rspamd.lua:19 - [main]};

  • ERROR: rspamd failed to start
    mail ~ #

Steps to Reproduce

  1. Make sure your using Lua 5.1
  2. Compile rspamd 3.8.0
  3. Start rspamd 3.8.0

Expected behavior
After changing to Lua 5.3 or Lua 5.4 it just starts:
mail ~ # /etc/init.d/rspamd start

  • Caching service dependencies ... [ ok ]
    implicitly enabling luapattern returncodes_matcher for rule nil
    implicitly enabling luapattern returncodes_matcher for rule nil
  • Starting rspamd ...
    2024-01-20 14:51:04 #7788(main) <12d986>; main; main: rspamd 3.8.0 is loading configuration, build id: release [ ok ]
    mail ~ #

Versions

mail ~ # rspamd --version
Rspamd daemon version 3.8.0

CPU architecture x86_64; features: avx2, avx, sse2, sse3, ssse3, sse4.1, sse4.2, rdrand
Hyperscan enabled: TRUE
Jemalloc enabled: FALSE
LuaJIT enabled: FALSE (Lua version: Lua 5.1)
ASAN enabled: FALSE
BLAS enabled: FALSE
Fasttext enabled: FALSE

Additional Information

https://bugs.gentoo.org/922522

@erialor erialor added the bug label Jan 20, 2024
@arkamar
Copy link
Contributor

arkamar commented Jan 20, 2024

I have bisected it, the issue was introduced in commit b189c9f ("[Minor] lua_maps docs: apply formatting"). I guess it is about nested comments.

arkamar added a commit to arkamar/rspamd that referenced this issue Jan 20, 2024
Rspamd fails to start with lua 5-1 without this change.

Fixes: b189c9f ("[Minor] lua_maps docs: apply formatting")
Fixes: rspamd#4784
arkamar added a commit to arkamar/rspamd that referenced this issue Jan 20, 2024
Rspamd fails to start with lua 5-1 without this change.

Bug: https://bugs.gentoo.org/922522
Fixes: b189c9f ("[Minor] lua_maps docs: apply formatting")
Fixes: rspamd#4784
arkamar added a commit to arkamar/rspamd that referenced this issue Jan 22, 2024
Rspamd fails to start with Lua-5.1 because long comment does not allow
nesting, see [1]. This change replaces it to short comments in order to
fix the issue but preserves this part as comment in docs.

[1] https://www.lua.org/manual/5.1/manual.html#7.1

Bug: https://bugs.gentoo.org/922522
Fixes: b189c9f ("[Minor] lua_maps docs: apply formatting")
Fixes: rspamd#4784
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants