mail-search backtrace

Hugh Bragg
Sat, 21 May 2016 19:17:23 -0000

On 13/04/16 06:41, Timo Sirainen wrote:
> On 09 Apr 2016, at 21:48, Hugh Bragg <hughbragg at dodo.com.au>
wrote:
>> I'm repeatedly getting this error:
>>
>> Apr 07 04:37:27 imap(mymail at address): Panic: file mail-search.c:
line 84 (mail_search_arg_init): assertion failed: (arg->initialized.keywords
== NULL)
>> Apr 07 04:37:27 imap(mymail at address): Error: Raw backtrace:
/usr/lib64/dovecot/libdovecot.so.0(+0x827c2) [0x7fcb7f65e7c2] ->
/usr/lib64/dovecot/libdovecot.so.0(+0x828ad) [0x7fcb7f65e8ad] ->
/usr/lib64/dov
>> ecot/libdovecot.so.0(i_fatal+0) [0x7fcb7f605b01] ->
/usr/lib64/dovecot/libdovecot-storage.so.0(mail_search_arg_init+0x228)
[0x7fcb7f91a328] ->
/usr/lib64/dovecot/libdovecot-storage.so.0(index_search_result_updat
>> e_flags+0x100) [0x7fcb7f98e470] ->
/usr/lib64/dovecot/libdovecot-storage.so.0(index_sync_search_results_update+0x52)
[0x7fcb7f9983e2] ->
/usr/lib64/dovecot/libdovecot-storage.so.0(index_mailbox_sync_deinit+0x185
>> ) [0x7fcb7f998bb5] ->
/usr/lib64/dovecot/libdovecot-storage.so.0(mailbox_sync_deinit+0x32)
[0x7fcb7f921222] ->
/usr/lib64/dovecot/lib20_virtual_plugin.so(virtual_storage_sync_init+0xab3)
[0x7fcb7e9f7313] -> /usr
> It's coming from virtual mailboxes.
>
>> namespace virtual {
>>   location = virtual:/var/mail/vhosts/%d/%n/virtual
>>   prefix = virtual.
>>   separator = .
>> }
> What do your dovecot-virtual files contain? I guess opening one of those
virtual mailboxes crashes always. Related to searching keywords.
It still happens once in a while. It just won't expunge old messages
from unseen. There is no other trace or log message.
I was hoping to isolate the cause, but all I could only say for sure
that it happens sometime after Dovecot first starts up and I have to
restart to fix it.
dovecot-virtual files look like this:
# cat virtual/all/dovecot-virtual
*
   all
# cat virtual/Unseen/dovecot-virtual
virtual.all
   inthread refs unseen


A fresh trace:

May 21 00:28:08 imap(x at y): Panic: file mail-search.c: line 84
(mail_search_arg_init): assertion failed: (arg->initialized.keywords ==
NULL)
May 21 00:28:08 imap(x at y): Error: Raw backtrace:
/usr/lib64/dovecot/libdovecot.so.0(+0x85c62) [0x7f4fd8915c62] ->
/usr/lib64/dovecot/libdovecot.so.0(+0x85d4d) [0x7f4fd8915d4d] ->
/usr/lib64/dov
ecot/libdovecot.so.0(i_fatal+0) [0x7f4fd88ba5c1] ->
/usr/lib64/dovecot/libdovecot-storage.so.0(mail_search_arg_init+0x228)
[0x7f4fd8bd4b78] ->
/usr/lib64/dovecot/libdovecot-storage.so.0(index_search_result_updat
e_flags+0x100) [0x7f4fd8c49d00] ->
/usr/lib64/dovecot/libdovecot-storage.so.0(index_sync_search_results_update+0x52)
[0x7f4fd8c53ce2] ->
/usr/lib64/dovecot/libdovecot-storage.so.0(index_mailbox_sync_deinit+0x185
) [0x7f4fd8c544b5] ->
/usr/lib64/dovecot/libdovecot-storage.so.0(mailbox_sync_deinit+0x32)
[0x7f4fd8bdba82] ->
/usr/lib64/dovecot/lib20_virtual_plugin.so(virtual_storage_sync_init+0x538)
[0x7f4fd7caa428] -> /usr
/lib64/dovecot/libdovecot-storage.so.0(mailbox_sync_init+0x3b)
[0x7f4fd8bdb9fb] -> dovecot/imap(imap_sync_init+0x68) [0x56091d93b078]
-> dovecot/imap(+0x1210e) [0x56091d92710e] -> dovecot/imap(+0x1234d)
[0x56091
d92734d] ->
/usr/lib64/dovecot/libdovecot.so.0(io_loop_handle_timeouts+0xea)
[0x7f4fd892984a] ->
/usr/lib64/dovecot/libdovecot.so.0(io_loop_handler_run_internal+0xbb)
[0x7f4fd892ae4b] -> /usr/lib64/dovecot/libdo
vecot.so.0(io_loop_handler_run+0x25) [0x7f4fd8929a75] ->
/usr/lib64/dovecot/libdovecot.so.0(io_loop_run+0x38) [0x7f4fd8929c18] ->
/usr/lib64/dovecot/libdovecot.so.0(master_service_run+0x13)
[0x7f4fd88c0123] -> d
ovecot/imap(main+0x328) [0x56091d922a98] ->
/lib64/libc.so.6(__libc_start_main+0xf0) [0x7f4fd84ef580] ->
dovecot/imap(_start+0x29) [0x56091d922c19]