Hi,
I have a mailbox where indexing fails with the following error:
# /opt/dovecot2/bin/doveadm -c /tmp/dovecot.conf -o mail_location=/tmp/skesselring index '*' doveadm(root): Panic: file charset-iconv.c: line 132 (charset_to_utf8): assertion failed: (*src_size - pos <= CHARSET_MAX_PENDING_BUF_SIZE) doveadm(root): Error: Raw backtrace: /opt/dovecot2/lib/dovecot/libdovecot.so.0(+0x7c13f) [0x7f1b7376f13f] -> /opt/dovecot2/lib/dovecot/libdovecot.so.0(default_fatal_handler+0x2a) [0x7f1b7376f21a] -> /opt/dovecot2/lib/dovecot/libdovecot.so.0(i_fatal+0) [0x7f1b7371d555] -> /opt/dovecot2/lib/dovecot/libdovecot.so.0(+0x754a7) [0x7f1b737684a7] -> /opt/dovecot2/lib/dovecot/libdovecot.so.0(message_decoder_decode_next_block+0x528) [0x7f1b7375d8d8] -> /opt/dovecot2/lib/dovecot/lib20_fts_plugin.so(fts_build_mail+0x19e) [0x7f1b726fbe3e] -> /opt/dovecot2/lib/dovecot/lib20_fts_plugin.so(+0xfa20) [0x7f1b72701a20] -> /opt/dovecot2/lib/dovecot/libdovecot-storage.so.0(mail_precache+0x19) [0x7f1b73a1fad9] -> /opt/dovecot2/bin/doveadm() [0x4246b1] -> /opt/dovecot2/bin/doveadm() [0x4201d0] -> /opt/dovecot2/bin/doveadm(doveadm_mail_try_run+0x261) [0x421131] -> /opt/dovecot2/bin/doveadm(main+0x34f) [0x41413f] -> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x7f1b73386ead] -> /opt/dovecot2/bin/doveadm() [0x414235] Aborted (core dumped)
Dovecot 2.2.18 build from sources ./configure --prefix=/opt/dovecot2 --with-mysql --with-sqlite --with-solr --with-ssl --disable-rpath --disable-static. Filesystem is ext4
# /opt/dovecot2/bin/doveadm -c /tmp/dovecot.conf config -n # 2.2.18: /tmp/dovecot.conf # OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.8 auth_master_user_separator = * auth_mechanisms = plain login base_dir = /services/dovecot1/var/run default_client_limit = 10240 default_login_user = dovecot dict { quotadict = mysql:/services/dovecot1/etc/quota.conf } disable_plaintext_auth = no log_path = login_log_format_elements = user=%u session=%{session} mpid=%e rip=%r rrip=%{real_rip} mail_location = mdbox:~/mails mail_log_prefix = "store107: %s(%u): %{session}: " mail_max_userip_connections = 0 mail_plugins = quota virtual fts fts_solr notify mail_log mailbox_list_index = yes mdbox_rotate_size = 256 k mmap_disable = yes namespace inbox { inbox = yes location = mailbox Drafts { auto = subscribe special_use = \Drafts } mailbox Junk { auto = subscribe special_use = \Junk } mailbox Sent { auto = subscribe special_use = \Sent } mailbox Trash { auto = subscribe special_use = \Trash } prefix = separator = / } namespace virtual { hidden = yes list = no location = virtual:/services/dovecot1/etc/virtual:INDEX=~/mails/virtual mailbox all { auto = create special_use = \All } mailbox unseen { auto = create } prefix = virtual/ separator = / } passdb { args = /services/dovecot1/etc/passwd.masterusers driver = passwd-file master = yes pass = yes } passdb { args = /services/dovecot1/etc/mysql.conf driver = sql } plugin { fts = solr fts_solr = break-imap-search url=http://10.78.18.127:8080/solr/ mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename flag_change save mailbox_create mail_log_fields = uid box msgid flags quota = dict:user::proxy::quotadict quota_rule = *:storage=1GB quota_rule2 = Trash:storage=+152M quota_rule3 = Trash:messages=+5 } protocols = imap service auth { unix_listener auth-client { mode = 0666 } unix_listener auth-master { group = nogroup mode = 0660 } } service dict { process_limit = 400 unix_listener dict { mode = 0600 user = nobody } } service imap-login { chroot = login client_limit = 2048 inet_listener imap { address = 10.78.18.127 port = 143 } process_limit = 1024 service_count = 0 } service imap { process_limit = 10240 vsz_limit = 320 M } service indexer-worker { process_limit = 4 process_min_avail = 2 service_count = 1 vsz_limit = 1 G } shutdown_clients = no ssl = no syslog_facility = local3 userdb { args = /services/dovecot1/etc/mysql.conf driver = sql } protocol imap { mail_plugins = quota virtual fts fts_solr notify mail_log imap_quota } protocol lda { auth_socket_path = /services/dovecot1/var/run/auth-master mail_plugins = quota virtual fts fts_solr notify mail_log sieve event_broker submission_host = osmtp:8090 }
# gdb /opt/dovecot2/bin/doveadm core GNU gdb (GDB) 7.4.1-debian Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /opt/dovecot2_clean/bin/doveadm...done. [New LWP 4172]
warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by /opt/dovecot2/bin/doveadm -c /tmp/dovecot.conf -o mail_location=/tmp/skesselrin'. Program terminated with signal 6, Aborted. #0 0x00007f1b7339a165 in raise () from /lib/x86_64-linux-gnu/libc.so.6 (gdb) (gdb) (gdb) bt full #0 0x00007f1b7339a165 in raise () from /lib/x86_64-linux-gnu/libc.so.6 No symbol table info available. #1 0x00007f1b7339d3e0 in abort () from /lib/x86_64-linux-gnu/libc.so.6 No symbol table info available. #2 0x00007f1b7376f135 in default_fatal_finish (type=<optimized out>, status=status@entry=0) at failures.c:202 backtrace = 0x2304560 "/opt/dovecot2/lib/dovecot/libdovecot.so.0(+0x7c13f) [0x7f1b7376f13f] -> /opt/dovecot2/lib/dovecot/libdovecot.so.0(default_fatal_handler+0x2a) [0x7f1b7376f21a] -> /opt/dovecot2/lib/dovecot/libdovecot.s"... #3 0x00007f1b7376f21a in default_fatal_handler (ctx=0x7fff678c4510, format=<optimized out>, args=<optimized out>) at failures.c:216 status = 0 #4 0x00007f1b7371d555 in i_panic (format=format@entry=0x7f1b73799298 "file %s: line %d (%s): assertion failed: (%s)") at failures.c:276 ctx = {type = LOG_TYPE_PANIC, exit_status = 0, timestamp = 0x0, timestamp_usecs = 0} args = {{gp_offset = 40, fp_offset = 48, overflow_arg_area = 0x7fff678c4600, reg_save_area = 0x7fff678c4540}} #5 0x00007f1b737684a7 in charset_to_utf8 (t=0x2371a50, src=src@entry=0x23845e0 "\213h\201\347/\364\322*\303\307YpG\a\207\002\222\276\364z\301\350\201\227\335\360<\016(20~\365\254A\373?\326\070ir\364S\270-\006\245\360\237\250\242}iz]ph
<\026T9H\325F\033\301\354\333K\270|\353\345rF3-\277\211\003XOT\375\347\241\273\256\360<\330cy0\327",
src_size=src_size@entry=0x7fff678c4668, dest=0x2369320) at
charset-iconv.c:132
result = CHARSET_RET_INVALID_INPUT
pos = 8226
size = 2183
prev_invalid_pos = 9595
ret = <optimized out>
__FUNCTION__ = "charset_to_utf8"
#6 0x00007f1b7375d8d8 in message_decode_body (output=0x7fff678c4780,
ctx=0x2370b60, input=<optimized out>) at message-decoder.c:342
data = 0x23845e0
"\213h\201\347/\364\322*\303\307YpG\a\207\002\222\276\364z\301\350\201\227\335\360<\016(20~\365\254A\373?\326\070ir\364S\270-\006\245\360\237\250\242}iz]ph`<\026T9H\325F\033\301\354\333K\270|\353\345rF3-\277\211\003XOT\375\347\241\273\256\360<\330cy0\327"
ret = <optimized out>
pos = 6042
size = 6042
error = 0x7fff678c4760 "\020B0\002"
#7 message_decoder_decode_next_block (ctx=0x2370b60,
input=input@entry=0x7fff678c4760,
output=output@entry=0x7fff678c4780) at message-decoder.c:375
No locals.
#8 0x00007f1b726fbe3e in fts_build_mail_real (mail=0x23639b0,
update_ctx=0x2355980) at fts-build-mail.c:543
ctx = {mail = 0x23639b0, update_ctx = 0x2355980, content_type =
0x2371540 "text/*", content_disposition = 0x2371fa0 "attachment;
filename=\"PTT-20141109-WA0001.amr\"", body_parser = 0x23832a0, word_buf =
0x0, pending_input = 0x0, cur_user_lang = 0x0}
parser = 0x2371130
decoder = 0x0
raw_block = {part = 0x2304210, hdr = 0x0,
data = 0x236eb50
"\ni2iB5y/00irDx1lwRweHApK+9HrB6IGX3fA8DigyMH71rEH7P9Y4aXL0U7gtBqXwn6iifWl6XXBo\nYDwWVDlI1UYbwezbS7h86+VyRjMtv4kDWE9U/eehu67wPNhjeTDXABPB8tdUnMju+InvVF0WrHjV\ns4DPnnWsU/A8QHFtQIZOQyH2OXXwA/i5uBFaqadFhd/L4"...,
size = 8162}
prev_part = 0x2304210
skip_body = false
block = {part = 0x2304210, hdr = 0x0, data = 0x2391a60 "", size = 0}
binary_body = <optimized out>
ret = <optimized out>
input = 0x2370fa0
parts = 0x7f1b73ab63c1
body_part = true
body_added = true
#9 fts_build_mail (update_ctx=0x2355980, mail=mail@entry=0x23639b0) at
fts-build-mail.c:592
_data_stack_cur_id = 5
ret = 1
#10 0x00007f1b72701a20 in fts_mail_index (_mail=0x23639b0) at
fts-storage.c:484
ft = 0x235bdf0
flist = 0x2326868
#11 fts_mail_precache (_mail=0x23639b0) at fts-storage.c:501
_data_stack_cur_id = 4
mail = 0x23639b0
fmail = <optimized out>
ft = <optimized out>
#12 0x00007f1b73a1fad9 in mail_precache (mail=0x23639b0) at mail.c:401
_data_stack_cur_id = 3
p = 0x23639b0
#13 0x00000000004246b1 in cmd_index_box_precache (box=0x233a360) at
doveadm-mail-index.c:75
ctx = 0x235ca40
metadata = {guid = '\000'