Hi I'm reposting this patch, which I have been applying locally since I originally posted it. Hopefully it can be considered for inclusion in the official release. It was tested on dovecot 2.3.16 but applies against the latest version 2.3.17.1. This is the "assertion failed" that it addresses doveadm fts lookup -u john@voipsupport.it body "text to look for" doveadm(john@voipsupport.it): Panic: file mail-storage.c: line 2108 (mailbox_get_open_status): assertion failed: (box->opened) doveadm(john@voipsupport.it): Error: Raw backtrace: /usr/local/lib/dovecot/libdovecot.so.0(backtrace_append+0x42) [0x7ff624fa7072] -> /usr/local/lib/dovecot/libdovecot.so.0(backtrace_get+0x1e) [0x7ff624fa718e] -> /usr/local/lib/dovecot/libdovecot.so.0(+0xffc3b) [0x7ff624fb3c3b] -> /usr/local/lib/dovecot/libdovecot.so.0(+0xffc71) [0x7ff624fb3c71] -> /usr/local/lib/dovecot/libdovecot.so.0(+0x5536f) [0x7ff624f0936f] -> /usr/local/lib/dovecot/libdovecot-storage.so.0(+0x3fc31) [0x7ff6250bcc31] -> /usr/local/lib/dovecot/lib21_fts_solr_plugin.so(+0x540d) [0x7ff62244f40d] -> /usr/local/lib/dovecot/lib20_fts_plugin.so(fts_backend_lookup+0x4d) [0x7ff6246b624d] -> /usr/local/lib/dovecot/doveadm/lib20_doveadm_fts_plugin.so(+0x2e8c) [0x7ff62240ce8c] -> doveadm(+0x31ded) [0x55f0c7f3aded] -> doveadm(+0x32862) [0x55f0c7f3b862] -> doveadm(doveadm_cmd_ver2_to_mail_cmd_wrapper+0x22d) [0x55f0c7f3c6fd] -> doveadm(doveadm_cmd_run_ver2+0x4d8) [0x55f0c7f4d158] -> doveadm(doveadm_cmd_try_run_ver2+0x3a) [0x55f0c7f4d1aa] -> doveadm(main+0x1f6) [0x55f0c7f2b606] -> /lib64/libc.so.6(__libc_start_main+0xd5) [0x7ff624bc8b75] -> doveadm(_start+0x2e) [0x55f0c7f2ba0e] Aborted (core dumped) Here's the patch: diff -ur dovecot-2.3.17.1-orig/src/plugins/fts/doveadm-fts.c dovecot-2.3.17.1-new/src/plugins/fts/doveadm-fts.c --- dovecot-2.3.17.1-orig/src/plugins/fts/doveadm-fts.c 2021-12-03 12:48:47.000000000 +0100 +++ dovecot-2.3.17.1-new/src/plugins/fts/doveadm-fts.c 2022-01-09 01:33:23.396342025 +0100 @@ -47,6 +47,14 @@ i_array_init(&result.scores, 16); box = mailbox_alloc(info->ns->list, info->vname, 0); + mailbox_set_reason(box,"fts search"); + if (mailbox_open(box) < 0) { + i_error("Couldn't open mailbox: %s", + mailbox_get_last_internal_error(box, NULL)); + doveadm_mail_failed_error(ctx, MAIL_ERROR_TEMP); + return -1; + } + if (fts_backend_lookup(backend, box, ctx->search_args->args, FTS_LOOKUP_FLAG_AND_ARGS, &result) < 0) { i_error("fts lookup failed"); John
On 09/01/2022 05:46 John Fawcett
wrote: Hi
I'm reposting this patch, which I have been applying locally since I originally posted it. Hopefully it can be considered for inclusion in the official release. It was tested on dovecot 2.3.16 but applies against the latest version 2.3.17.1.
This is the "assertion failed" that it addresses
doveadm fts lookup -u john@voipsupport.it body "text to look for"
doveadm(john@voipsupport.it): Panic: file mail-storage.c: line 2108 (mailbox_get_open_status): assertion failed: (box->opened) doveadm(john@voipsupport.it): Error: Raw backtrace: /usr/local/lib/dovecot/libdovecot.so.0(backtrace_append+0x42) [0x7ff624fa7072] -> /usr/local/lib/dovecot/libdovecot.so.0(backtrace_get+0x1e) [0x7ff624fa718e] -> /usr/local/lib/dovecot/libdovecot.so.0(+0xffc3b) [0x7ff624fb3c3b] -> /usr/local/lib/dovecot/libdovecot.so.0(+0xffc71) [0x7ff624fb3c71] -> /usr/local/lib/dovecot/libdovecot.so.0(+0x5536f) [0x7ff624f0936f] -> /usr/local/lib/dovecot/libdovecot-storage.so.0(+0x3fc31) [0x7ff6250bcc31] -> /usr/local/lib/dovecot/lib21_fts_solr_plugin.so(+0x540d) [0x7ff62244f40d] -> /usr/local/lib/dovecot/lib20_fts_plugin.so(fts_backend_lookup+0x4d) [0x7ff6246b624d] -> /usr/local/lib/dovecot/doveadm/lib20_doveadm_fts_plugin.so(+0x2e8c) [0x7ff62240ce8c] -> doveadm(+0x31ded) [0x55f0c7f3aded] -> doveadm(+0x32862) [0x55f0c7f3b862] -> doveadm(doveadm_cmd_ver2_to_mail_cmd_wrapper+0x22d) [0x55f0c7f3c6fd] -> doveadm(doveadm_cmd_run_ver2+0x4d8) [0x55f0c7f4d158] -> doveadm(doveadm_cmd_try_run_ver2+0x3a) [0x55f0c7f4d1aa] -> doveadm(main+0x1f6) [0x55f0c7f2b606] -> /lib64/libc.so.6(__libc_start_main+0xd5) [0x7ff624bc8b75] -> doveadm(_start+0x2e) [0x55f0c7f2ba0e] Aborted (core dumped)
Here's the patch:
diff -ur dovecot-2.3.17.1-orig/src/plugins/fts/doveadm-fts.c dovecot-2.3.17.1-new/src/plugins/fts/doveadm-fts.c --- dovecot-2.3.17.1-orig/src/plugins/fts/doveadm-fts.c 2021-12-03 12:48:47.000000000 +0100 +++ dovecot-2.3.17.1-new/src/plugins/fts/doveadm-fts.c 2022-01-09 01:33:23.396342025 +0100 @@ -47,6 +47,14 @@ i_array_init(&result.scores, 16);
box = mailbox_alloc(info->ns->list, info->vname, 0); + mailbox_set_reason(box,"fts search"); + if (mailbox_open(box) < 0) { + i_error("Couldn't open mailbox: %s", + mailbox_get_last_internal_error(box, NULL)); + doveadm_mail_failed_error(ctx, MAIL_ERROR_TEMP); + return -1; + } + if (fts_backend_lookup(backend, box, ctx->search_args->args, FTS_LOOKUP_FLAG_AND_ARGS, &result) < 0) { i_error("fts lookup failed");
John
Thank you for your patch. We'll take a look at it. Aki
participants (2)
-
Aki Tuomi
-
John Fawcett