Hi all,

when I try to search in a virtual mailbox with FTS enabled, imap cores dump.

Sample IMAP session in a virtual mailbox:

1 OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE SNIPPET=FUZZY PREVIEW=FUZZY STATUS=SIZE SAVEDATE LITERAL+ NOTIFY] Logged in
2 SELECT Search/All
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags permitted.
* 1 EXISTS
* 0 RECENT
* OK [UNSEEN 1] First unseen.
* OK [UIDVALIDITY 1602234810] UIDs valid
* OK [UIDNEXT 2] Predicted next UID
2 OK [READ-WRITE] Select completed (0.002 + 0.000 + 0.001 secs).
2 UID SEARCH HEADER From user
Connection closed by foreign host.

When I search in INBOX all OK:

1 OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE SNIPPET=FUZZY PREVIEW=FUZZY STATUS=SIZE SAVEDATE LITERAL+ NOTIFY] Logged in
2 SELECT INBOX
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags permitted.
* 1 EXISTS
* 0 RECENT
* OK [UNSEEN 1] First unseen.
* OK [UIDVALIDITY 1602234520] UIDs valid
* OK [UIDNEXT 2] Predicted next UID
* OK [NOMODSEQ] No permanent modsequences
2 OK [READ-WRITE] Select completed (0.003 + 0.000 + 0.002 secs).
2 UID SEARCH HEADER From user
* SEARCH 1
2 OK Search completed (0.002 + 0.000 + 0.001 secs).

Error log:
Oct 09 12:58:22 Panic: imap(user)<31554><Y3pl0zqx3s9/AAAB>: Module context fts_mailbox_list_module missing
Oct 09 12:58:22 Error: imap(user)<31554><Y3pl0zqx3s9/AAAB>: Raw backtrace: /usr/lib64/dovecot/libdovecot.so.0(backtrace_append+0x42) [0x7fbe88afddf2] -> /usr/lib64/dovecot/libdovecot.so.0(backtrace_get+0x1e) [0x7fbe88afdefe] -> /usr/lib64/dovecot/libdovecot.so.0(+0xec42e) [0x7fbe88b0842e] -> /usr/lib64/dovecot/libdovecot.so.0(+0xec4d1) [0x7fbe88b084d1] -> /usr/lib64/dovecot/libdovecot.so.0(i_fatal+0) [0x7fbe88a5f4ea] -> /usr/lib64/dovecot/lib20_fts_plugin.so(+0x123f7) [0x7fbe8821f3f7] -> /usr/lib64/dovecot/lib20_fts_plugin.so(+0xe2f4) [0x7fbe8821b2f4] -> /usr/lib64/dovecot/lib20_fts_plugin.so(fts_search_lookup+0xd4) [0x7fbe8821b7b4] -> /usr/lib64/dovecot/lib20_fts_plugin.so(+0x11a98) [0x7fbe8821ea98] -> dovecot/imap(imap_search_start+0x70) [0x55e251f4e620] -> dovecot/imap(cmd_search+0xd6) [0x55e251f3ea86] -> dovecot/imap(command_exec+0x64) [0x55e251f46cc4] -> dovecot/imap(+0x1ce4f) [0x55e251f44e4f] -> dovecot/imap(+0x1ced7) [0x55e251f44ed7] -> dovecot/imap(client_handle_input+0x205) [0x55e251f45365] -> dovecot/imap(client_input+0x75) [0x55e251f45925] -> /usr/lib64/dovecot/libdovecot.so.0(io_loop_call_io+0x65) [0x7fbe88b20b45] -> /usr/lib64/dovecot/libdovecot.so.0(io_loop_handler_run_internal+0x12b) [0x7fbe88b2249b] -> /usr/lib64/dovecot/libdovecot.so.0(io_loop_handler_run+0x59) [0x7fbe88b20c49] -> /usr/lib64/dovecot/libdovecot.so.0(io_loop_run+0x38) [0x7fbe88b20e88] -> /usr/lib64/dovecot/libdovecot.so.0(master_service_run+0x13) [0x7fbe88a90393] -> dovecot/imap(main+0x332) [0x55e251f36f12] -> /lib64/libc.so.6(__libc_start_main+0xf5) [0x7fbe88670555] -> dovecot/imap(+0xf115) [0x55e251f37115]
Oct 09 12:58:22 Fatal: imap(user)<31554><Y3pl0zqx3s9/AAAB>: master: service(imap): child 31554 killed with signal 6 (core dumped)

