Problem with Lua notification script since 2.3.15 update
Aki Tuomi
aki.tuomi at open-xchange.com
Mon Jun 28 13:19:48 EEST 2021
As workaround, you could try dropping script_init function. It might still require downgrading to 2.3.14 to avoid other similar asserts. script_init & script_deinit functions are not mandatory.
Aki
> On 28/06/2021 13:07 Aki Tuomi <aki.tuomi at open-xchange.com> wrote:
>
>
> Hi!
>
> This has been fixed in master with https://github.com/dovecot/core/commit/2b508d396cb1442f4da715b762ca544639bde456.patch
>
> We'll see what to do about 2.3.15.
>
> Aki
>
> > On 28/06/2021 12:47 Vytenis Adm <vytenis.adm at gmail.com> wrote:
> >
> >
> > Not a solution, but I'd like to second this issue.
> >
> > We have a Lua push configured as well, and are currently running
> > dovecot-2.3.14-5 (CentOS 7.9)
> >
> > After bootstrapping new instances with dovecot 2.3.15 the exact same
> > issue appeared:
> >
> > Jun 27 18:28:37 imaphost.tld dovecot[1331]:
> > imap(user at example.com)<23828><zc6HisPFH2kj9m34>: Panic: file
> > dlua-script.c: line 224 (dlua_script_init): assertion failed:
> > (lua_gettop(script->L) == 0)
> > Jun 27 18:28:37 imaphost.tld dovecot[1331]:
> > imap(user at example.com)<23828><zc6HisPFH2kj9m34>: Error: Raw backtrace:
> > /usr/lib64/dovecot/libdovecot.so.0(backtrace_append+0x42)
> > [0x7fb027d2e862] ->
> > /usr/lib64/dovecot/libdovecot.so.0(backtrace_get+0x1e) [0x7fb027d2e96e]
> > -> /usr/lib64/dovecot/libdovecot.so.0(+0xf50fe) [0x7fb027d3c0fe] ->
> > /usr/lib64/dovecot/libdovecot.so.0(+0xf51a1) [0x7fb027d3c1a1] ->
> > /usr/lib64/dovecot/libdovecot.so.0(i_fatal+0) [0x7fb027c8c60c] ->
> > /usr/lib64/dovecot/libdovecot-lua.so.0(+0x4214) [0x7fb027062214] ->
> > /usr/lib64/dovecot/lib22_push_notification_lua_plugin.so(+0x2b7b)
> > [0x7fb024f78b7b] ->
> > /usr/lib64/dovecot/lib20_push_notification_plugin.so(push_notification_driver_init+0x199)
> > [0x7fb0260ff819] ->
> > /usr/lib64/dovecot/lib20_push_notification_plugin.so(+0x76df)
> > [0x7fb0261016df] ->
> > /usr/lib64/dovecot/lib20_push_notification_plugin.so(+0x7e00)
> > [0x7fb026101e00] ->
> > /usr/lib64/dovecot/libdovecot-storage.so.0(hook_mail_user_created+0x209)
> > [0x7fb0280529b9] ->
> > /usr/lib64/dovecot/libdovecot-storage.so.0(mail_user_init+0x220)
> > [0x7fb028059130] ->
> > /usr/lib64/dovecot/libdovecot-storage.so.0(mail_storage_service_next_with_session_suffix+0x5ff)
> > [0x7fb0280565cf] ->
> > /usr/lib64/dovecot/libdovecot-storage.so.0(mail_storage_service_lookup_next+0x4f)
> > [0x7fb028056cef] -> dovecot/imap(client_create_from_input+0x110)
> > [0x55702bdf2120] -> dovecot/imap(+0x2d417) [0x55702bdf2417] ->
> > /usr/lib64/dovecot/libdovecot.so.0(+0x73d96) [0x7fb027cbad96] ->
> > /usr/lib64/dovecot/libdovecot.so.0(+0x74153) [0x7fb027cbb153] ->
> > /usr/lib64/dovecot/libdovecot.so.0(+0x74f27) [0x7fb027cbbf27] ->
> > /usr/lib64/dovecot/libdovecot.so.0(connection_input_default+0x158)
> > [0x7fb027d33b48] ->
> > /usr/lib64/dovecot/libdovecot.so.0(io_loop_call_io+0x65)
> > [0x7fb027d54425] ->
> > /usr/lib64/dovecot/libdovecot.so.0(io_loop_handler_run_internal+0x12b)
> > [0x7fb027d55dab] ->
> > /usr/lib64/dovecot/libdovecot.so.0(io_loop_handler_run+0x59)
> > [0x7fb027d54529] -> /usr/lib64/dovecot/libdovecot.so.0(io_loop_run+0x38)
> > [0x7fb027d54768] ->
> > /usr/lib64/dovecot/libdovecot.so.0(master_service_run+0x13)
> > [0x7fb027cbe3c3] -> dovecot/imap(main+0x342) [0x55702bdd42f2] ->
> > /lib64/libc.so.6(__libc_start_main+0xf5) [0x7fb02789b555] ->
> > dovecot/imap(+0xf4f5) [0x55702bdd44f5]
> >
> > Jun 27 18:28:37 imaphost.tld dovecot[1331]:
> > imap(user at example.com)<23828><zc6HisPFH2kj9m34>: Fatal: master:
> > service(imap): child 23828 killed with signal 6 (core dumps disabled -
> > https://dovecot.org/bugreport.html#coredumps)
> >
> >
> > The workaround was to downgrade to dovecot-2.3.14-5, and the issues were
> > gone.
> >
> >
> >
> >
> > On 2021-06-28 12:31, Ralf Becker wrote:
> > > If the Lua-notifications are enabled, Dovecot imap dies immediately at
> > > authentication:
> > >
> > > Jun 28 09:17:29 imap-login: Info: Login: user=<ralf>, method=PLAIN,
> > > rip=172.18.0.12, lip=172.18.0.16, mpid=16, TLS,
> > > session=<dDhm9c/FYtqsEgAM>
> > > Jun 28 09:17:29 imap(ralf)<16><dDhm9c/FYtqsEgAM>: Panic: file
> > > dlua-script.c: line 224 (dlua_script_init): assertion failed:
> > > (lua_gettop(script->L) == 0)
> > > Jun 28 09:17:29 imap(ralf)<16><dDhm9c/FYtqsEgAM>: Error: Raw
> > > backtrace: /usr/lib/dovecot/libdovecot.so.0(backtrace_append+0x41)
> > > [0x7f9f537ca5c1] ->
> > > /usr/lib/dovecot/libdovecot.so.0(backtrace_get+0x22) [0x7f9f537ca6e2]
> > > -> /usr/lib/dovecot/libdovecot.so.0(+0x1070bb) [0x7f9f537d70bb] ->
> > > /usr/lib/dovecot/libdovecot.so.0(+0x107157) [0x7f9f537d7157] ->
> > > /usr/lib/dovecot/libdovecot.so.0(+0x5bb2b) [0x7f9f5372bb2b] ->
> > > /usr/lib/dovecot/libdovecot-lua.so.0(+0x5354) [0x7f9f53311354] ->
> > > /usr/lib/dovecot/modules/lib22_push_notification_lua_plugin.so(+0x3842)
> > > [0x7f9f532c6842] ->
> > > /usr/lib/dovecot/modules/lib20_push_notification_plugin.so(push_notification_driver_init+0x19c)
> > > [0x7f9f532d062c] ->
> > > /usr/lib/dovecot/modules/lib20_push_notification_plugin.so(+0x846f)
> > > [0x7f9f532d246f] ->
> > > /usr/lib/dovecot/modules/lib20_push_notification_plugin.so(+0x8b6a)
> > > [0x7f9f532d2b6a] ->
> > > /usr/lib/dovecot/libdovecot-storage.so.0(hook_mail_user_created+0x211)
> > > [0x7f9f539084e1] ->
> > > /usr/lib/dovecot/libdovecot-storage.so.0(mail_user_init+0x20b)
> > > [0x7f9f5390e80b] ->
> > > /usr/lib/dovecot/libdovecot-storage.so.0(mail_storage_service_next_with_session_suffix+0x587)
> > > [0x7f9f5390bd57] ->
> > > /usr/lib/dovecot/libdovecot-storage.so.0(mail_storage_service_lookup_next+0x53)
> > > [0x7f9f5390c4c3] -> dovecot/imap(client_create_from_input+0x180)
> > > [0x5626eb18fe40] -> dovecot/imap(+0x3112a) [0x5626eb19012a] ->
> > > /usr/lib/dovecot/libdovecot.so.0(+0x8d60e) [0x7f9f5375d60e] ->
> > > /usr/lib/dovecot/libdovecot.so.0(+0x8d97b) [0x7f9f5375d97b] ->
> > > /usr/lib/dovecot/libdovecot.so.0(+0x8e8be) [0x7f9f5375e8be] ->
> > > /usr/lib/dovecot/libdovecot.so.0(connection_input_default+0x15e)
> > > [0x7f9f537cef5e] ->
> > > /usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x6d)
> > > [0x7f9f537ed3ed] ->
> > > /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run_internal+0x145)
> > > [0x7f9f537eea15] ->
> > > /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0x54)
> > > [0x7f9f537ed494] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x40)
> > > [0x7f9f537ed600] ->
> > > /usr/lib/dovecot/libdovecot.so.0(master_service_run+0x17)
> > > [0x7f9f537609e7] -> dovecot/imap(main+0x469) [0x5626eb172c19] ->
> > > /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)
> > > [0x7f9f535020b3] -> dovecot/imap(_start+0x2e) [0x5626eb172cae]
> > > Jun 28 09:17:29 imap(ralf)<16><dDhm9c/FYtqsEgAM>: Fatal: master:
> > > service(imap): child 16 killed with signal 6 (core dumps disabled -
> > > https://dovecot.org/bugreport.html#coredumps)
> > >
> > > I use the following Dovecot configuration:
> > >
> > > # Store METADATA information in a file dovecot-metadata in user's home
> > > mail_attribute_dict = file:%h/dovecot-metadata
> > >
> > > # enable metadata
> > > protocol imap {
> > > imap_metadata = yes
> > > }
> > >
> > > # add necessary plugins for Lua push notifications
> > > mail_plugins = $mail_plugins mail_lua notify push_notification
> > > push_notification_lua
> > >
> > > # Lua notification script and URL of EGroupware push server
> > > plugin {
> > > push_notification_driver = lua:file=/etc/dovecot/dovecot-push.lua
> > > push_lua_url =
> > > https://Bearer:secret@boulder.egroupware.org/egroupware/push
> > > }
> > >
> > > The Lua script is available under
> > > https://github.com/EGroupware/swoolepush/blob/master/doc/dovecot-push.lua
> > >
> > > The whole Dovecot configurations is available under
> > >
> > > https://github.com/EGroupware/build.opensuse.org/tree/master/server:eGroupWare/egroupware-mail/egroupware-mail/dovecot
> > >
> > >
> > > Dovecot runs in a Ubuntu 20.04 based container and seems to use the
> > > correct liblua5.3:
> > >
> > > root at 750978e5c0ee:/# dpkg -l|grep -i lua
> > > ii dovecot-lua 2:2.3.15-1+ubuntu20.04 amd64 secure
> > > POP3/IMAP server - LUA support
> > > ii liblua5.3-0:amd64 5.3.3-1.1ubuntu2 amd64 Shared library
> > > for the Lua interpreter version 5.3
> > > ii lua-json 1.3.4-2 all JSON
> > > decoder/encoder for Lua
> > > ii lua-lpeg:amd64 1.0.2-1 amd64 LPeg library for
> > > the Lua language
> > > ii lua-socket:amd64 3.0~rc1+git+ac3201d-4 amd64 TCP/UDP
> > > socket library for the Lua language
> > >
> > > Everything was running fine with 2.3.13, have not tried with 2.3.14 yet.
> > >
> > > Any ideas?
> > >
> > > Ralf
> > >
More information about the dovecot
mailing list