Dovecot configuration (doveconf -n):
# 2.3.11.3 (502c39af9): /etc/dovecot/dovecot.conf
# OS: Linux 3.10.0-1127.19.1.el7.x86_64 x86_64 CentOS Linux release 7.8.2003 (Core)
first_valid_uid = 1000
mail_debug = yes
mail_location = maildir:~/Maildir:INDEX=MEMORY
mail_plugins = virtual fts fts_lucene
mbox_write_locks = fcntl
namespace inbox {
  inbox = yes
  location =
  prefix =
  separator = /
}
namespace virtual {
  hidden = yes
  list = no
  location = virtual:/etc/dovecot/virtual:INDEX=~/virtual
  prefix = Search/
  separator = /
  subscriptions = no
  type = private
}
passdb {
  args = scheme=PLAIN username_format=%u /etc/dovecot/users
  driver = passwd-file
}
plugin {
  fts = lucene
  fts_lucene = whitespace_chars=@.
}
userdb {
  args = username_format=%u /etc/dovecot/users
  driver = passwd-file
}

Backtrace:
#0  0x00007fbe88684387 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:55
#1  0x00007fbe88685a78 in __GI_abort () at abort.c:90
#2  0x00007fbe88b083e7 in default_fatal_finish (status=0, type=<optimized out>) at failures.c:459
#3  fatal_handler_real (ctx=<optimized out>, format=<optimized out>, args=<optimized out>) at failures.c:471
#4  0x00007fbe88b084d1 in i_internal_fatal_handler (ctx=<optimized out>, format=<optimized out>, args=<optimized out>) at failures.c:848
#5  0x00007fbe88a5f4ea in i_panic (format=format@entry=0x7fbe88225058 "Module context fts_mailbox_list_module missing") at failures.c:523
#6  0x00007fbe8821f3f7 in fts_mailbox_backend (box=<optimized out>) at fts-storage.c:957
#7  0x00007fbe8821b2f4 in fts_search_lookup_level_multi (and_args=<optimized out>, args=0x55e253347698, fctx=0x55e2533be330) at fts-search.c:182
#8  fts_search_lookup_level (fctx=fctx@entry=0x55e2533be330, args=0x55e253347698, and_args=and_args@entry=true) at fts-search.c:210
#9  0x00007fbe8821b7b4 in fts_search_lookup (fctx=fctx@entry=0x55e2533be330) at fts-search.c:360
#10 0x00007fbe8821ea98 in fts_mailbox_search_init (t=0x55e253342e60, args=0x55e2533475c8, sort_program=<optimized out>, wanted_fields=0, wanted_headers=0x0) at fts-storage.c:260
#11 0x000055e251f4e620 in imap_search_start (ctx=ctx@entry=0x55e2533353f0, sargs=0x55e2533475c8, sort_program=sort_program@entry=0x0) at imap-search.c:540
#12 0x000055e251f3ea86 in cmd_search (cmd=0x55e253335238) at cmd-search.c:48
#13 0x000055e251f46cc4 in command_exec (cmd=cmd@entry=0x55e253335238) at imap-commands.c:201
#14 0x000055e251f44e4f in client_command_input (cmd=cmd@entry=0x55e253335238) at imap-client.c:1178
#15 0x000055e251f44ed7 in client_command_input (cmd=0x55e253335238) at imap-client.c:1243
#16 0x000055e251f45365 in client_handle_next_command (remove_io_r=<synthetic pointer>, client=0x55e2533349c8) at imap-client.c:1285
#17 client_handle_input (client=client@entry=0x55e2533349c8) at imap-client.c:1299
#18 0x000055e251f45925 in client_input (client=0x55e2533349c8) at imap-client.c:1343
#19 0x00007fbe88b20b45 in io_loop_call_io (io=0x55e25332dfe0) at ioloop.c:713
#20 0x00007fbe88b2249b in io_loop_handler_run_internal (ioloop=ioloop@entry=0x55e253311de0) at ioloop-epoll.c:222
#21 0x00007fbe88b20c49 in io_loop_handler_run (ioloop=ioloop@entry=0x55e253311de0) at ioloop.c:765
#22 0x00007fbe88b20e88 in io_loop_run (ioloop=0x55e253311de0) at ioloop.c:738
#23 0x00007fbe88a90393 in master_service_run (service=0x55e253311c40, callback=callback@entry=0x55e251f53340 <client_connected>) at master-service.c:851
#24 0x000055e251f36f12 in main (argc=1, argv=0x55e253311960) at main.c:534

I tried with both solr and lucene engines, always core dump.

Packages installed:
  • dovecot-2.3.11.3-4.x86_64
  • dovecot-debuginfo-2.3.11.3-4.x86_64
Maybe I missed a configuration parameter?

Thank you.